Fix QEMU -vnc arg generation with raw IPv6 addresses

Since -vnc uses ':' to separate the address from the port, raw
IPv6 addresses need to be escaped like [addr]:port

* src/qemu/qemu_command.c: Escape raw IPv6 addresses with []
* tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args,
  tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml: Tweak
  to test Ipv6 escaping
* docs/schemas/domain.rng: Allow Ipv6 addresses, or hostnames
  in <graphics> listen attributes
This commit is contained in:
Daniel P. Berrange
2011-05-24 10:33:53 -04:00
parent 65e1acad80
commit 58765b58a3
4 changed files with 51 additions and 29 deletions
@@ -1,4 +1,4 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor unix:/tmp/test-monitor,server,\
nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none \
-parallel none -usb -vnc 127.0.0.1:3
-parallel none -usb -vnc [2001:1:2:3:4:5:1234:1234]:3