]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Auto-add disk controllers based on defined disks
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Jan 2010 13:31:20 +0000 (13:31 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 18 Jan 2010 13:35:40 +0000 (13:35 +0000)
Existing applications using libvirt are not aware of the disk
controller concept. Thus, after parsing the <disk> definitions
in the XML, it is neccessary to create <controller> elements
to satisfy all requested disks, as per their defined drive
addresses

* src/conf/domain_conf.c, src/conf/domain_conf.h,
  src/libvirt_private.syms: Add virDomainDefAddDiskControllers()
  method for populating disk controllers, and call it after
  parsing disk definitions.
* src/qemu/qemu_conf.c: Call virDomainDefAddDiskControllers()
  when doing ARGV -> XML conversion
* tests/qemuxml2argvdata/qemuxml2argv*.xml: Add disk controller
  data to all data files which don't have it already

80 files changed:
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_conf.c
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml
tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
tests/qemuxml2argvdata/qemuxml2argv-sound.xml
tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml

index d2da072fc723d0d8704d8a770e1953e2f390b226..b3b102b3a60917f51e88db304f066b5699165e93 100644 (file)
@@ -3547,6 +3547,12 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
     }
     VIR_FREE(nodes);
 
+    /* Auto-add any further disk controllers implied by declared <disk>
+     * elements, but not present as <controller> elements
+     */
+    if (virDomainDefAddDiskControllers(def) < 0)
+        goto error;
+
     /* analysis of the filesystems */
     if ((n = virXPathNodeSet(conn, "./devices/filesystem", ctxt, &nodes)) < 0) {
         virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
@@ -4147,6 +4153,96 @@ cleanup:
     return obj;
 }
 
+static int virDomainDefMaybeAddDiskController(virDomainDefPtr def,
+                                              int type,
+                                              int idx)
+{
+    int found = 0;
+    int i;
+    virDomainControllerDefPtr cont;
+
+    for (i = 0 ; (i < def->ncontrollers) && !found; i++) {
+        if (def->controllers[i]->type == type &&
+            def->controllers[i]->idx == idx)
+            found = 1;
+    }
+
+    if (found)
+        return 0;
+
+    if (VIR_ALLOC(cont) < 0) {
+        virReportOOMError(NULL);
+        return -1;
+    }
+
+    cont->type = type;
+    cont->idx = idx;
+
+    if (VIR_REALLOC_N(def->controllers, def->ncontrollers+1) < 0) {
+        VIR_FREE(cont);
+        virReportOOMError(NULL);
+        return -1;
+    }
+    def->controllers[def->ncontrollers] = cont;
+    def->ncontrollers++;
+
+    return 0;
+}
+
+static int virDomainDefAddDiskControllersForType(virDomainDefPtr def,
+                                                 int controllerType,
+                                                 int diskBus)
+{
+    int i;
+    int maxController = -1;
+
+    for (i = 0 ; i < def->ndisks ; i++) {
+        if (def->disks[i]->bus != diskBus)
+            continue;
+
+        if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)
+            continue;
+
+        if ((int)def->disks[i]->info.addr.drive.controller > maxController)
+            maxController = def->disks[i]->info.addr.drive.controller;
+    }
+
+    for (i = 0 ; i <= maxController ; i++) {
+        if (virDomainDefMaybeAddDiskController(def, controllerType, i) < 0)
+            return -1;
+    }
+
+    return 0;
+}
+
+
+/*
+ * Based on the declared <address type=drive> info for any disks,
+ * add neccessary drive controllers which are not already present
+ * in the XML. This is for compat with existing apps which will
+ * not know/care about <controller> info in the XML
+ */
+int virDomainDefAddDiskControllers(virDomainDefPtr def)
+{
+    if (virDomainDefAddDiskControllersForType(def,
+                                              VIR_DOMAIN_CONTROLLER_TYPE_SCSI,
+                                              VIR_DOMAIN_DISK_BUS_SCSI) < 0)
+        return -1;
+
+    if (virDomainDefAddDiskControllersForType(def,
+                                              VIR_DOMAIN_CONTROLLER_TYPE_FDC,
+                                              VIR_DOMAIN_DISK_BUS_FDC) < 0)
+        return -1;
+
+    if (virDomainDefAddDiskControllersForType(def,
+                                              VIR_DOMAIN_CONTROLLER_TYPE_IDE,
+                                              VIR_DOMAIN_DISK_BUS_IDE) < 0)
+        return -1;
+
+    return 0;
+}
+
+
 #endif /* ! PROXY */
 
 /************************************************************************
index 9f2271ca3fcd232192de40562e43140c5df7d3d3..1831d17bcd253157969d1959e2fa2da7915ca186 100644 (file)
@@ -776,6 +776,8 @@ virDomainObjPtr virDomainObjParseNode(virConnectPtr conn,
                                       xmlDocPtr xml,
                                       xmlNodePtr root);
 
+int virDomainDefAddDiskControllers(virDomainDefPtr def);
+
 #endif
 char *virDomainDefFormat(virConnectPtr conn,
                          virDomainDefPtr def,
index 39267e8e86d258c9888b18da594540756b3f9acc..0d1a82ca51573cf794e097be4730a546c7b4029f 100644 (file)
@@ -186,6 +186,7 @@ virDomainDeviceAddressClear;
 virDomainControllerTypeToString;
 virDomainControllerDefFree;
 virDomainDeviceAddressTypeToString;
+virDomainDefAddDiskControllers;
 
 
 # domain_event.h
index d2a673d179949bad40258a6b507b14091a6ae63c..6414bd0c419a4c74deefeb2bef4294d6a1fa63e4 100644 (file)
@@ -4450,6 +4450,9 @@ virDomainDefPtr qemuParseCommandLine(virConnectPtr conn,
             goto no_memory;
     }
 
+    if (virDomainDefAddDiskControllers(def) < 0)
+        goto error;
+
     return def;
 
 no_memory:
index 6915145bb94a3b83830331f0ae079f39aa976738..cf0d3df58c56e7ad63fa994d53517aa11e4dcdc1 100644 (file)
@@ -20,5 +20,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 0b6b084b218d7ca6df0996784bb343db8c16545f..cf3c5a8fd5f3ee04f2bd8bfb56459329a2169af5 100644 (file)
@@ -24,5 +24,7 @@
       <target dev='fda' bus='fdc'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='fdc' index='0'/>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 4de216e50e48ea7c359c43705d9ea427bf3eb595..a28372dc3eab41b75460578e5bd4d82eed22cac7 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 0501fd42d4aded93496894204e80cd6537de9938..4af280c5f1f1052a600b9e5f659aa54ffbd3a8cb 100644 (file)
@@ -20,5 +20,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index aeba5be1cebaca71b5eca440aa29d76c2c4b9791..8963350fadf7628f5df82d5bed44e901283da988 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <channel type='pipe'>
       <source path='/tmp/guestfwd'/>
       <target type='guestfwd' address='10.0.2.1' port='4600'/>
index 1db0d02eac3177251e9c6862526117858249e329..345ae22e9bb0af264b066319b3d811e51ea477e1 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 9e9153f4658049851b4747c6eee4b5e10b944793..533ea59b307ef25a18985ebc5d624249ca0794d9 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 1f8f1267b94b0376a189bb726bd5c17bdc408b8e..df694c78cdbfaa7dfad478dbc02c329e82e5eb0c 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index 1f8f1267b94b0376a189bb726bd5c17bdc408b8e..df694c78cdbfaa7dfad478dbc02c329e82e5eb0c 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index ff315e117df2bf6705a09c665db8af12fae90b70..addbbf116671af6b0ac8c67fdd49bebacddacb38 100644 (file)
@@ -24,5 +24,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 097d3dd8563adb65b3b003186677132d7b60f989..9c10551c4116c5efcdc7c34c4af66d53990827e1 100644 (file)
@@ -25,5 +25,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 743e996483083b06c2bf3b2a4f2b787b9877eb47..736e189e7cd62f26e7743f3a7e4a38d8e44024f9 100644 (file)
@@ -24,5 +24,6 @@
       <target dev='hdc' bus='ide'/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index c1d3f4a75e83f1c36683dbe542bb4d96a355cfd0..c379f3185533ce2db9b4244b67db13a9493b3b28 100644 (file)
@@ -24,5 +24,6 @@
       <target dev='hdc' bus='ide'/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 706b6e25f9cb43553837b7f3e27d22394a185879..e689d9cad2dfe5f4968e90c9566ecec96e0487f0 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 4d3fb0c49f74b640ee91252ddb3e2334d818ef05..be00c4c81c5559d08b63917180773514e1ae8db4 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index b81f1a4dd02996ead29a8bb7242ab36c2995683e..edf776a3999be542712284421cad868fa2b5fb4f 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 706b6e25f9cb43553837b7f3e27d22394a185879..e689d9cad2dfe5f4968e90c9566ecec96e0487f0 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 4d3fb0c49f74b640ee91252ddb3e2334d818ef05..be00c4c81c5559d08b63917180773514e1ae8db4 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index b81f1a4dd02996ead29a8bb7242ab36c2995683e..edf776a3999be542712284421cad868fa2b5fb4f 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 0a13d191c18e814a16eb18188a4a684765168041..b2b1b4ec1e48575f8ce5a9e12d35140f44bbffdb 100644 (file)
@@ -21,5 +21,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 5c1d4563ad6970bd913f54c073ede1d9e2d197ce..0b04e69d9097dd708e72904cfa0fca024d211b81 100644 (file)
@@ -27,5 +27,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 774decd3d0722d29dd2f6de48070223e3cb8ff73..47afcd710cad19b80c66b6ff0ea1fb2b9610272a 100644 (file)
@@ -29,5 +29,6 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 37d178d38bb5662a6324bf22ab07220037ca922c..35474beb1eccc51e6b7881a385e0b5a4376e98f7 100644 (file)
@@ -29,5 +29,7 @@
       <target dev='fdb' bus='fdc'/>
       <address type='drive' controller='0' bus='0' unit='1'/>
     </disk>
+    <controller type='fdc' index='0'/>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 6f9b70510ed6d5650b6a8e3271d02ab132ce2d49..467fa5d65b74e5a5960d5b4505f29e0165692399 100644 (file)
@@ -34,5 +34,6 @@
       <target dev='hdd' bus='ide'/>
       <address type='drive' controller='0' bus='1' unit='1'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 3b86a114fc3fb209c8d3733508dafb1dff91473c..8148626ad579a09c5f3cb9871070b484abc67879 100644 (file)
@@ -23,5 +23,6 @@
       <source file='/tmp/usbdisk.img'/>
       <target dev='sda' bus='usb'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index c6cf30021688d72f9d9231702cdc7c50bfa0f6df..23930731f22f33b1dfc182c871ca546b9d833b02 100644 (file)
@@ -33,5 +33,6 @@
       <source file='/tmp/logs.img'/>
       <target dev='vdb' bus='virtio'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 17cc4080967be4aad6adaa96097e955aca2f5761..0c364576016bb96bab8f6f79870e5ab2cf1e13af 100644 (file)
@@ -33,5 +33,6 @@
       <source file='/tmp/logs.img'/>
       <target dev='xvdg' bus='xen'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 7bc09fa836dcf1c0d180215da0bb025c93f8ac23..6da210d09709ba7f0891bac2c9fe923a32de64b7 100644 (file)
@@ -21,5 +21,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
+    <controller type='fdc' index='0'/>
   </devices>
 </domain>
index 8508be593d86e92c1ca6b37df2809d87b094bfcb..dcecd47d3d60aa964f7887a605070d49f9244602 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
     <video>
index c83587b6d3b4874c585f90c3a7d3e2b9580620c3..f691bfeca55525e4b1ae2cda67849af192924fb1 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
     <video>
index 15b561f29c21928a121a567401ccac6357f5d5a4..da0f3c68af3c59aeeb39e8ec089835c1078f5315 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
     <video>
index 15b561f29c21928a121a567401ccac6357f5d5a4..da0f3c68af3c59aeeb39e8ec089835c1078f5315 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
     <video>
index 15b561f29c21928a121a567401ccac6357f5d5a4..da0f3c68af3c59aeeb39e8ec089835c1078f5315 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
     <video>
index 7c7e5486269323924f67667d865b8a07b99fd006..cb039af7839c108fe78f96d995e40faefcc74c7d 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <hostdev mode='subsystem' type='pci' managed='yes'>
       <source>
         <address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
index 08d78e6f8ca93fccf54bb1259bdb413dab791459..c7d0d919f337037396304608fb61f02f22d34f10 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <hostdev mode='subsystem' type='usb' managed='no'>
       <source>
         <address bus='14' device='6'/>
index 85a822b0a325504f3f24e3211ae57916949b832a..3dc8eeb980d7aecb26f7178dc8f34cf077d6bf6a 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <hostdev mode='subsystem' type='usb' managed='no'>
       <source>
         <vendor id='0x0204'/>
index 92f2c47e2e544b0ac0eb4028e05c861c17f9559b..2e4b75fa68d34da7c160939cccf7a1c911b6599d 100644 (file)
@@ -22,5 +22,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index d036eb4d60b53ebf7af90878f412e47dad2a240b..8603d1bcbaeace481be32bc64e110471bae2cb21 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='usb'/>
   </devices>
 </domain>
index 82fd363ac7be5e6b848e3d79d6389429f326ca56..6c2a41b70a1353ccfb8b73c3f94517fc4e99cf83 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='tablet' bus='usb'/>
   </devices>
 </domain>
index 9976a56ed2aae27ef8c010504e304ac9b0bd1688..91dd79524c9a7e3a8f151dbdf857e28f76f6aafd 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='xen'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
     <video>
index eca3a6ffeafad9e21097be7dda66495424f9f0b7..268954d0d91768304d483379164b2c778cafacc2 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index b50e409d3724fad7183d566c8ddd5b76262fc58e..354b1d5d7cd1a31dbff75b58354478d1b652f379 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 9e9153f4658049851b4747c6eee4b5e10b944793..533ea59b307ef25a18985ebc5d624249ca0794d9 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 78b578b277f4bd9c0c7662b1bebafced65f18fd2..334a9f99c390d41f4bcb963146469d67fdf70ef2 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index fe0a00e3d9b143a34e7e08ca3fbab322cdd1704b..474832d05331326081672d6c052865cc68afbf3c 100644 (file)
@@ -22,5 +22,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 2c5307899477f2741defe677c2dde67f9390e82a..f75722ffccfdcbf2a48753b18a7ba60d8745e1c0 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index fe0a00e3d9b143a34e7e08ca3fbab322cdd1704b..474832d05331326081672d6c052865cc68afbf3c 100644 (file)
@@ -22,5 +22,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 08aaa358fe9673ea46b13e1affbe7bc22795c5c2..e24cd997ba2990e7c03863793fc5844c41292a22 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
index c52d55bbdbcbc8c0893967f7eb1b3a86b657dad6..105d3f629253db66e2cef870a361e3823fcf1b4f 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
index 9aba26eefca7ddca9506d8d63c99fd336ff9fbd7..27238fc75a61f14e304d15546af7cc0c586f0418 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
index 3abda1c31fa7afb3b22689ff382f617f67bc1d14..525593dc8cf6ddfdd1cd0a9e3b7e9a9a278a80e7 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
     </interface>
index 4eac6866cbb79ff6f671c84c187f62d37d60fbca..f8d9acfb6f60ce91d89be1201cb353a03d22fb14 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='virtio'/>
index ab675b6d14a6b9481da0bcb359ccd8051484155b..96a1ca5a17e8ab873945109fb7ec2594bcb19fad 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <parallel type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
index ab675b6d14a6b9481da0bcb359ccd8051484155b..96a1ca5a17e8ab873945109fb7ec2594bcb19fad 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <parallel type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
index 9e9153f4658049851b4747c6eee4b5e10b944793..533ea59b307ef25a18985ebc5d624249ca0794d9 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 9e9153f4658049851b4747c6eee4b5e10b944793..533ea59b307ef25a18985ebc5d624249ca0794d9 100644 (file)
@@ -19,5 +19,6 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
   </devices>
 </domain>
index 06c40e8c6dab1524aabbf6aebc1b10fbb3d6e35a..ae906c25bc735a68802018de87f303fa1968d976 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
       <target port='0'/>
index 06c40e8c6dab1524aabbf6aebc1b10fbb3d6e35a..ae906c25bc735a68802018de87f303fa1968d976 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
       <target port='0'/>
index 7c2cc030627dde8743e7371db660255205d612a2..bdc483ffc7523b1a40134ee6a906ab0243692099 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
       <target port='0'/>
index 7c2cc030627dde8743e7371db660255205d612a2..bdc483ffc7523b1a40134ee6a906ab0243692099 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
       <target port='0'/>
index 4021129ce54d8acb9e2c413c41f6b20785a24202..38a9498faa31fb037974ec2fe2b3af39b2475156 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index 4021129ce54d8acb9e2c413c41f6b20785a24202..38a9498faa31fb037974ec2fe2b3af39b2475156 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index 1f8f1267b94b0376a189bb726bd5c17bdc408b8e..df694c78cdbfaa7dfad478dbc02c329e82e5eb0c 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index 1f8f1267b94b0376a189bb726bd5c17bdc408b8e..df694c78cdbfaa7dfad478dbc02c329e82e5eb0c 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
index 5d14515eda2f0c5499b24909bfaadf15e0931d42..a8a35267133fe34601e06a217394b72b1327500e 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
index 1f940db9859b6bb0c600a31b2764bf15b4f135ca..fb8004214eda26036dab1208271681f17e379e0b 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='telnet'/>
index 1f940db9859b6bb0c600a31b2764bf15b4f135ca..fb8004214eda26036dab1208271681f17e379e0b 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='telnet'/>
index 5d14515eda2f0c5499b24909bfaadf15e0931d42..a8a35267133fe34601e06a217394b72b1327500e 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
index addf09372b3718520aee6d7f367f29f1729c2fd8..01dba47c88f53e34168011a6a205d2862a5f3e85 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <source mode='connect' host='127.0.0.1' service='9998'/>
index addf09372b3718520aee6d7f367f29f1729c2fd8..01dba47c88f53e34168011a6a205d2862a5f3e85 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <source mode='connect' host='127.0.0.1' service='9998'/>
index 81884a1225032839bbcb0c39d73d5f97b66a2baf..7b90d7b3c51d1cfa12b5f51515ad40d0d041abe0 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
       <target port='0'/>
index 81884a1225032839bbcb0c39d73d5f97b66a2baf..7b90d7b3c51d1cfa12b5f51515ad40d0d041abe0 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
       <target port='0'/>
index 0a1980cfd8c6a50780aa3ea14e70154b775701e3..76b3e2abc89a96362e5588319854914cc247a0c7 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='vc'>
       <target port='0'/>
     </serial>
index 0a1980cfd8c6a50780aa3ea14e70154b775701e3..76b3e2abc89a96362e5588319854914cc247a0c7 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <serial type='vc'>
       <target port='0'/>
     </serial>
index 3327c19acf1ffc35a91df75c8f4643f96ddf1ee9..85f81cefaf7b076c0a3eaebcc9050446f4ca0c2f 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <sound model='pcspk'/>
     <sound model='es1370'/>
     <sound model='sb16'/>
index 52ff1177c0563bfafadfbdf907cdd9444f1e5027..07d2c14269daa423bc8a46c2f2c5b069f371bbb8 100644 (file)
@@ -19,6 +19,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' unit='0'/>
     </disk>
+    <controller type='ide' index='0'/>
     <watchdog model='ib700' action='poweroff'/>
   </devices>
 </domain>