[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH libvirt] domain: add implicit USB controller



On 2012年02月08日 08:48, Marc-André Lureau wrote:
Some tools, such as virt-manager, prefers having the default USB
controller explicit in the XML document. This patch makes sure there
is one. With this patch, it is now possible to switch from USB1 to
USB2 from the release 0.9.1 of virt-manager.

Fix tests to pass with this change.
---
  src/conf/domain_conf.c                             |   93 ++++++++++---------
  src/qemu/qemu_command.c                            |    8 ++-
  tests/define-dev-segfault                          |    1 +
  tests/domainsnapshotxml2xmlout/disk_snapshot.xml   |    1 +
  tests/domainsnapshotxml2xmlout/full_domain.xml     |    1 +
  tests/domainsnapshotxml2xmlout/metadata.xml        |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-bios.xml       |    1 +
  .../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml |    1 +
  .../qemuxml2argv-blkiotune-device.xml              |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml |    1 +
  .../qemuxml2argv-boot-complex-bootindex.xml        |    1 +
  .../qemuxml2argvdata/qemuxml2argv-boot-complex.xml |    1 +
  .../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml  |    1 +
  ...uxml2argv-boot-menu-disable-drive-bootindex.xml |    1 +
  .../qemuxml2argv-boot-menu-disable-drive.xml       |    1 +
  .../qemuxml2argv-boot-menu-disable.xml             |    1 +
  .../qemuxml2argv-boot-menu-enable.xml              |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml |    1 +
  .../qemuxml2argvdata/qemuxml2argv-boot-network.xml |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml |    1 +
  .../qemuxml2argv-channel-guestfwd.xml              |    1 +
  .../qemuxml2argv-channel-spicevmc-old.xml          |    1 +
  .../qemuxml2argv-channel-spicevmc.xml              |    1 +
  .../qemuxml2argv-channel-virtio-auto.xml           |    1 +
  .../qemuxml2argv-channel-virtio.xml                |    1 +
  .../qemuxml2argvdata/qemuxml2argv-clock-france.xml |    1 +
  .../qemuxml2argv-clock-localtime.xml               |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml  |    1 +
  .../qemuxml2argv-clock-variable.xml                |    1 +
  .../qemuxml2argv-console-compat-auto.xml           |    1 +
  .../qemuxml2argv-console-compat-chardev.xml        |    1 +
  .../qemuxml2argv-console-compat.xml                |    1 +
  .../qemuxml2argv-console-virtio-many.xml           |    1 +
  .../qemuxml2argv-console-virtio.xml                |    1 +
  .../qemuxml2argv-cpu-host-kvmclock.xml             |    1 +
  .../qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-cputune.xml    |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml   |    1 +
  .../qemuxml2argv-disk-cdrom-empty.xml              |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml |    1 +
  .../qemuxml2argv-disk-copy_on_read.xml             |    1 +
  .../qemuxml2argv-disk-drive-boot-cdrom.xml         |    1 +
  .../qemuxml2argv-disk-drive-boot-disk.xml          |    1 +
  .../qemuxml2argv-disk-drive-cache-directsync.xml   |    1 +
  .../qemuxml2argv-disk-drive-cache-unsafe.xml       |    1 +
  .../qemuxml2argv-disk-drive-cache-v1-none.xml      |    1 +
  .../qemuxml2argv-disk-drive-cache-v1-wb.xml        |    1 +
  .../qemuxml2argv-disk-drive-cache-v1-wt.xml        |    1 +
  .../qemuxml2argv-disk-drive-cache-v2-none.xml      |    1 +
  .../qemuxml2argv-disk-drive-cache-v2-wb.xml        |    1 +
  .../qemuxml2argv-disk-drive-cache-v2-wt.xml        |    1 +
  ...muxml2argv-disk-drive-error-policy-enospace.xml |    1 +
  .../qemuxml2argv-disk-drive-error-policy-stop.xml  |    1 +
  ...rgv-disk-drive-error-policy-wreport-rignore.xml |    1 +
  .../qemuxml2argv-disk-drive-fat.xml                |    1 +
  .../qemuxml2argv-disk-drive-fmt-qcow.xml           |    1 +
  .../qemuxml2argv-disk-drive-network-nbd.xml        |    1 +
  .../qemuxml2argv-disk-drive-network-rbd-auth.xml   |    1 +
  ...emuxml2argv-disk-drive-network-rbd-ceph-env.xml |    1 +
  .../qemuxml2argv-disk-drive-network-rbd.xml        |    1 +
  .../qemuxml2argv-disk-drive-network-sheepdog.xml   |    1 +
  .../qemuxml2argv-disk-drive-no-boot.xml            |    1 +
  .../qemuxml2argv-disk-drive-readonly-disk.xml      |    1 +
  .../qemuxml2argv-disk-drive-readonly-no-device.xml |    1 +
  .../qemuxml2argv-disk-drive-shared.xml             |    1 +
  .../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml  |    1 +
  .../qemuxml2argv-disk-ioeventfd.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml |    1 +
  .../qemuxml2argv-disk-sata-device.xml              |    1 +
  .../qemuxml2argv-disk-scsi-device-auto.xml         |    1 +
  .../qemuxml2argv-disk-scsi-device.xml              |    1 +
  .../qemuxml2argv-disk-scsi-virtio-scsi.xml         |    1 +
  .../qemuxml2argv-disk-scsi-vscsi.xml               |    1 +
  .../qemuxml2argv-disk-snapshot.xml                 |    1 +
  .../qemuxml2argv-disk-transient.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml   |    1 +
  .../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml  |    1 +
  .../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml  |    1 +
  .../qemuxml2argv-encrypted-disk.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml  |    1 +
  .../qemuxml2argv-floppy-drive-fat.xml              |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml       |    1 +
  .../qemuxml2argv-graphics-listen-network.xml       |    1 +
  .../qemuxml2argv-graphics-listen-network2.xml      |    1 +
  .../qemuxml2argv-graphics-sdl-fullscreen.xml       |    1 +
  .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml |    1 +
  .../qemuxml2argv-graphics-spice-compression.xml    |    1 +
  .../qemuxml2argv-graphics-spice-qxl-vga.xml        |    1 +
  .../qemuxml2argv-graphics-spice.xml                |    1 +
  .../qemuxml2argv-graphics-vnc-sasl.xml             |    1 +
  .../qemuxml2argv-graphics-vnc-socket.xml           |    1 +
  .../qemuxml2argv-graphics-vnc-tls.xml              |    1 +
  .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml |    1 +
  .../qemuxml2argv-hostdev-pci-address.xml           |    1 +
  .../qemuxml2argv-hostdev-usb-address.xml           |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml  |    1 +
  .../qemuxml2argv-input-usbmouse-addr.xml           |    1 +
  .../qemuxml2argv-input-usbmouse.xml                |    1 +
  .../qemuxml2argv-input-usbtablet.xml               |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml   |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-lease.xml      |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-memtune.xml    |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-migrate.xml    |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-minimal.xml    |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml  |    1 +
  .../qemuxml2argv-misc-no-reboot.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml  |    1 +
  .../qemuxml2argvdata/qemuxml2argv-monitor-json.xml |    1 +
  .../qemuxml2argv-net-bandwidth.xml                 |    1 +
  .../qemuxml2argv-net-eth-ifname.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml    |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-net-user.xml   |    1 +
  .../qemuxml2argv-net-virtio-device.xml             |    1 +
  .../qemuxml2argv-net-virtio-netdev.xml             |    1 +
  .../qemuxml2argv-net-virtio-network-portgroup.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml |    1 +
  .../qemuxml2argv-nographics-vga.xml                |    1 +
  .../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml    |    1 +
  .../qemuxml2argv-qemu-ns-no-env.xml                |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml |    1 +
  .../qemuxml2argv-restore-v2-fd.xml                 |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml |    1 +
  .../qemuxml2argv-seclabel-dynamic-baselabel.xml    |    1 +
  .../qemuxml2argv-seclabel-dynamic-override.xml     |    1 +
  .../qemuxml2argv-seclabel-none.xml                 |    1 +
  .../qemuxml2argv-seclabel-static.xml               |    1 +
  .../qemuxml2argv-serial-dev-chardev.xml            |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml |    1 +
  .../qemuxml2argv-serial-file-chardev.xml           |    1 +
  .../qemuxml2argvdata/qemuxml2argv-serial-file.xml  |    1 +
  .../qemuxml2argv-serial-many-chardev.xml           |    1 +
  .../qemuxml2argvdata/qemuxml2argv-serial-many.xml  |    1 +
  .../qemuxml2argv-serial-pty-chardev.xml            |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml |    1 +
  .../qemuxml2argv-serial-tcp-chardev.xml            |    1 +
  .../qemuxml2argv-serial-tcp-telnet-chardev.xml     |    1 +
  .../qemuxml2argv-serial-tcp-telnet.xml             |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml |    1 +
  .../qemuxml2argv-serial-udp-chardev.xml            |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml |    1 +
  .../qemuxml2argv-serial-unix-chardev.xml           |    1 +
  .../qemuxml2argvdata/qemuxml2argv-serial-unix.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml  |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-smp.xml        |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-sound.xml      |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml |    1 +
  tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml   |    1 +
  .../qemuxml2xmlout-balloon-device-auto.xml         |    1 +
  .../qemuxml2xmlout-channel-virtio-auto.xml         |    1 +
  .../qemuxml2xmlout-console-compat-auto.xml         |    1 +
  .../qemuxml2xmlout-console-virtio.xml              |    1 +
  .../qemuxml2xmlout-disk-cdrom-empty.xml            |    1 +
  .../qemuxml2xmlout-disk-scsi-device-auto.xml       |    1 +
  .../qemuxml2xmlout-graphics-listen-network2.xml    |    1 +
  .../qemuxml2xmlout-graphics-spice-timeout.xml      |    1 +
  .../qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml |    1 +
  .../qemuxml2xmlout-serial-target-port-auto.xml     |    1 +
  162 files changed, 216 insertions(+), 45 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6949ece..a1b5f8f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -619,7 +619,6 @@ VIR_ENUM_IMPL(virDomainStartupPolicy, VIR_DOMAIN_STARTUP_POLICY_LAST,
  #define VIR_DOMAIN_XML_WRITE_FLAGS  VIR_DOMAIN_XML_SECURE
  #define VIR_DOMAIN_XML_READ_FLAGS   VIR_DOMAIN_XML_INACTIVE

-
  void
  virBlkioDeviceWeightArrayClear(virBlkioDeviceWeightPtr deviceWeights,
                                 int ndevices)
@@ -7091,6 +7090,49 @@ error:
  }


+static int virDomainDefMaybeAddController(virDomainDefPtr def,
+                                          int type,
+                                          int idx)
+{
+    int found = 0;
+    int i;
+    virDomainControllerDefPtr cont;
+
+    for (i = 0 ; (i<  def->ncontrollers)&&  !found; i++) {
+        if (def->controllers[i]->type == type&&
+            def->controllers[i]->idx == idx)
+            found = 1;
+    }
+
+    if (found)
+        return 0;
+
+    if (VIR_ALLOC(cont)<  0) {
+        virReportOOMError();
+        return -1;
+    }
+
+    cont->type = type;
+    cont->idx = idx;
+    cont->model = -1;
+
+    if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) {
+        cont->opts.vioserial.ports = -1;
+        cont->opts.vioserial.vectors = -1;
+    }
+
+
+    if (VIR_REALLOC_N(def->controllers, def->ncontrollers+1)<  0) {
+        VIR_FREE(cont);
+        virReportOOMError();
+        return -1;
+    }
+    def->controllers[def->ncontrollers] = cont;
+    def->ncontrollers++;
+
+    return 0;
+}
+
  static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
                                              xmlDocPtr xml,
                                              xmlNodePtr root,
@@ -7649,6 +7691,12 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
      }
      VIR_FREE(nodes);

+    if (def->virtType == VIR_DOMAIN_VIRT_QEMU ||
+        def->virtType == VIR_DOMAIN_VIRT_KQEMU ||
+        def->virtType == VIR_DOMAIN_VIRT_KVM)
+        if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_USB, 0)<  0)
+            goto error;
+
      /* analysis of the resource leases */
      if ((n = virXPathNodeSet("./devices/lease", ctxt,&nodes))<  0) {
          virDomainReportError(VIR_ERR_INTERNAL_ERROR,
@@ -9378,49 +9426,6 @@ cleanup:
  }


-static int virDomainDefMaybeAddController(virDomainDefPtr def,
-                                          int type,
-                                          int idx)
-{
-    int found = 0;
-    int i;
-    virDomainControllerDefPtr cont;
-
-    for (i = 0 ; (i<  def->ncontrollers)&&  !found; i++) {
-        if (def->controllers[i]->type == type&&
-            def->controllers[i]->idx == idx)
-            found = 1;
-    }
-
-    if (found)
-        return 0;
-
-    if (VIR_ALLOC(cont)<  0) {
-        virReportOOMError();
-        return -1;
-    }
-
-    cont->type = type;
-    cont->idx = idx;
-    cont->model = -1;
-
-    if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) {
-        cont->opts.vioserial.ports = -1;
-        cont->opts.vioserial.vectors = -1;
-    }
-
-
-    if (VIR_REALLOC_N(def->controllers, def->ncontrollers+1)<  0) {
-        VIR_FREE(cont);
-        virReportOOMError();
-        return -1;
-    }
-    def->controllers[def->ncontrollers] = cont;
-    def->ncontrollers++;
-
-    return 0;
-}
-
  static int virDomainDefAddDiskControllersForType(virDomainDefPtr def,
                                                   int controllerType,
                                                   int diskBus)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0e26df1..e171641 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7621,7 +7621,13 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
              WANT_VALUE();
              /* ignore, generted on the fly */
          } else if (STREQ(arg, "-usb")) {
-            /* ignore, always added by libvirt */
+            virDomainControllerDefPtr ctldef;
+            if (VIR_ALLOC(ctldef)<  0)
+                goto no_memory;
+            ctldef->type = VIR_DOMAIN_CONTROLLER_TYPE_USB;
+            ctldef->idx = 0;
+            ctldef->model = -1;
+            virDomainControllerInsert(def, ctldef);
          } else if (STREQ(arg, "-pidfile")) {
              WANT_VALUE();
              if (pidfile)
diff --git a/tests/define-dev-segfault b/tests/define-dev-segfault
index 3feff46..0a0532b 100755
--- a/tests/define-dev-segfault
+++ b/tests/define-dev-segfault
@@ -36,6 +36,7 @@ cat<<\EOF>  D.xml || fail=1
    <on_crash>destroy</on_crash>
    <devices>
      <emulator>/usr/bin/qemu-kvm</emulator>
+<controller type='usb' index='0'/>
      <serial type='pty'>
        <target port='0'/>
      </serial>
diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
index a0a0965..91dba79 100644
--- a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
+++ b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
@@ -69,6 +69,7 @@
          <target dev='hdf' bus='ide'/>
          <address type='drive' controller='0' bus='5' unit='0'/>
        </disk>
+<controller type='usb' index='0'/>
        <controller type='ide' index='0'/>
        <memballoon model='virtio'/>
      </devices>
diff --git a/tests/domainsnapshotxml2xmlout/full_domain.xml b/tests/domainsnapshotxml2xmlout/full_domain.xml
index 76f17e1..3063910 100644
--- a/tests/domainsnapshotxml2xmlout/full_domain.xml
+++ b/tests/domainsnapshotxml2xmlout/full_domain.xml
@@ -27,6 +27,7 @@
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' unit='0'/>
        </disk>
+<controller type='usb' index='0'/>
        <controller type='ide' index='0'/>
        <memballoon model='virtio'/>
      </devices>
diff --git a/tests/domainsnapshotxml2xmlout/metadata.xml b/tests/domainsnapshotxml2xmlout/metadata.xml
index f0ad70b..9553b17 100644
--- a/tests/domainsnapshotxml2xmlout/metadata.xml
+++ b/tests/domainsnapshotxml2xmlout/metadata.xml
@@ -31,6 +31,7 @@
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' unit='0'/>
        </disk>
+<controller type='usb' index='0'/>
        <controller type='ide' index='0'/>
        <memballoon model='virtio'/>
      </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml
index 5ce3e24..9b71164 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-bios.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bios.xml
@@ -21,6 +21,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
index 7b6ec8f..6b4da65 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
@@ -35,6 +35,7 @@
        </iotune>
        <address type='drive' controller='0' bus='0' unit='1'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
index 3412753..6c2d282 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
@@ -30,6 +30,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
index 4fa03ef..ae7133f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
@@ -22,6 +22,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
index 14ccd23..183894b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
@@ -20,6 +20,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml
index b4d6f4f..860f52e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml
@@ -50,6 +50,7 @@
        <target dev='fda' bus='fdc'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='fdc' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml
index b4d6f4f..860f52e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml
@@ -50,6 +50,7 @@
        <target dev='fda' bus='fdc'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='fdc' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
index db3a94f..ff20736 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
@@ -24,6 +24,7 @@
        <target dev='fda' bus='fdc'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='fdc' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml
index bc1da8a..66a64df 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml
index bc1da8a..66a64df 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
index bc1da8a..66a64df 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml
index c35b2bd..d92f681 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
index 44ca0fa..09556da 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
@@ -24,6 +24,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
index d3f3369..aec0796 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
index 68741fe..f46ef5c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
@@ -40,6 +40,7 @@
        <boot order='4'/>
        <address type='drive' controller='0' bus='0' unit='1'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='fdc' index='0'/>
      <interface type='user'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
index 6ce846d..332e6b6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
@@ -20,6 +20,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
index b1d5281..1016ead 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <channel type='pipe'>
        <source path='/tmp/guestfwd'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml
index 0e82394..9b53469 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml
@@ -18,6 +18,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='1'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
index 0e82394..9b53469 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
@@ -18,6 +18,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='1'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
index c127d84..dd3bd9d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
      <controller type='virtio-serial' index='1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
index f612c02..e13f8b9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='1'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
index 017ef39..60560ee 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
index ed746c1..958b3d2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
index 479a1d9..317f793 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
index 9f52cca..eea6ce4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
index bd19988..7fb2ff9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <console type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
index 0bf52f4..1a7899a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
index 9011522..f579b11 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
index e65fb74..71b7fbe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='0'/>
      <serial type='pty'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
index 259af4a..8311e59 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <console type='pty'>
        <target type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
index 15a9e44..50f582b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
@@ -18,6 +18,7 @@
    <on_crash>destroy</on_crash>
    <devices>
      <emulator>/./qemu.sh</emulator>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
index 2b51b0e..63a6163 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
@@ -19,6 +19,7 @@
    <on_crash>destroy</on_crash>
    <devices>
      <emulator>/./qemu.sh</emulator>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
index 091865a..b892320 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
@@ -26,6 +26,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
index f6d7633..12b114f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
index bc40d16..565b8e2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
@@ -24,6 +24,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
index 2fd2e6a..cea3f4a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
@@ -25,6 +25,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml
index 433c641..a94623a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml
@@ -32,6 +32,7 @@
        <model type='virtio'/>
        <driver name='vhost' txmode='iothread'/>
      </interface>
+<controller type='usb' index='0'/>
      <controller type='virtio-serial' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </controller>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
index 434cd7e..a018655 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
@@ -24,6 +24,7 @@
        <target dev='hdc' bus='ide'/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
index 452cb82..ba27ec6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
@@ -24,6 +24,7 @@
        <target dev='hdc' bus='ide'/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
index 17d7c1c..1996223 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
index 37185f6..562ff0a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
index 3f60871..2d954de 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
index 6a4e8e3..adb243d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
index 5f351f5..0c50f48 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
index da07d5e..fcf52a4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
index 8c30aec..5445be6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
index a9e0c33..de543a9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
index f9a56ab..694c59b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
index 6d99607..34fe20f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
index 70068aa..80cf5fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
index d473711..fdf2030 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
index cc88ef5..dbece24 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
@@ -27,6 +27,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
index c0255a8..7ba0ab0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
@@ -26,6 +26,7 @@
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml
index 88f7f7a..a81bf1a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml
@@ -31,6 +31,7 @@
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
index e920db1..f0bcfd5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
@@ -28,6 +28,7 @@
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
index e920db1..f0bcfd5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
@@ -28,6 +28,7 @@
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
index 83d6c4e..cd0eef4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
@@ -26,6 +26,7 @@
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml
index a7e08fd..88ce751 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml
@@ -31,6 +31,7 @@
        <target dev='fda' bus='fdc'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='fdc' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='none'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
index c0cf6a4..380f850 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
@@ -25,6 +25,7 @@
         <readonly/>
         <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
index c0cf6a4..380f850 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
@@ -25,6 +25,7 @@
         <readonly/>
         <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
index 8dcf4b7..c155040 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
@@ -29,6 +29,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
index 6c2a18d..99adcd4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
@@ -29,6 +29,7 @@
        <target dev='fdb' bus='fdc'/>
        <address type='drive' controller='0' bus='0' unit='1'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='fdc' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml
index c565c9f..3bc82cb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml
@@ -32,6 +32,7 @@
        <model type='virtio'/>
        <driver name='vhost' txmode='iothread' ioeventfd='off'/>
      </interface>
+<controller type='usb' index='0'/>
      <controller type='virtio-serial' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </controller>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
index 3b28a34..c04d6e2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
@@ -34,6 +34,7 @@
        <target dev='hdd' bus='ide'/>
        <address type='drive' controller='0' bus='1' unit='1'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml
index b07bbed..d89e57b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml
@@ -31,6 +31,7 @@
        <source file='/tmp/data.img'/>
        <target dev='vda' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml
index 68a14f2..81f30e5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.xml
@@ -19,6 +19,7 @@
        <target dev='sda' bus='sata'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='sata' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
index a7e55b0..fbbf6ed 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
@@ -18,6 +18,7 @@
        <source dev='/dev/HostVG/QEMUGuest1'/>
        <target dev='hda' bus='ide'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <disk type='file' device='disk'>
        <source file='/tmp/scsidisk.img'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
index 530c0a6..17b59d8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
@@ -24,6 +24,7 @@
        <target dev='sda' bus='scsi'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='scsi' index='0'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
index 452ade8..3c61e1f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
@@ -24,6 +24,7 @@
        <target dev='sda' bus='scsi'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='scsi' index='0' model='virtio-scsi'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
index 7cf5798..12f928a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
@@ -24,6 +24,7 @@
        <target dev='sda' bus='scsi'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='scsi' index='0' model='ibmvscsi'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml
index aeb2315..2501ac8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml
@@ -33,6 +33,7 @@
        <target dev='hdb' bus='ide'/>
        <address type='drive' controller='0' bus='2' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml
index df49c48..e5aef0a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml
@@ -21,6 +21,7 @@
        <transient/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
index 0a9adef..a8a505d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
@@ -23,6 +23,7 @@
        <source file='/tmp/usbdisk.img'/>
        <target dev='sda' bus='usb'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
index eef9a1b..9a9e966 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
@@ -33,6 +33,7 @@
        <source file='/tmp/logs.img'/>
        <target dev='vdb' bus='virtio'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
index c940847..4497a04 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
@@ -33,6 +33,7 @@
        <source file='/tmp/logs.img'/>
        <target dev='xvdg' bus='xen'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
index fdcf624..636f7e4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
@@ -23,6 +23,7 @@
        </encryption>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      </disk>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
index 81f2200..6dc346d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
@@ -29,6 +29,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='virtio-serial' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </controller>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
index ceee0b8..4d6ebd7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
@@ -21,6 +21,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='fdc' index='0'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
index e31db48..c187995 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <filesystem type='mount'>
        <source dir='/export/to/guest'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
index a49e5d3..c341054 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5903' autoport='no'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
index 1c55eff..7985625 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' listen='1.2.3.4' autoport='yes'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index 4e11a28..277c1d4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index cf5aaa9..a5a169a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
index d92211c..33e2190 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
index 65fc2d9..ac1a915 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 5313b3a..d4e68e4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index 1f6c115..339b1fd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index 19c9213..e3151e5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' socket='/tmp/foo.socket'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index 1f6c115..339b1fd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index f93facc..ad2bfc0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5903' autoport='no' listen='2001:1:2:3:4:5:1234:1234'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
index a88ada4..a7f0410 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <hostdev mode='subsystem' type='pci' managed='yes'>
        <source>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
index c224291..80b4771 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <hostdev mode='subsystem' type='usb' managed='no'>
        <source>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
index 78bf4e1..fa0bb96 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
@@ -22,6 +22,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.xml
index a2fa8e3..858b385 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='usb'>
        <address type='usb' bus='0' port='4'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
index b9aff61..cc78f9f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='usb'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
index 18d5cb5..c042ed2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='tablet' bus='usb'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
index fb42c95..0b82b3b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='xen'/>
      <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
index 6ff3b35..fbd31ec 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
@@ -16,6 +16,7 @@
    <on_crash>destroy</on_crash>
    <devices>
      <emulator>/usr/bin/kvm</emulator>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
index 7efe1ef..b998f62 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
@@ -25,6 +25,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <lease>
        <lockspace>somearea</lockspace>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
index 37b5c88..c81a253 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
@@ -24,6 +24,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
index 99e81ae..e16fce5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
index 51eb59a..d060271 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
@@ -24,6 +24,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
index d5f8d2f..a4fce92 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
@@ -22,6 +22,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
index b06493f..b84a0b4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
index d5f8d2f..a4fce92 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
@@ -22,6 +22,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.xml b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.xml
index 1901715..6760304 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.xml
@@ -19,6 +19,7 @@
        <source file='/dev/hda1'/>
        <target dev='hda'/>
      </disk>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
index 852c97b..d5e4b9a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
@@ -34,6 +34,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
      </controller>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
index a638e06..bd5a153 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='ethernet'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
index d5c4b36..61836be 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='ethernet'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
index 540808d..4a6f041 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
index 4e7abcd..013c444 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
index 5f2b12c..2e46562 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
@@ -18,6 +18,7 @@
        <source dev='/dev/HostVG/QEMUGuest1'/>
        <target dev='hda' bus='ide'/>
      </disk>
+<controller type='usb' index='0'/>
      <interface type='user'>
        <mac address='00:11:22:33:44:55'/>
        <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
index 0f6e076..4a56f59 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='network'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
index ec930b3..f17b5a9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
        <mac address='00:11:22:33:44:55'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
index 99e81ae..e16fce5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
index 5c50ecc..67cf661 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <parallel type='tcp'>
        <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
index 731a69d..51eecbc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <interface type='user'>
        <mac address='52:54:00:24:a5:9f'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
index 0d9dd98..9bf8da7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
index 479a1d9..317f793 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
index 99e81ae..e16fce5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
index 99e81ae..e16fce5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
index fea0eb7..dfbdf9e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
index 19b1cbb..c34243b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
@@ -31,6 +31,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
index 1ef97ce..7b48206 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
index 416bd86..2a8dd5b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
index ea5a3f8..b6f9d29 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='dev'>
        <source path='/dev/ttyS2'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
index 41f473a..56f9006 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='dev'>
        <source path='/dev/ttyS2'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
index 9a3e197..c64da73 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='file'>
        <source path='/tmp/serial.log'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
index 975d81e..54bfc93 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='file'>
        <source path='/tmp/serial.log'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
index d6116e8..29e12be 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
index e68ad79..371fc44 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
index 57d1b74..17fc702 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
index 19dd131..7e2ca30 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
index cd43384..2b1f5d4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='tcp'>
        <source mode='connect' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
index 14bead4..1cebeff 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='tcp'>
        <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
index ad5a038..3b8dca8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='tcp'>
        <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
index 45ad585..fe19f8b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='tcp'>
        <source mode='connect' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
index 9627c67..52ccc94 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='udp'>
        <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
index f606ea4..31c9104 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='udp'>
        <source mode='bind' host='127.0.0.1' service='9999'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
index 4ed72aa..e86c1ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='unix'>
        <source mode='connect' path='/tmp/serial.sock'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
index 4685ad4..053cec1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='unix'>
        <source mode='connect' path='/tmp/serial.sock'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
index 6100332..c086092 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='vc'>
        <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
index cba15dc..9d0d918 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
@@ -22,6 +22,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index 57cabb4..e5b3f13 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <sound model='pcspk'/>
      <sound model='es1370'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
index 63107d5..1b183aa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
@@ -28,6 +28,7 @@
        <target dev='vdb' bus='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='virtio-serial' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </controller>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
index 06da70b..e1f6e56 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <watchdog model='ib700' action='poweroff'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
index 479a1d9..317f793 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
index a52ea8e..1602b6c 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
      <controller type='virtio-serial' index='1'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index 9011522..f579b11 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <serial type='pty'>
        <target port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
index b64c7e5..f1f70c7 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='virtio-serial' index='0'/>
      <console type='pty'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
index 9299da3..897b0d2 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml
@@ -25,6 +25,7 @@
        <readonly/>
        <address type='drive' controller='0' bus='1' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <memballoon model='virtio'/>
    </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
index 530c0a6..17b59d8 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
@@ -24,6 +24,7 @@
        <target dev='sda' bus='scsi'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <controller type='scsi' index='0'/>
      <memballoon model='virtio'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
index d369b89..188e14a 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
@@ -19,6 +19,7 @@
        <target dev='hda' bus='ide'/>
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
+<controller type='usb' index='0'/>
      <controller type='ide' index='0'/>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='-1' autoport='yes' listen='1.2.3.4'>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
index ac72822..53298d1 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
@@ -58,6 +58,7 @@
      <controller type='virtio-serial' index='0'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      </controller>
+<controller type='usb' index='0'/>
      <interface type='ethernet'>
        <mac address='52:54:00:71:70:89'/>
        <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
index a029404..01b820d 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
@@ -24,6 +24,7 @@
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
      <controller type='ide' index='0'/>
+<controller type='usb' index='0'/>
      <memballoon model='virtio'/>
    </devices>
  </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
index 878418a..44472c7 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
@@ -20,6 +20,7 @@
        <address type='drive' controller='0' bus='0' unit='0'/>
      </disk>
      <controller type='ide' index='0'/>
+<controller type='usb' index='0'/>
      <serial type='pty'>
        <target port='0'/>
      </serial>

ACK

Osier


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]