Re: [libvirt] Trouble starting a QEMU guest with IPv6 VNC address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/27/2009 01:47 PM, Kaitlin Rupert wrote:
It looks like specifying an address of [::1] instead of ::1 will work. However, that seems like a bug. The bracket syntax is specific to qemu, which means the user needs to have prior knowledge of this.

Not exactly specific to qemu. Many other protocols use it (eg SIP, pretty much any URL - see section 3.2.2 of RFC3986). Basically, anywhere the IP address might have a port tacked onto it with ":n" syntax *needs* to have the brackets and, due to this precedent, many other places accept it anyway.

My opinion would be that in cases where the port may be specified URL-style as part of the address (I haven't looked to see if that's the case here), then the brackets should be required; if port cannot be specified using ":n" syntax, then brackets should NOT be required, but should be accepted.

(In practice, I found that having some places where brackets were required and some where it wasn't necessitated lots of extra code and was just a nuisance all around (even worse to have places where brackets weren't even accepted).



Kaitlin Rupert wrote:
Hello,

I am trying to start a QEMU guest with an IPv6 VNC address. I can specify the address and start the guest, but the VNC port shows up under the IPv4 list:

# virsh dumpxml domU1 | grep graphics
<graphics type='vnc' port='5900' autoport='no' listen='::1' keymap='en-us'/>

# cat /proc/net/tcp | grep 170C
2: 00000000:170C 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 621103 1 ffff88007a043a80 299 0 0 2 -1

# cat /proc/net/tcp6 | grep 170C
#

# ps -ef | grep qemu
root 16451 1 43 04:17 ? 00:00:18 /usr/bin/qemu-system-x86_64 -S -M pc -m 128 -smp 1 -name domU1 -uuid 2aebe290-d1ed-11dd-90eb-001a64bc024c -monitor pty -pidfile /var/run/libvirt/qemu//domU1.pid -no-acpi -boot c -drive file=/tmp/default-kvm-dimage,if=ide,index=0,boot=on -net nic,macaddr=11:22:33:aa:bb:cc,vlan=0 -net tap,fd=17,vlan=0 -serial none -parallel none -usb -vnc ::1:0 -k en-us

I started the same guest manually, but I appended an ",ipv6' flag to the vnc option (see below). With this change, the port shows up in the IPv6 list.

# /usr/bin/qemu-system-x86_64 -M pc -m 128 -smp 1 -name domU1 -uuid 2aebe290-d1ed-11dd-90eb-001a64bc024c -monitor pty -pidfile /var/run/libvirt/qemu//domU1.pid -no-acpi -boot c -drive file=/tmp/default-kvm-dimage,if=ide,index=0,boot=on -net nic,macaddr=11:22:33:aa:bb:cc,vlan=0 -net tap,fd=17,vlan=0 -serial none -parallel none -usb -vnc ::1:0,ipv6 -k en-us

# cat /proc/net/tcp6 | grep 170C
2: 00000000000000000000000000000000:170C 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 621485 1 ffff88007a30ad00 299 0 0 2 -1

# cat /proc/net/tcp | grep 170C
#

I'd like to fix the qemu driver so that it specifies this flag, but I am unsure whether a guest XML change or some other change is appropriate here. Would it be better to have the qemu driver code do some detection on the address that is passed in?

Thanks!



--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]