diff options
author | Pavel Hrdina <phrdina@redhat.com> | 2016-06-08 15:18:25 +0200 |
---|---|---|
committer | Pavel Hrdina <phrdina@redhat.com> | 2016-06-09 14:42:48 +0200 |
commit | acc83afe333bfadd3f7f79091d38ca3d7da1eeb2 (patch) | |
tree | 4aa7f189e9ed5366356047792f10d94cce62f560 /tests/genericxml2xmloutdata | |
parent | b6465e1aa49397367a9cd0f27110b9c2280a7385 (diff) | |
download | libvirt-acc83afe333bfadd3f7f79091d38ca3d7da1eeb2.tar.gz |
vnc: add support for listen type 'socket'
VNC graphics already supports sockets but only via 'socket' attribute.
This patch coverts that attribute into listen type 'socket'.
For backward compatibility we need to handle listen type 'socket' and 'socket'
attribute properly to support old XMLs and new XMLs. If both are provided they
have to match, if only one of them is provided we need to be able to parse that
configuration too.
To not break migration back to old libvirt if the socket is provided by user we
need to generate migratable XML without the listen element and use only 'socket'
attribute.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'tests/genericxml2xmloutdata')
4 files changed, 66 insertions, 2 deletions
diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-address.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-address.xml new file mode 100644 index 0000000000..f205e13125 --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-address.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/vnc.sock'> + <listen type='socket' socket='/tmp/vnc.sock'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-socket.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-socket.xml new file mode 100644 index 0000000000..f205e13125 --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-attr-listen-socket.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/vnc.sock'> + <listen type='socket' socket='/tmp/vnc.sock'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml index d8742c6e9f..cb4e5ac8d3 100644 --- a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml @@ -19,7 +19,9 @@ <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'> + <listen type='socket' socket='/tmp/QEMUGuest1-vnc.sock'/> + </graphics> <video> <model type='cirrus' vram='16384' heads='1' primary='yes'/> </video> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml index d8742c6e9f..cb4e5ac8d3 100644 --- a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml @@ -19,7 +19,9 @@ <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'> + <listen type='socket' socket='/tmp/QEMUGuest1-vnc.sock'/> + </graphics> <video> <model type='cirrus' vram='16384' heads='1' primary='yes'/> </video> |