LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   virt-manager failing console connection (http://www.linuxquestions.org/questions/linux-server-73/virt-manager-failing-console-connection-815395/)

eco 06-21-2010 06:50 AM

virt-manager failing console connection
 
Hi all,

I have a KVM server and am trying to add a new VM. The problem is I am unable to connect to the consle to finish the installation. Could someone help me please?

I have put the details of the steps I took and my ssh config file for clarity. It seems I have a problem with a vnc 'security type'.

Any help would be apreciated!

ssh config
----------
Code:

Port 2200
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
UsePAM yes

client
------
Code:

$ virt-manager -c qemu+ssh://root@phoenix:2200/system
[Prompt for password and connects OK]

KVM Server
----------
Code:

# virt-install --connect qemu:///system -n web -r 1024 --vcpus=1 -f /dev/vms/web_os -s 5 -c ~ecosta/debian-504-amd64-netinst.iso --vnc --noautoconsole --os-type linux --os-variant debianLenny --accelerate --network network:default --hvm

Starting install...
Creating domain...                                                0 B 00:00
Domain installation still in progress. You can reconnect to
the console to complete the installation process.

client
------
I can see the new VM but when I chose to open the console, the password is asked again and again without a successful connection to the console. The following is what I found in the log.

virt-manager log:
Code:

[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:586) Graphics console configured at vnc://root@phoenix:2200:5902
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:599) Starting connect process for phoenix:2200 5902
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:535) Creating SSH tunnel: ['ssh', 'ssh', '-p', '2200', '-l', 'root', 'phoenix', "nc -q 2>&1 | grep -q 'requires an argument';if [ $? -eq 0 ] ; then  CMD='nc -q 0 127.0.0.1 5902';else  CMD='nc 127.0.0.1 5902';fi;$CMD;"]
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:550) Tunnel PID 23 FD 9746
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (engine:413) window counter incremented to 2
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:586) Graphics console configured at vnc://root@phoenix:2200:5902
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:599) Starting connect process for phoenix:2200 5902
[Mon, 21 Jun 2010 12:36:22 virt-manager 9365] DEBUG (console:603) Tunnel already open, skipping open_tunnel.
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:650) Got credential request <enum VNC_DISPLAY_CREDENTIAL_CLIENTNAME of type VncDisplayCredential>
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:559) Shutting down tunnel PID 9746 FD 23
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:449) VNC disconnected
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] WARNING (console:476) Retrying connection in 125 ms
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:586) Graphics console configured at vnc://root@phoenix:2200:5902
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:599) Starting connect process for phoenix:2200 5902
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:535) Creating SSH tunnel: ['ssh', 'ssh', '-p', '2200', '-l', 'root', 'phoenix', "nc -q 2>&1 | grep -q 'requires an argument';if [ $? -eq 0 ] ; then  CMD='nc -q 0 127.0.0.1 5902';else  CMD='nc 127.0.0.1 5902';fi;$CMD;"]
[Mon, 21 Jun 2010 12:36:29 virt-manager 9365] DEBUG (console:550) Tunnel PID 23 FD 9765

client
------
I then tried to make an ssh tunnel and use vncviewer to connect:

Code:

$ ssh -p 2200  root@phoenix -N -T -L 5902:localhost:5902
Code:

$ vncviewer localhost:2
Connected to RFB server, using protocol version 3.8
Server did not offer supported security type

Code:

$ ssvncviewer localhost:2

Proto: RFB 003.008

Connected to RFB server, using protocol version 3.8
Server did not offer supported security type:
  sectype[0] 19
Security-Type: 0 (rfbSecTypeInvalid)  Latency: 12.40 ms
ShmCleanup called

VNC Viewer exiting.

That's it. I'm out of ideas. ;)

Thanks for your help

Blue_Ice 06-21-2010 07:08 AM

Shouldn't you add the -X option to your ssh command?

Code:

ssh -X -p 2200  root@phoenix -N -T -L 5902:localhost:5902

eco 06-21-2010 09:11 AM

Hi Blue Ice,

I tried it but it didn't work. I don't think you need to forward X in this case as the KVM server has no X.

Anyone else with a good idea? ;)


All times are GMT -5. The time now is 11:45 AM.