Jungnam Lee<jungnam.lee@kaist.ac.kr>
2013-Aug-09 10:05 UTC
[libvirt-users] vnc ip binding problem
Hi, all. I tested some operations with libvirt 1.1 on Xen 4.3 Creating vm seems okay, but I cannot connect to its vnc console. So, I checked its bining. [root@dev-2 ~]# netstat -antp|grep 5900 tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN 10508/qemu-system-i I tried several times, but it always binds 127.0.0.1 only. here's my xml. <domain type='xen' id='3'> <name>fv0</name> <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid> <os> <type arch='x86_64'>hvm</type> <loader>/usr/local/lib/xen/boot/hvmloader</loader> <boot dev='hd'/> </os> <memory>524288</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <features> <pae/> <acpi/> <apic/> </features> <clock sync="localtime"/> <devices> <emulator>/usr/local/lib/xen/bin/qemu-dm</emulator> <interface type='bridge'> <source bridge='cibr2'/> <mac address='00:16:3e:5d:c7:9e'/> <virtualport type='openvswitch'/> <script path='vif-openvswitch'/> </interface> <disk type='file'> <driver name="tap2" type="vhd"/> <source file='/var/cloudit/cache/centOS-6.4-x86_64_130711.vhd'/> <target dev='xvda' bus='xen'/> </disk> <graphics type='vnc' port='5900'> <listen type='address' address='172.31.0.104'/> </graphics> </devices> </domain> I tried both 0.0.0.0 and my public ip on the address attribute, and those didn't work too. Did I miss something? Regards, Jungnam Lee
On 08/09/2013 12:05 PM, Jungnam Lee wrote:> Hi, all. > > I tested some operations with libvirt 1.1 on Xen 4.3 > > Creating vm seems okay, but I cannot connect to its vnc console. So, I checked its bining. > > [root@dev-2 ~]# netstat -antp|grep 5900 > tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN 10508/qemu-system-i > > I tried several times, but it always binds 127.0.0.1 only. > > > here's my xml. > > <domain type='xen' id='3'> > <name>fv0</name> > <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid> > <os> > <type arch='x86_64'>hvm</type> > <loader>/usr/local/lib/xen/boot/hvmloader</loader> > <boot dev='hd'/> > </os> > <memory>524288</memory> > <vcpu>1</vcpu> > <on_poweroff>destroy</on_poweroff> > <on_reboot>restart</on_reboot> > <on_crash>restart</on_crash> > <features> > <pae/> > <acpi/> > <apic/> > </features> > <clock sync="localtime"/> > <devices> > <emulator>/usr/local/lib/xen/bin/qemu-dm</emulator> > <interface type='bridge'> > <source bridge='cibr2'/> > <mac address='00:16:3e:5d:c7:9e'/> > <virtualport type='openvswitch'/> > <script path='vif-openvswitch'/> > </interface> > <disk type='file'> > <driver name="tap2" type="vhd"/> > <source file='/var/cloudit/cache/centOS-6.4-x86_64_130711.vhd'/> > <target dev='xvda' bus='xen'/> > </disk> > <graphics type='vnc' port='5900'> > <listen type='address' address='172.31.0.104'/> > </graphics> > </devices> > </domain> > > I tried both 0.0.0.0 and my public ip on the address attribute, and those didn't work too. > > Did I miss something? >Try dumpxml while it's running, you'll see what was parsed and all current data. The following works perfectly for me. Check the cmdline it is running with. If we pass it right then there is problem somewhere else (but I doubt that this is the case). <graphics type='vnc' port='5900' listen='0.0.0.0'/> But I have to stress out this is definitely not what you want, moreover without a password set. You can forward these ports through ssh, connect with virt-viewer, etc. Without setting anything else than 127.0.0.1 to listen on Hope this helps, have a nice day, Martin> > Regards, > > Jungnam Lee > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >