diff options
author | Peter Krempa <pkrempa@redhat.com> | 2012-07-03 15:43:13 +0200 |
---|---|---|
committer | Peter Krempa <pkrempa@redhat.com> | 2012-08-02 12:13:48 +0200 |
commit | fbe871263c7050b59accf10bd3517e4cd5758683 (patch) | |
tree | 29de8d197538197c0ed8dc369de592fe475e69f2 /tests/qemuxml2argvdata | |
parent | domain_conf: Add helpers to verify if device configuration is valid (diff) | |
download | libvirt-fbe871263c7050b59accf10bd3517e4cd5758683.tar.gz libvirt-fbe871263c7050b59accf10bd3517e4cd5758683.tar.bz2 libvirt-fbe871263c7050b59accf10bd3517e4cd5758683.zip |
qemu: Add support for "none" USB controller
This patch enables the "none" USB controller for qemu guests and adds
valdiation on hot-plugged devices if the guest has USB disabled.
This patch also adds a set of tests to check parsing of domain XMLs that
use the "none" controller and some forbidden situations concerning it.
Diffstat (limited to 'tests/qemuxml2argvdata')
5 files changed, 80 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-none-hub.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-hub.xml new file mode 100644 index 000000000..9eeb95301 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-hub.xml @@ -0,0 +1,19 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' model='none' index='0'/> + <memballoon model='virtio'/> + <hub type='usb'> + <address type='usb' bus='0' port='1'/> + </hub> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-none-other.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-other.xml new file mode 100644 index 000000000..64bbba6e6 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-other.xml @@ -0,0 +1,19 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0' model='none'/> + <controller type='usb' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-none-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-usbtablet.xml new file mode 100644 index 000000000..9d53cc0d5 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-none-usbtablet.xml @@ -0,0 +1,21 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</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' model='none' index='0'/> + <input type='tablet' bus='usb'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-none.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-none.args new file mode 100644 index 000000000..085b66f3f --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-none.args @@ -0,0 +1,5 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-none.xml new file mode 100644 index 000000000..69ace418d --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-none.xml @@ -0,0 +1,16 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0' model='none'/> + <memballoon model='virtio'/> + </devices> +</domain> |