[virt-tools-list] The problem of virt-manager connected remote KVM host and graphic control guest fail

Cole Robinson crobinso at redhat.com
Thu Mar 28 21:44:02 UTC 2013


On 03/28/2013 04:43 AM, cochen wrote:
> Hi everyone, i got a problem and need your help!(my english not very good)
>        My KVM host in IDC, and there are some restrict in there lead to me
> connect to KVM host by port 22 or 16509 impossible. In generally If i want
> login my KVM host i must login in to a "stepping stones" first, then login to
> that KVM host.( Now assume that the KVM host ip is 1.1.1.1 and the "stepping
> stones" ip is 2.2.2.2).
>        So i use the "port <app:ds:port> forwarding <app:ds:forwarding>" (i
> used the manner of "qemu+tcp" to connect KVM host, the default port is 16509),
> I visit the port 16509 in "stepping stones" machine 1.1.1.1 and then 1.1.1.1
> port forwarding to 2.2.2.2:16509. And then my virt-manager connect KVM host
> successful!
>        But my trouble is comming too. I can't use virt-manager to control my
> guest by graphic. I "port <app:ds:port> forwarding <app:ds:forwarding>" the
> port 5911(i had already defined  my guest vnc port), but is unuseful. I used
> command "netstat -antl" in KVM host found that :
> tcp        0      0 127.0.0.1:5911              0.0.0.0:*                  
> LISTEN
> tcp        0      0 1.1.1.1:16509            2.2.2.2:63325            
> ESTABLISHED
> tcp        0      0 0.0.0.0:16509               0.0.0.0:*                  
> LISTEN 
> 
> As you see, 5911 listen into localhost(127.0.0.1), but 16509 listen into the
> 1.1.1.1 and 0.0.0.0. So I think if 5911 listen 0.0.0.0 or 1.1.1.1 everything
> is ok.
> 
> Here is my virt-manager.log:
> [Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (engine:471) window counter incremented to 2
> [Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (console:1078) Starting connect process for proto=vnc trans=tcp connhost=2.2.2.2
> connuser=root connport=None gaddr=127.0.0.1 gport=5911 gsocket=None
> [Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (console:374) VNC connecting to
> 2.2.2.2:5911
> [Thu, 28 Mar 2013 00:57:18 virt-manager 3242] DEBUG (console:961) Viewer disconnected
> 
> How can i use virt-manager to control my guest by graphic?


I'm not certain this will fix your issue, but to change your guest from
listening on 127.0.0.1 to 0.0.0.0, do

- stop your guest
- sudo virsh edit $vmname
- add listen='0.0.0.0' to the <graphics> block

Alternately you can change the default listen address in
/etc/libvirt/qemu.conf, which requires a libvirtd restart.

- Cole




More information about the virt-tools-list mailing list