Extend parser and add support for USB devices in QEmu/KVM

* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
  src/qemu_driver.c: Patch from Guido Günther allowing to pass
  usb devices to qemu/kvm
* docs/libvirt.rng: add the new functionality to the grammar
* tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml
  tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: adding examples
  to the regression tests
* libvirt.spec.in: fix the licence tag
Daniel
This commit is contained in:
Daniel Veillard
2008-08-08 14:27:05 +00:00
parent c11e64efbd
commit d1710d35ea
13 changed files with 582 additions and 29 deletions
@@ -0,0 +1 @@
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice host:014.006
@@ -0,0 +1,27 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219200</currentMemory>
<vcpu>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>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
</disk>
<hostdev mode='subsystem' type='usb'>
<source>
<address bus='14' device='6'/>
</source>
</hostdev>
</devices>
</domain>
@@ -0,0 +1 @@
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice host:0204:6025
@@ -0,0 +1,28 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219200</currentMemory>
<vcpu>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>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
</disk>
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x0204'/>
<product id='0x6025'/>
</source>
</hostdev>
</devices>
</domain>
+3
View File
@@ -179,6 +179,9 @@ mymain(int argc, char **argv)
DO_TEST("console-compat", 0);
DO_TEST("sound", 0);
DO_TEST("hostdev-usb-product", 0);
DO_TEST("hostdev-usb-address", 0);
virCapabilitiesFree(driver.caps);
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
+3
View File
@@ -118,6 +118,9 @@ mymain(int argc, char **argv)
DO_TEST("parallel-tcp");
DO_TEST("console-compat");
DO_TEST("hostdev-usb-product");
DO_TEST("hostdev-usb-address");
virCapabilitiesFree(driver.caps);
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);