[libvirt] [PATCH 0/2] qemu: Check if qemu is VNC capable

This is the initial series where I'll be exposing the graphical support that QEMU has via capabilities but I'm breaking it up to get in as much as possible based on my available time. This initial set adds checks to see that your QEMU binary has VNC support instead of assuming that it does. A large Gentoo user apparently just uses SPICE and as a result we now provide the ability to install QEMU without VNC. While this is not a recommended configuration its certainly valid and libvirt should not assume it exists. Doug Goldstein (2): test: Don't assume VNC is always available qemu: Don't blindly assume VNC is supported src/qemu/qemu_capabilities.c | 5 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 6 +++ tests/qemuhelptest.c | 48 +++++++++++++------- tests/qemuxml2argvdata/qemuxml2argv-bios.args | 6 +- tests/qemuxml2argvdata/qemuxml2argv-bios.xml | 4 -- .../qemuxml2argv-disk-copy_on_read.args | 6 +- .../qemuxml2argv-disk-copy_on_read.xml | 5 -- .../qemuxml2argv-disk-ioeventfd.args | 6 +- .../qemuxml2argv-disk-ioeventfd.xml | 5 -- tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 6 +- tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 8 --- .../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 6 +- tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml | 8 --- tests/qemuxml2argvtest.c | 10 ++-- 15 files changed, 64 insertions(+), 66 deletions(-) -- 1.7.8.6

Several tests assume that VNC is always available and include it in their configs and the expected command line. The tests have nothing to do with graphics display so they shouldn't rely on VNC. --- tests/qemuxml2argvdata/qemuxml2argv-bios.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-bios.xml | 4 ---- .../qemuxml2argv-disk-copy_on_read.args | 6 +++--- .../qemuxml2argv-disk-copy_on_read.xml | 5 ----- .../qemuxml2argv-disk-ioeventfd.args | 6 +++--- .../qemuxml2argv-disk-ioeventfd.xml | 5 ----- tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 8 -------- .../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml | 8 -------- 10 files changed, 15 insertions(+), 45 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios.args b/tests/qemuxml2argvdata/qemuxml2argv-bios.args index ac98000..89b0f7f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bios.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios.args @@ -1,7 +1,7 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc -bios /usr/share/seabios/bios.bin \ --m 1024 -smp 1 -nodefaults -device sga \ +-m 1024 -smp 1 -nographic -nodefaults -device sga \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -hda /dev/HostVG/QEMUGuest1 -serial pty \ --usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 \ +-usb -device usb-tablet,id=input0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml index d1795f6..52acba4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml @@ -32,10 +32,6 @@ </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> - <graphics type='vnc' port='5900' autoport='no' listen='127.0.0.1'/> - <video> - <model type='cirrus' vram='9216' heads='1'/> - </video> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args index 2ca586d..6f692eb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,copy-on-read=on \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,tx=bh,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml index 3034647..0834cf2 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml @@ -42,10 +42,5 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'/> - <video> - <model type='vga' vram='9216' heads='1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args index 2f4e7fd..14cbfb9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,tx=bh,ioeventfd=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml index 7e2f40a..edfa731 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml @@ -42,10 +42,5 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'/> - <video> - <model type='vga' vram='9216' heads='1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args index a506274..0e5c0c3 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,event_idx=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml index d50af0b..22e388f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml @@ -45,14 +45,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vga' vram='9216' heads='1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args index b229f2a..dbf329d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/dev/sdfake,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/dev/sdfake2,if=none,id=drive-virtio-disk1 \ -device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \ -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml index d33534a..c4f0079 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml @@ -44,14 +44,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'> - <listen type='address' address='127.0.0.1'/> - </graphics> - <video> - <model type='vga' vram='9216' heads='1'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </video> <memballoon model='virtio'/> </devices> </domain> -- 1.7.8.6

On 2012年10月20日 03:40, Doug Goldstein wrote:
Several tests assume that VNC is always available and include it in their configs and the expected command line. The tests have nothing to do with graphics display so they shouldn't rely on VNC. --- tests/qemuxml2argvdata/qemuxml2argv-bios.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-bios.xml | 4 ---- .../qemuxml2argv-disk-copy_on_read.args | 6 +++--- .../qemuxml2argv-disk-copy_on_read.xml | 5 ----- .../qemuxml2argv-disk-ioeventfd.args | 6 +++--- .../qemuxml2argv-disk-ioeventfd.xml | 5 ----- tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 8 -------- .../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 6 +++--- tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml | 8 -------- 10 files changed, 15 insertions(+), 45 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios.args b/tests/qemuxml2argvdata/qemuxml2argv-bios.args index ac98000..89b0f7f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bios.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios.args @@ -1,7 +1,7 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc -bios /usr/share/seabios/bios.bin \ --m 1024 -smp 1 -nodefaults -device sga \ +-m 1024 -smp 1 -nographic -nodefaults -device sga \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ -hda /dev/HostVG/QEMUGuest1 -serial pty \ --usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 \ +-usb -device usb-tablet,id=input0 \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml index d1795f6..52acba4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml @@ -32,10 +32,6 @@ </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> -<graphics type='vnc' port='5900' autoport='no' listen='127.0.0.1'/> -<video> -<model type='cirrus' vram='9216' heads='1'/> -</video> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args index 2ca586d..6f692eb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,copy-on-read=on \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,tx=bh,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml index 3034647..0834cf2 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml @@ -42,10 +42,5 @@ <console type='pty'> <target type='serial' port='0'/> </console> -<graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'/> -<video> -<model type='vga' vram='9216' heads='1'/> -<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> -</video> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args index 2f4e7fd..14cbfb9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,tx=bh,ioeventfd=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml index 7e2f40a..edfa731 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml @@ -42,10 +42,5 @@ <console type='pty'> <target type='serial' port='0'/> </console> -<graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'/> -<video> -<model type='vga' vram='9216' heads='1'/> -<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> -</video> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args index a506274..0e5c0c3 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0 \ -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \ -device virtio-net-pci,event_idx=off,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml index d50af0b..22e388f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml @@ -45,14 +45,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> -<input type='mouse' bus='ps2'/> -<graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'> -<listen type='address' address='127.0.0.1'/> -</graphics> -<video> -<model type='vga' vram='9216' heads='1'/> -<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> -</video> <memballoon model='virtio'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args index b229f2a..dbf329d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.args @@ -1,5 +1,5 @@ -LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nodefaults \ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \ -monitor unix:/tmp/test-monitor,server,nowait -no-acpi \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ -drive file=/dev/sdfake,if=none,id=drive-virtio-disk0 \ @@ -7,5 +7,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -drive file=/dev/sdfake2,if=none,id=drive-virtio-disk1 \ -device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \ -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \ --net user,vlan=0,name=hostnet0 -serial pty -usb -vnc 127.0.0.1:-809 -std-vga \ +-net user,vlan=0,name=hostnet0 -serial pty -usb \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml index d33534a..c4f0079 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml @@ -44,14 +44,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> -<input type='mouse' bus='ps2'/> -<graphics type='vnc' port='5091' autoport='no' listen='127.0.0.1'> -<listen type='address' address='127.0.0.1'/> -</graphics> -<video> -<model type='vga' vram='9216' heads='1'/> -<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> -</video> <memballoon model='virtio'/> </devices> </domain>
ACK.

Currently its assumed that qemu always supports VNC, however it is definitely possible to compile qemu without VNC support so we should at the very least check for it and handle that correctly. --- src/qemu/qemu_capabilities.c | 5 ++++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 6 +++++ tests/qemuhelptest.c | 48 ++++++++++++++++++++++++++++-------------- tests/qemuxml2argvtest.c | 10 ++++---- 5 files changed, 49 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c391b3..9c7cbca 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -187,6 +187,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, "reboot-timeout", /* 110 */ "dump-guest-core", "seamless-migration", + "vnc", ); struct _qemuCaps { @@ -937,6 +938,8 @@ qemuCapsComputeCmdFlags(const char *help, } if (strstr(help, "-spice")) qemuCapsSet(caps, QEMU_CAPS_SPICE); + if (strstr(help, "-vnc")) + qemuCapsSet(caps, QEMU_CAPS_VNC); if (strstr(help, "seamless-migration=")) qemuCapsSet(caps, QEMU_CAPS_SEAMLESS_MIGRATION); if (strstr(help, "boot=on")) @@ -1881,6 +1884,8 @@ qemuCapsProbeQMPCommands(qemuCapsPtr caps, qemuCapsSet(caps, QEMU_CAPS_SPICE); else if (STREQ(name, "query-kvm")) qemuCapsSet(caps, QEMU_CAPS_KVM); + else if (STREQ(name, "query-vnc")) + qemuCapsSet(caps, QEMU_CAPS_VNC); VIR_FREE(name); } VIR_FREE(commands); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 5d343c1..1dd6f0c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -150,6 +150,7 @@ enum qemuCapsFlags { QEMU_CAPS_REBOOT_TIMEOUT = 110, /* -boot reboot-timeout */ QEMU_CAPS_DUMP_GUEST_CORE = 111, /* dump-guest-core-parameter */ QEMU_CAPS_SEAMLESS_MIGRATION = 112, /* seamless-migration for SPICE */ + QEMU_CAPS_VNC = 113, /* Is -vnc avail */ QEMU_CAPS_LAST, /* this must always be the last item */ }; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9096b3c..40c6417 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5847,6 +5847,12 @@ qemuBuildCommandLine(virConnectPtr conn, def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) { virBuffer opt = VIR_BUFFER_INITIALIZER; + if (!qemuCapsGet(caps, QEMU_CAPS_VNC)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vnc graphics are not supported with this QEMU")); + goto error; + } + if (def->graphics[0]->data.vnc.socket || driver->vncAutoUnixSocket) { diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index df30ac1..b49c86d 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -147,7 +147,8 @@ mymain(void) QEMU_CAPS_NO_REBOOT, QEMU_CAPS_DRIVE, QEMU_CAPS_NAME, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("kvm-74", 9001, 1, 74, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -161,7 +162,8 @@ mymain(void) QEMU_CAPS_MEM_PATH, QEMU_CAPS_TDF, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("kvm-83-rhel56", 9001, 1, 83, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -189,7 +191,8 @@ mymain(void) QEMU_CAPS_SMBIOS_TYPE, QEMU_CAPS_SPICE, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("qemu-0.10.5", 10005, 0, 0, QEMU_CAPS_KQEMU, QEMU_CAPS_VNC_COLON, @@ -210,7 +213,8 @@ mymain(void) QEMU_CAPS_NO_HPET, QEMU_CAPS_VGA_NONE, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.10.5", 10005, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -237,7 +241,8 @@ mymain(void) QEMU_CAPS_NESTING, QEMU_CAPS_VGA_NONE, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("kvm-86", 10050, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -264,7 +269,8 @@ mymain(void) QEMU_CAPS_SMBIOS_TYPE, QEMU_CAPS_VGA_NONE, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.11.0-rc2", 10092, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -296,7 +302,8 @@ mymain(void) QEMU_CAPS_SMBIOS_TYPE, QEMU_CAPS_VGA_NONE, QEMU_CAPS_NO_SHUTDOWN, - QEMU_CAPS_NO_ACPI); + QEMU_CAPS_NO_ACPI, + QEMU_CAPS_VNC); DO_TEST("qemu-0.12.1", 12001, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -331,7 +338,8 @@ mymain(void) QEMU_CAPS_PCI_ROMBAR, QEMU_CAPS_NO_ACPI, QEMU_CAPS_VIRTIO_BLK_SG_IO, - QEMU_CAPS_CPU_HOST); + QEMU_CAPS_CPU_HOST, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -382,7 +390,8 @@ mymain(void) QEMU_CAPS_PCI_ROMBAR, QEMU_CAPS_NO_ACPI, QEMU_CAPS_VIRTIO_BLK_SG_IO, - QEMU_CAPS_CPU_HOST); + QEMU_CAPS_CPU_HOST, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -424,7 +433,8 @@ mymain(void) QEMU_CAPS_PCI_ROMBAR, QEMU_CAPS_NO_ACPI, QEMU_CAPS_VIRTIO_BLK_SG_IO, - QEMU_CAPS_CPU_HOST); + QEMU_CAPS_CPU_HOST, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -484,7 +494,8 @@ mymain(void) QEMU_CAPS_NO_ACPI, QEMU_CAPS_VIRTIO_BLK_SG_IO, QEMU_CAPS_CPU_HOST, - QEMU_CAPS_SCSI_LSI); + QEMU_CAPS_SCSI_LSI, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -542,7 +553,8 @@ mymain(void) QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO, QEMU_CAPS_CPU_HOST, - QEMU_CAPS_BLOCKIO); + QEMU_CAPS_BLOCKIO, + QEMU_CAPS_VNC); DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -610,7 +622,8 @@ mymain(void) QEMU_CAPS_DRIVE_COPY_ON_READ, QEMU_CAPS_CPU_HOST, QEMU_CAPS_SCSI_CD, - QEMU_CAPS_BLOCKIO); + QEMU_CAPS_BLOCKIO, + QEMU_CAPS_VNC); DO_TEST("qemu-1.0", 1000000, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -683,7 +696,8 @@ mymain(void) QEMU_CAPS_SCSI_CD, QEMU_CAPS_IDE_CD, QEMU_CAPS_SCSI_LSI, - QEMU_CAPS_BLOCKIO); + QEMU_CAPS_BLOCKIO, + QEMU_CAPS_VNC); DO_TEST("qemu-1.1.0", 1001000, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -764,7 +778,8 @@ mymain(void) QEMU_CAPS_NETDEV_BRIDGE, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI_PCI, - QEMU_CAPS_BLOCKIO); + QEMU_CAPS_BLOCKIO, + QEMU_CAPS_VNC); DO_TEST("qemu-1.2.0", 1002000, 0, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -848,7 +863,8 @@ mymain(void) QEMU_CAPS_BLOCKIO, QEMU_CAPS_SCSI_DISK_WWN, QEMU_CAPS_SECCOMP_SANDBOX, - QEMU_CAPS_DUMP_GUEST_CORE); + QEMU_CAPS_DUMP_GUEST_CORE, + QEMU_CAPS_VNC); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7403a8f..20b0b35 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -536,16 +536,16 @@ mymain(void) QEMU_CAPS_SCSI_BLOCK, QEMU_CAPS_VIRTIO_BLK_SG_IO, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI_PCI); - DO_TEST("graphics-vnc", NONE); - DO_TEST("graphics-vnc-socket", NONE); + DO_TEST("graphics-vnc", QEMU_CAPS_VNC); + DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC); driver.vncSASL = 1; driver.vncSASLdir = strdup("/root/.sasl2"); - DO_TEST("graphics-vnc-sasl", QEMU_CAPS_VGA); + DO_TEST("graphics-vnc-sasl", QEMU_CAPS_VNC, QEMU_CAPS_VGA); driver.vncTLS = 1; driver.vncTLSx509verify = 1; driver.vncTLSx509certdir = strdup("/etc/pki/tls/qemu"); - DO_TEST("graphics-vnc-tls", NONE); + DO_TEST("graphics-vnc-tls", QEMU_CAPS_VNC); driver.vncSASL = driver.vncTLSx509verify = driver.vncTLS = 0; VIR_FREE(driver.vncSASLdir); VIR_FREE(driver.vncTLSx509certdir); @@ -585,7 +585,7 @@ mymain(void) DO_TEST("input-usbmouse", NONE); DO_TEST("input-usbtablet", NONE); - DO_TEST("input-xen", QEMU_CAPS_DOMID, QEMU_CAPS_KVM); + DO_TEST("input-xen", QEMU_CAPS_DOMID, QEMU_CAPS_KVM, QEMU_CAPS_VNC); DO_TEST("misc-acpi", NONE); DO_TEST("misc-disable-s3", QEMU_CAPS_DISABLE_S3); DO_TEST("misc-disable-suspends", QEMU_CAPS_DISABLE_S3, QEMU_CAPS_DISABLE_S4); -- 1.7.8.6

On 2012年10月20日 03:40, Doug Goldstein wrote:
Currently its assumed that qemu always supports VNC, however it is
s/its/it's/
definitely possible to compile qemu without VNC support so we should at the very least check for it and handle that correctly. --- src/qemu/qemu_capabilities.c | 5 ++++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 6 +++++ tests/qemuhelptest.c | 48 ++++++++++++++++++++++++++++-------------- tests/qemuxml2argvtest.c | 10 ++++---- 5 files changed, 49 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c391b3..9c7cbca 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -187,6 +187,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, "reboot-timeout", /* 110 */ "dump-guest-core", "seamless-migration", + "vnc", );
struct _qemuCaps { @@ -937,6 +938,8 @@ qemuCapsComputeCmdFlags(const char *help, } if (strstr(help, "-spice")) qemuCapsSet(caps, QEMU_CAPS_SPICE); + if (strstr(help, "-vnc")) + qemuCapsSet(caps, QEMU_CAPS_VNC); if (strstr(help, "seamless-migration=")) qemuCapsSet(caps, QEMU_CAPS_SEAMLESS_MIGRATION); if (strstr(help, "boot=on")) @@ -1881,6 +1884,8 @@ qemuCapsProbeQMPCommands(qemuCapsPtr caps, qemuCapsSet(caps, QEMU_CAPS_SPICE); else if (STREQ(name, "query-kvm")) qemuCapsSet(caps, QEMU_CAPS_KVM); + else if (STREQ(name, "query-vnc")) + qemuCapsSet(caps, QEMU_CAPS_VNC);
It's better to name it as "QEMU_CAPS_GRAPHIC_VNC". With assuming that we will have flags like QEMU_CAPS_GRAPHIC_SPICE in future.
VIR_FREE(name); } VIR_FREE(commands); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 5d343c1..1dd6f0c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -150,6 +150,7 @@ enum qemuCapsFlags { QEMU_CAPS_REBOOT_TIMEOUT = 110, /* -boot reboot-timeout */ QEMU_CAPS_DUMP_GUEST_CORE = 111, /* dump-guest-core-parameter */ QEMU_CAPS_SEAMLESS_MIGRATION = 112, /* seamless-migration for SPICE */ + QEMU_CAPS_VNC = 113, /* Is -vnc avail */
To keep consistent, better to use "available?".
QEMU_CAPS_LAST, /* this must always be the last item */ }; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9096b3c..40c6417 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5847,6 +5847,12 @@ qemuBuildCommandLine(virConnectPtr conn, def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) { virBuffer opt = VIR_BUFFER_INITIALIZER;
+ if (!qemuCapsGet(caps, QEMU_CAPS_VNC)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vnc graphics are not supported with this QEMU"));
I'd reword it like: "vnc graphic is not supported by this QEMU". Plural is no need here. The rest looks just fine, ACK with the changes. Regards, Osier

On 10/22/2012 03:33 AM, Osier Yang wrote:
On 2012年10月20日 03:40, Doug Goldstein wrote:
Currently its assumed that qemu always supports VNC, however it is
s/its/it's/
definitely possible to compile qemu without VNC support so we should at the very least check for it and handle that correctly. ---
+++ b/src/qemu/qemu_capabilities.h @@ -150,6 +150,7 @@ enum qemuCapsFlags { QEMU_CAPS_REBOOT_TIMEOUT = 110, /* -boot reboot-timeout */ QEMU_CAPS_DUMP_GUEST_CORE = 111, /* dump-guest-core-parameter */ QEMU_CAPS_SEAMLESS_MIGRATION = 112, /* seamless-migration for SPICE */ + QEMU_CAPS_VNC = 113, /* Is -vnc avail */
To keep consistent, better to use "available?".
Also, this will have a merge conflict with my block-commit stuff, but you should be able to resolve that.
+ if (!qemuCapsGet(caps, QEMU_CAPS_VNC)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vnc graphics are not supported with this QEMU"));
I'd reword it like:
"vnc graphic is not supported by this QEMU". Plural is no need here.
Actually, this is one case where the trailing 's' IS needed; we use the term 'graphics' and not 'graphic' because the display is a sequence of ever-changing images, and not a static image. Besides, our XML uses <graphics>. Keep the term 'graphics'.
The rest looks just fine, ACK with the changes.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 2012年10月22日 22:40, Eric Blake wrote:
On 10/22/2012 03:33 AM, Osier Yang wrote:
On 2012年10月20日 03:40, Doug Goldstein wrote:
Currently its assumed that qemu always supports VNC, however it is
s/its/it's/
definitely possible to compile qemu without VNC support so we should at the very least check for it and handle that correctly. ---
+++ b/src/qemu/qemu_capabilities.h @@ -150,6 +150,7 @@ enum qemuCapsFlags { QEMU_CAPS_REBOOT_TIMEOUT = 110, /* -boot reboot-timeout */ QEMU_CAPS_DUMP_GUEST_CORE = 111, /* dump-guest-core-parameter */ QEMU_CAPS_SEAMLESS_MIGRATION = 112, /* seamless-migration for SPICE */ + QEMU_CAPS_VNC = 113, /* Is -vnc avail */
To keep consistent, better to use "available?".
Also, this will have a merge conflict with my block-commit stuff, but you should be able to resolve that.
+ if (!qemuCapsGet(caps, QEMU_CAPS_VNC)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("vnc graphics are not supported with this QEMU"));
I'd reword it like:
"vnc graphic is not supported by this QEMU". Plural is no need here.
Actually, this is one case where the trailing 's' IS needed; we use the term 'graphics' and not 'graphic' because the display is a sequence of ever-changing images, and not a static image. Besides, our XML uses <graphics>. Keep the term 'graphics'.
Makes sense, pushed the set with it's kept. And the name QEMU_CAPS_VNC is also kept, as I found QEMU_CAPS_SPICE is already there when resolving the conflicts. Regards, Osier
participants (3)
-
Doug Goldstein
-
Eric Blake
-
Osier Yang