[virt-tools-list] [virt-manager PATCH v2] controller: don't set default controller index

Pavel Hrdina phrdina at redhat.com
Tue Dec 3 12:16:18 UTC 2019


Libvirt is able to figure this out and it will make usage of the CLI
options more user-friendly.

For example if users wants to add a new pcie-root-port to existing VM
they have to figure out the latest controller index and call it like
this:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port,index=$nextIndex \
        $VM

After this change it will be simply:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port \
        $VM

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 .../compare/virt-convert-ovf-compare.xml         |  8 ++++----
 .../compare/virt-convert-vmx-compare.xml         |  8 ++++----
 .../compare/virt-install-aarch64-cdrom.xml       |  8 ++++----
 ...virt-install-aarch64-firmware-no-override.xml |  4 ++--
 .../compare/virt-install-aarch64-graphics.xml    |  2 +-
 .../compare/virt-install-aarch64-headless.xml    |  2 +-
 .../compare/virt-install-aarch64-kvm-gic.xml     |  4 ++--
 .../compare/virt-install-aarch64-kvm-import.xml  |  2 +-
 .../compare/virt-install-aarch64-machdefault.xml |  2 +-
 .../compare/virt-install-aarch64-machvirt.xml    |  2 +-
 .../compare/virt-install-arm-defaultmach-f20.xml |  2 +-
 .../compare/virt-install-arm-kvm-import.xml      |  2 +-
 .../compare/virt-install-arm-virt-f20.xml        |  2 +-
 .../compare/virt-install-boot-loader-secure.xml  |  2 +-
 .../compare/virt-install-boot-uefi.xml           |  8 ++++----
 .../compare/virt-install-cdrom-centos-label.xml  | 16 ++++++++--------
 .../compare/virt-install-cdrom-double.xml        | 16 ++++++++--------
 .../compare/virt-install-cdrom-url.xml           | 16 ++++++++--------
 .../compare/virt-install-cloud-init-default.xml  |  8 ++++----
 .../compare/virt-install-cloud-init-options.xml  |  8 ++++----
 .../compare/virt-install-cpu-disable-sec.xml     | 16 ++++++++--------
 .../compare/virt-install-cpu-rhel7-default.xml   | 16 ++++++++--------
 .../compare/virt-install-cpuset-auto.xml         | 16 ++++++++--------
 .../compare/virt-install-f21-kvm-remote.xml      |  2 +-
 .../compare/virt-install-fake-ftp.xml            | 16 ++++++++--------
 .../compare/virt-install-fake-http.xml           | 16 ++++++++--------
 .../compare/virt-install-kvm-centos7.xml         |  4 ++--
 .../virt-install-kvm-cpu-default-fallback.xml    |  4 ++--
 .../virt-install-kvm-fedoralatest-url.xml        |  4 ++--
 .../virt-install-kvm-hostcopy-fallback.xml       | 16 ++++++++--------
 .../compare/virt-install-kvm-i686-uefi.xml       | 16 ++++++++--------
 .../compare/virt-install-kvm-rhel5.xml           | 16 ++++++++--------
 .../compare/virt-install-kvm-rhel6.xml           | 16 ++++++++--------
 .../compare/virt-install-kvm-rhel7.xml           |  4 ++--
 .../virt-install-kvm-session-defaults.xml        |  4 ++--
 .../compare/virt-install-kvm-win10.xml           |  4 ++--
 .../compare/virt-install-kvm-win2k3-cdrom.xml    |  4 ++--
 .../compare/virt-install-location-iso.xml        | 16 ++++++++--------
 .../virt-install-location-manual-kernel.xml      | 16 ++++++++--------
 .../compare/virt-install-many-devices.xml        |  4 ++--
 .../compare/virt-install-memory-hotplug.xml      | 16 ++++++++--------
 .../virt-install-memory-option-backcompat.xml    | 16 ++++++++--------
 .../virt-install-network-install-resources.xml   |  4 ++--
 .../compare/virt-install-openbsd-defaults.xml    |  8 ++++----
 .../virt-install-osinfo-multiple-short-id.xml    |  4 ++--
 .../virt-install-osinfo-netinst-unattended.xml   |  4 ++--
 .../virt-install-osinfo-url-unattended.xml       |  4 ++--
 .../virt-install-osinfo-url-with-disk.xml        |  4 ++--
 .../compare/virt-install-osinfo-url.xml          |  4 ++--
 .../virt-install-osinfo-win7-unattended.xml      | 16 ++++++++--------
 .../virt-install-osvariant-defaults-pxe.xml      | 16 ++++++++--------
 .../compare/virt-install-ppc64-graphics.xml      |  2 +-
 .../compare/virt-install-ppc64-headless.xml      |  2 +-
 .../virt-install-ppc64-machdefault-f20.xml       |  2 +-
 .../compare/virt-install-ppc64-pseries-f20.xml   |  4 ++--
 .../compare/virt-install-ppc64le-kvm-import.xml  |  2 +-
 .../compare/virt-install-q35-defaults.xml        | 16 ++++++++--------
 .../compare/virt-install-qemu-32-on-64.xml       |  2 +-
 .../compare/virt-install-qemu-plain.xml          |  8 ++++----
 .../compare/virt-install-riscv64-graphics.xml    |  2 +-
 .../compare/virt-install-riscv64-headless.xml    |  2 +-
 .../compare/virt-install-s390x-cdrom-KVMIBM.xml  |  2 +-
 .../compare/virt-install-s390x-cdrom.xml         |  2 +-
 .../compare/virt-install-simple-pxe.xml          | 16 ++++++++--------
 .../compare/virt-install-singleton-config-1.xml  |  8 ++++----
 .../compare/virt-install-singleton-config-2.xml  |  8 ++++----
 .../compare/virt-install-singleton-config-3.xml  |  2 +-
 .../compare/virt-install-w2k3-cdrom.xml          |  4 ++--
 .../compare/virt-install-win7-uefi.xml           | 16 ++++++++--------
 .../compare/virt-install-x86_64-graphics.xml     |  2 +-
 .../compare/virt-install-x86_64-headless.xml     |  2 +-
 ...t-install-x86_64-launch-security-sev-full.xml |  8 ++++----
 .../virt-install-x86_64-launch-security-sev.xml  |  8 ++++----
 .../cli-test-xml/compare/virt-install-xen-pv.xml |  4 ++--
 .../ovf2libvirt_ovf_directory.libvirt            |  8 ++++----
 .../libvirt_output/ovf2libvirt_test1.libvirt     |  8 ++++----
 .../ovf2libvirt_test1.libvirt.disk_qcow2         |  8 ++++----
 .../libvirt_output/ovf2libvirt_test2.libvirt     |  8 ++++----
 .../libvirt_output/ovf2libvirt_test_gzip.libvirt |  8 ++++----
 .../ovf2libvirt_test_gzip.libvirt.disk_raw       |  8 ++++----
 .../vmx2libvirt_test-nodisks.libvirt             |  8 ++++----
 .../vmx2libvirt_test-vmx-zip.libvirt             |  8 ++++----
 .../libvirt_output/vmx2libvirt_test1.libvirt     |  8 ++++----
 .../vmx2libvirt_test1.libvirt.disk_raw           |  8 ++++----
 .../libvirt_output/vmx2libvirt_vmx-dir.libvirt   |  8 ++++----
 tests/xmlparse-xml/replace-child-build.xml       |  8 ++++----
 tests/xmlparse-xml/replace-child-parse.xml       |  8 ++++----
 virtinst/devices/controller.py                   |  9 ---------
 88 files changed, 328 insertions(+), 337 deletions(-)

diff --git a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml
index cd7ae415..73d1a675 100644
--- a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml
+++ b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml
@@ -36,14 +36,14 @@
       <source file="/tmp/testfile"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml
index 016710be..1757892c 100644
--- a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml
+++ b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml
@@ -34,14 +34,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml b/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml
index 47c5e541..6d2ec066 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml
@@ -28,8 +28,8 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -69,8 +69,8 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml b/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml
index b062e805..e899ef00 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-firmware-no-override.xml
@@ -13,7 +13,7 @@
   <on_reboot>destroy</on_reboot>
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -40,7 +40,7 @@
   <clock offset="utc"/>
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml b/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml
index dad2636b..3c6cdfde 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-graphics.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml b/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml
index 86175a11..d6f23cc1 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-headless.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml
index 7346ad32..dc844ce4 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-gic.xml
@@ -26,10 +26,10 @@
       <source file="/var/lib/libvirt/images/disk.qcow2"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="scsi" index="0" model="virtio-scsi">
+    <controller type="scsi" model="virtio-scsi">
       <address type="pci"/>
     </controller>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="network">
       <source network="default"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml
index a6eb9421..dd2e2238 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml b/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml
index 97fb93a7..597d15a4 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml b/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml
index 97fb93a7..597d15a4 100644
--- a/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml
+++ b/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml b/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml
index 7ddc645d..02c53dc1 100644
--- a/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml
index 1d11fd96..bd00f6c9 100644
--- a/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml
+++ b/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml b/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml
index 4f52d8e8..98f6827f 100644
--- a/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml
@@ -23,7 +23,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-boot-loader-secure.xml b/tests/cli-test-xml/compare/virt-install-boot-loader-secure.xml
index f1619693..fe6ad438 100644
--- a/tests/cli-test-xml/compare/virt-install-boot-loader-secure.xml
+++ b/tests/cli-test-xml/compare/virt-install-boot-loader-secure.xml
@@ -19,7 +19,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="none"/>
+    <controller type="usb" model="none"/>
     <interface type="user">
       <mac address="00:11:22:33:44:55"/>
       <model type="e1000"/>
diff --git a/tests/cli-test-xml/compare/virt-install-boot-uefi.xml b/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
index 6c2c64d2..c97f86fc 100644
--- a/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
+++ b/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
@@ -27,14 +27,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-cdrom-centos-label.xml b/tests/cli-test-xml/compare/virt-install-cdrom-centos-label.xml
index 33ac2b01..e607e82f 100644
--- a/tests/cli-test-xml/compare/virt-install-cdrom-centos-label.xml
+++ b/tests/cli-test-xml/compare/virt-install-cdrom-centos-label.xml
@@ -43,14 +43,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -119,14 +119,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-cdrom-double.xml b/tests/cli-test-xml/compare/virt-install-cdrom-double.xml
index 1ba21e78..002ca71f 100644
--- a/tests/cli-test-xml/compare/virt-install-cdrom-double.xml
+++ b/tests/cli-test-xml/compare/virt-install-cdrom-double.xml
@@ -34,14 +34,14 @@
       <target dev="hdc" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -84,14 +84,14 @@
       <target dev="hdc" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-cdrom-url.xml b/tests/cli-test-xml/compare/virt-install-cdrom-url.xml
index b57b1371..890cb19a 100644
--- a/tests/cli-test-xml/compare/virt-install-cdrom-url.xml
+++ b/tests/cli-test-xml/compare/virt-install-cdrom-url.xml
@@ -26,14 +26,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -67,14 +67,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-cloud-init-default.xml b/tests/cli-test-xml/compare/virt-install-cloud-init-default.xml
index 7201f446..93309bbe 100644
--- a/tests/cli-test-xml/compare/virt-install-cloud-init-default.xml
+++ b/tests/cli-test-xml/compare/virt-install-cloud-init-default.xml
@@ -32,14 +32,14 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-cloud-init-options.xml b/tests/cli-test-xml/compare/virt-install-cloud-init-options.xml
index 7201f446..93309bbe 100644
--- a/tests/cli-test-xml/compare/virt-install-cloud-init-options.xml
+++ b/tests/cli-test-xml/compare/virt-install-cloud-init-options.xml
@@ -32,14 +32,14 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-cpu-disable-sec.xml b/tests/cli-test-xml/compare/virt-install-cpu-disable-sec.xml
index 47e068d4..f83191b4 100644
--- a/tests/cli-test-xml/compare/virt-install-cpu-disable-sec.xml
+++ b/tests/cli-test-xml/compare/virt-install-cpu-disable-sec.xml
@@ -27,14 +27,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -73,14 +73,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-cpu-rhel7-default.xml b/tests/cli-test-xml/compare/virt-install-cpu-rhel7-default.xml
index d12370dc..478118c4 100644
--- a/tests/cli-test-xml/compare/virt-install-cpu-rhel7-default.xml
+++ b/tests/cli-test-xml/compare/virt-install-cpu-rhel7-default.xml
@@ -29,14 +29,14 @@
   </pm>
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -77,14 +77,14 @@
   </pm>
   <devices>
     <emulator>/usr/libexec/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-cpuset-auto.xml b/tests/cli-test-xml/compare/virt-install-cpuset-auto.xml
index df5d30ae..85e6672c 100644
--- a/tests/cli-test-xml/compare/virt-install-cpuset-auto.xml
+++ b/tests/cli-test-xml/compare/virt-install-cpuset-auto.xml
@@ -19,14 +19,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -56,14 +56,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml
index 0c79782d..c5a9a407 100644
--- a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml
+++ b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml
@@ -35,7 +35,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="network">
       <source network="default"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-fake-ftp.xml b/tests/cli-test-xml/compare/virt-install-fake-ftp.xml
index 693fb576..48190da1 100644
--- a/tests/cli-test-xml/compare/virt-install-fake-ftp.xml
+++ b/tests/cli-test-xml/compare/virt-install-fake-ftp.xml
@@ -26,14 +26,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -68,14 +68,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-fake-http.xml b/tests/cli-test-xml/compare/virt-install-fake-http.xml
index f25058a0..8292e63a 100644
--- a/tests/cli-test-xml/compare/virt-install-fake-http.xml
+++ b/tests/cli-test-xml/compare/virt-install-fake-http.xml
@@ -26,14 +26,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -68,14 +68,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml
index b17f819d..8cf905dc 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml
@@ -37,7 +37,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -104,7 +104,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-cpu-default-fallback.xml b/tests/cli-test-xml/compare/virt-install-kvm-cpu-default-fallback.xml
index 1a89ce74..d3b862cb 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-cpu-default-fallback.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-cpu-default-fallback.xml
@@ -39,7 +39,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -107,7 +107,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-fedoralatest-url.xml b/tests/cli-test-xml/compare/virt-install-kvm-fedoralatest-url.xml
index c670ab7d..a55e7cee 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-fedoralatest-url.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-fedoralatest-url.xml
@@ -38,7 +38,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -95,7 +95,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-hostcopy-fallback.xml b/tests/cli-test-xml/compare/virt-install-kvm-hostcopy-fallback.xml
index 553c64ac..ca28ba42 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-hostcopy-fallback.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-hostcopy-fallback.xml
@@ -48,14 +48,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -128,14 +128,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml b/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml
index 74e8bb9b..9c86bde8 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-i686-uefi.xml
@@ -28,14 +28,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -87,14 +87,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel5.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel5.xml
index 8ac4809d..ef09190c 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-rhel5.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel5.xml
@@ -37,14 +37,14 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -104,14 +104,14 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml
index 9afff3a2..bef67674 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml
@@ -38,14 +38,14 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -110,14 +110,14 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml
index e920d180..ed21e080 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml
@@ -38,7 +38,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -104,7 +104,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml b/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml
index d5c3ce69..0c91b849 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml
@@ -43,7 +43,7 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="user">
       <mac address="00:11:22:33:44:55"/>
       <model type="virtio"/>
@@ -113,7 +113,7 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="user">
       <mac address="00:11:22:33:44:55"/>
       <model type="virtio"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-win10.xml b/tests/cli-test-xml/compare/virt-install-kvm-win10.xml
index 39c4abe7..9197de73 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-win10.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-win10.xml
@@ -49,7 +49,7 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -120,7 +120,7 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml b/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml
index 8b6d1896..f5bef098 100644
--- a/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml
+++ b/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml
@@ -49,7 +49,7 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0"/>
+    <controller type="usb"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -120,7 +120,7 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0"/>
+    <controller type="usb"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-location-iso.xml b/tests/cli-test-xml/compare/virt-install-location-iso.xml
index f62171fd..e8bf472b 100644
--- a/tests/cli-test-xml/compare/virt-install-location-iso.xml
+++ b/tests/cli-test-xml/compare/virt-install-location-iso.xml
@@ -43,14 +43,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <console type="pty"/>
@@ -118,14 +118,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <console type="pty"/>
diff --git a/tests/cli-test-xml/compare/virt-install-location-manual-kernel.xml b/tests/cli-test-xml/compare/virt-install-location-manual-kernel.xml
index 6a37c996..1e847d29 100644
--- a/tests/cli-test-xml/compare/virt-install-location-manual-kernel.xml
+++ b/tests/cli-test-xml/compare/virt-install-location-manual-kernel.xml
@@ -33,14 +33,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -95,14 +95,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml
index cfedeef2..5370a2ff 100644
--- a/tests/cli-test-xml/compare/virt-install-many-devices.xml
+++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml
@@ -232,10 +232,10 @@
       <master startport="4"/>
       <address type="pci" domain="0" bus="0" slot="4" function="2"/>
     </controller>
-    <controller type="scsi" index="0" model="virtio-scsi">
+    <controller type="scsi" model="virtio-scsi">
       <driver queues="4" iothread="2"/>
     </controller>
-    <controller type="xenbus" index="0" maxGrantFrames="64"/>
+    <controller type="xenbus" maxGrantFrames="64"/>
     <filesystem type="mount" accessmode="mapped">
       <driver ats="on" iommu="off"/>
       <alias name="testfsalias"/>
diff --git a/tests/cli-test-xml/compare/virt-install-memory-hotplug.xml b/tests/cli-test-xml/compare/virt-install-memory-hotplug.xml
index 1cf852f4..897a6c47 100644
--- a/tests/cli-test-xml/compare/virt-install-memory-hotplug.xml
+++ b/tests/cli-test-xml/compare/virt-install-memory-hotplug.xml
@@ -23,14 +23,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -87,14 +87,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-memory-option-backcompat.xml b/tests/cli-test-xml/compare/virt-install-memory-option-backcompat.xml
index f5fe5e4c..ebb2e923 100644
--- a/tests/cli-test-xml/compare/virt-install-memory-option-backcompat.xml
+++ b/tests/cli-test-xml/compare/virt-install-memory-option-backcompat.xml
@@ -20,14 +20,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -58,14 +58,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-network-install-resources.xml b/tests/cli-test-xml/compare/virt-install-network-install-resources.xml
index c77c8e3a..03595873 100644
--- a/tests/cli-test-xml/compare/virt-install-network-install-resources.xml
+++ b/tests/cli-test-xml/compare/virt-install-network-install-resources.xml
@@ -32,7 +32,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -80,7 +80,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-openbsd-defaults.xml b/tests/cli-test-xml/compare/virt-install-openbsd-defaults.xml
index a5ca017a..ecaf1270 100644
--- a/tests/cli-test-xml/compare/virt-install-openbsd-defaults.xml
+++ b/tests/cli-test-xml/compare/virt-install-openbsd-defaults.xml
@@ -35,14 +35,14 @@
       <source file="/var/lib/libvirt/images/disk.qcow2"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-multiple-short-id.xml b/tests/cli-test-xml/compare/virt-install-osinfo-multiple-short-id.xml
index 91c4a062..13d9a59d 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-multiple-short-id.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-multiple-short-id.xml
@@ -36,7 +36,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -89,7 +89,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-netinst-unattended.xml b/tests/cli-test-xml/compare/virt-install-osinfo-netinst-unattended.xml
index 43a44663..e61db7b8 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-netinst-unattended.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-netinst-unattended.xml
@@ -38,7 +38,7 @@
       <target dev="sda" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -90,7 +90,7 @@
       <target dev="sda" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-url-unattended.xml b/tests/cli-test-xml/compare/virt-install-osinfo-url-unattended.xml
index 4a6311f7..35f3c6ca 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-url-unattended.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-url-unattended.xml
@@ -32,7 +32,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -80,7 +80,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-url-with-disk.xml b/tests/cli-test-xml/compare/virt-install-osinfo-url-with-disk.xml
index b32b88da..37b7e575 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-url-with-disk.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-url-with-disk.xml
@@ -42,7 +42,7 @@
       <source file="/var/lib/libvirt/images/disk.qcow2"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -100,7 +100,7 @@
       <source file="/var/lib/libvirt/images/disk.qcow2"/>
       <target dev="vdb" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-url.xml b/tests/cli-test-xml/compare/virt-install-osinfo-url.xml
index 962c4bdd..68a7932c 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-url.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-url.xml
@@ -32,7 +32,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -80,7 +80,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-osinfo-win7-unattended.xml b/tests/cli-test-xml/compare/virt-install-osinfo-win7-unattended.xml
index 19cbe3b9..5136e5f1 100644
--- a/tests/cli-test-xml/compare/virt-install-osinfo-win7-unattended.xml
+++ b/tests/cli-test-xml/compare/virt-install-osinfo-win7-unattended.xml
@@ -48,14 +48,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -121,14 +121,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-osvariant-defaults-pxe.xml b/tests/cli-test-xml/compare/virt-install-osvariant-defaults-pxe.xml
index 8c6691e0..f07b7ca4 100644
--- a/tests/cli-test-xml/compare/virt-install-osvariant-defaults-pxe.xml
+++ b/tests/cli-test-xml/compare/virt-install-osvariant-defaults-pxe.xml
@@ -30,14 +30,14 @@
       <source file="/var/lib/libvirt/images/fedora26.qcow2"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -90,14 +90,14 @@
       <source file="/var/lib/libvirt/images/fedora26.qcow2"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-graphics.xml b/tests/cli-test-xml/compare/virt-install-ppc64-graphics.xml
index f65d95bc..4a8640fc 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-graphics.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-graphics.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml b/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml
index 37aa13d5..a8434510 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-headless.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml b/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
index 80810ba3..2f5cdc33 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <console type="pty"/>
     <channel type="unix">
       <source mode="bind"/>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml b/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
index 787042dd..1960448b 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml
@@ -25,8 +25,8 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <console type="pty"/>
     <channel type="unix">
       <source mode="bind"/>
diff --git a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
index 262178be..e9339ac5 100644
--- a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
+++ b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-q35-defaults.xml b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml
index 4a6e68ba..d75e2869 100644
--- a/tests/cli-test-xml/compare/virt-install-q35-defaults.xml
+++ b/tests/cli-test-xml/compare/virt-install-q35-defaults.xml
@@ -38,14 +38,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -105,14 +105,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml b/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml
index d06ab456..19955f0e 100644
--- a/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml
+++ b/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml
@@ -30,7 +30,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-qemu-plain.xml b/tests/cli-test-xml/compare/virt-install-qemu-plain.xml
index 9607f955..af3948d9 100644
--- a/tests/cli-test-xml/compare/virt-install-qemu-plain.xml
+++ b/tests/cli-test-xml/compare/virt-install-qemu-plain.xml
@@ -32,14 +32,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-riscv64-graphics.xml b/tests/cli-test-xml/compare/virt-install-riscv64-graphics.xml
index eff7a274..200d5a28 100644
--- a/tests/cli-test-xml/compare/virt-install-riscv64-graphics.xml
+++ b/tests/cli-test-xml/compare/virt-install-riscv64-graphics.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-riscv64-headless.xml b/tests/cli-test-xml/compare/virt-install-riscv64-headless.xml
index a0bb7c1b..b7863bc8 100644
--- a/tests/cli-test-xml/compare/virt-install-riscv64-headless.xml
+++ b/tests/cli-test-xml/compare/virt-install-riscv64-headless.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml b/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
index 803fc755..a2e40ec2 100644
--- a/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
+++ b/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
@@ -28,7 +28,7 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml b/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml
index c4424565..7161a1d0 100644
--- a/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml
+++ b/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml
@@ -28,7 +28,7 @@
       <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-simple-pxe.xml b/tests/cli-test-xml/compare/virt-install-simple-pxe.xml
index dbc547e5..577470a0 100644
--- a/tests/cli-test-xml/compare/virt-install-simple-pxe.xml
+++ b/tests/cli-test-xml/compare/virt-install-simple-pxe.xml
@@ -19,14 +19,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
@@ -56,14 +56,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/test-hv</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="user">
diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
index 2e0bfa2e..518a0099 100644
--- a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
+++ b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
@@ -61,14 +61,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <input type="tablet" bus="usb"/>
diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
index 9c436a37..117a1076 100644
--- a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
+++ b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
@@ -173,8 +173,8 @@
   </pm>
   <devices>
     <emulator>/new/emu</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <filesystem type="mount" accessmode="mapped">
       <source dir="/foo/source"/>
       <target dir="/bar/target"/>
@@ -414,8 +414,8 @@
   </pm>
   <devices>
     <emulator>/new/emu</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
-    <controller type="scsi" index="0" model="virtio-scsi"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
+    <controller type="scsi" model="virtio-scsi"/>
     <filesystem type="mount" accessmode="mapped">
       <source dir="/foo/source"/>
       <target dir="/bar/target"/>
diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-3.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-3.xml
index 9ecc9f05..cc26ff3b 100644
--- a/tests/cli-test-xml/compare/virt-install-singleton-config-3.xml
+++ b/tests/cli-test-xml/compare/virt-install-singleton-config-3.xml
@@ -90,7 +90,7 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-w2k3-cdrom.xml b/tests/cli-test-xml/compare/virt-install-w2k3-cdrom.xml
index f50561ee..12154ebd 100644
--- a/tests/cli-test-xml/compare/virt-install-w2k3-cdrom.xml
+++ b/tests/cli-test-xml/compare/virt-install-w2k3-cdrom.xml
@@ -42,7 +42,7 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="none"/>
+    <controller type="usb" model="none"/>
     <interface type="user">
       <mac address="00:11:22:33:44:55"/>
       <model type="e1000"/>
@@ -92,7 +92,7 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="none"/>
+    <controller type="usb" model="none"/>
     <interface type="user">
       <mac address="00:11:22:33:44:55"/>
       <model type="e1000"/>
diff --git a/tests/cli-test-xml/compare/virt-install-win7-uefi.xml b/tests/cli-test-xml/compare/virt-install-win7-uefi.xml
index 94b9d9e0..6a341f5e 100644
--- a/tests/cli-test-xml/compare/virt-install-win7-uefi.xml
+++ b/tests/cli-test-xml/compare/virt-install-win7-uefi.xml
@@ -45,14 +45,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
@@ -121,14 +121,14 @@
       <target dev="sdb" bus="sata"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-x86_64-graphics.xml b/tests/cli-test-xml/compare/virt-install-x86_64-graphics.xml
index 85349b83..ea9b184f 100644
--- a/tests/cli-test-xml/compare/virt-install-x86_64-graphics.xml
+++ b/tests/cli-test-xml/compare/virt-install-x86_64-graphics.xml
@@ -34,7 +34,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml b/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml
index 5014e3ca..8234c958 100644
--- a/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml
+++ b/tests/cli-test-xml/compare/virt-install-x86_64-headless.xml
@@ -34,7 +34,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="vda" bus="virtio"/>
     </disk>
-    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
+    <controller type="usb" model="qemu-xhci" ports="15"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev-full.xml b/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev-full.xml
index c65fb660..b58294ed 100644
--- a/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev-full.xml
+++ b/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev-full.xml
@@ -26,14 +26,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev.xml b/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev.xml
index 529a3b2f..21355954 100644
--- a/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev.xml
+++ b/tests/cli-test-xml/compare/virt-install-x86_64-launch-security-sev.xml
@@ -26,14 +26,14 @@
   </pm>
   <devices>
     <emulator>/usr/bin/qemu-kvm</emulator>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/cli-test-xml/compare/virt-install-xen-pv.xml b/tests/cli-test-xml/compare/virt-install-xen-pv.xml
index 9d55dca5..e5d961d4 100644
--- a/tests/cli-test-xml/compare/virt-install-xen-pv.xml
+++ b/tests/cli-test-xml/compare/virt-install-xen-pv.xml
@@ -21,7 +21,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="xvda" bus="xen"/>
     </disk>
-    <controller type="xenbus" index="0" maxGrantFrames="64"/>
+    <controller type="xenbus" maxGrantFrames="64"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
@@ -52,7 +52,7 @@
       <source file="/dev/default-pool/testvol1.img"/>
       <target dev="xvda" bus="xen"/>
     </disk>
-    <controller type="xenbus" index="0" maxGrantFrames="64"/>
+    <controller type="xenbus" maxGrantFrames="64"/>
     <interface type="bridge">
       <source bridge="testsuitebr0"/>
       <mac address="00:11:22:33:44:55"/>
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt
index ad30c7f8..d87da76f 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt
@@ -30,14 +30,14 @@
       <source file="/var/lib/libvirt/images/CentOS-6.4-i386-Gnome-disk1"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt
index e7bf08a7..45bfa98f 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt
@@ -36,14 +36,14 @@
       <source file="/var/lib/libvirt/images/testfile"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2
index 081b1c17..dbcdc9b6 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2
@@ -36,14 +36,14 @@
       <source file="/var/lib/libvirt/images/testfile.qcow2"/>
       <target dev="hda" bus="ide"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt
index 55aec028..0708f02c 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt
@@ -31,14 +31,14 @@
       <source file="/var/lib/libvirt/images/w2k3_32bit-disk1"/>
       <target dev="sda" bus="scsi"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt
index 01bf0705..4cd7753a 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt
@@ -30,14 +30,14 @@
       <source file="/var/lib/libvirt/images/test_gzip.ovf-disk1.vmdk"/>
       <target dev="sda" bus="scsi"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw
index a7e7e4ab..5ca90e78 100644
--- a/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw
+++ b/tests/virtconv-files/libvirt_output/ovf2libvirt_test_gzip.libvirt.disk_raw
@@ -30,14 +30,14 @@
       <source file="/var/lib/libvirt/images/test_gzip.ovf-disk1.vmdk.raw"/>
       <target dev="sda" bus="scsi"/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt
index f5d68bdb..8e455b77 100644
--- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt
+++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt
@@ -29,14 +29,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
index 8fc8d941..1bd17f87 100644
--- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
+++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
@@ -35,14 +35,14 @@
       <target dev="hdb" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt
index 3d6dda05..6769a876 100644
--- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt
+++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt
@@ -34,14 +34,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw
index 922f7d69..07fc6aa3 100644
--- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw
+++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw
@@ -34,14 +34,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt
index b8dd9cbb..91e5d78c 100644
--- a/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt
+++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt
@@ -34,14 +34,14 @@
       <target dev="hda" bus="ide"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <interface type="bridge">
diff --git a/tests/xmlparse-xml/replace-child-build.xml b/tests/xmlparse-xml/replace-child-build.xml
index 807a65e6..9a697893 100644
--- a/tests/xmlparse-xml/replace-child-build.xml
+++ b/tests/xmlparse-xml/replace-child-build.xml
@@ -39,14 +39,14 @@
       <target dev="sdf" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <console type="pty"/>
diff --git a/tests/xmlparse-xml/replace-child-parse.xml b/tests/xmlparse-xml/replace-child-parse.xml
index 247a66cd..7e463474 100644
--- a/tests/xmlparse-xml/replace-child-parse.xml
+++ b/tests/xmlparse-xml/replace-child-parse.xml
@@ -38,14 +38,14 @@
       <target dev="sdf" bus="scsi"/>
       <readonly/>
     </disk>
-    <controller type="usb" index="0" model="ich9-ehci1"/>
-    <controller type="usb" index="0" model="ich9-uhci1">
+    <controller type="usb" model="ich9-ehci1"/>
+    <controller type="usb" model="ich9-uhci1">
       <master startport="0"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci2">
+    <controller type="usb" model="ich9-uhci2">
       <master startport="2"/>
     </controller>
-    <controller type="usb" index="0" model="ich9-uhci3">
+    <controller type="usb" model="ich9-uhci3">
       <master startport="4"/>
     </controller>
     <console type="pty"/>
diff --git a/virtinst/devices/controller.py b/virtinst/devices/controller.py
index 114d8b39..22e1311f 100644
--- a/virtinst/devices/controller.py
+++ b/virtinst/devices/controller.py
@@ -77,12 +77,3 @@ class DeviceController(Device):
     driver_queues = XMLProperty("./driver/@queues", is_int=True)
 
     master_startport = XMLProperty("./master/@startport", is_int=True)
-
-
-    ##################
-    # Default config #
-    ##################
-
-    def set_defaults(self, _guest):
-        if self.index is None:
-            self.index = 0
-- 
2.23.0




More information about the virt-tools-list mailing list