On Wed, Mar 14, 2012 at 11:26:47PM +0800, Osier Yang wrote: > The "tray" is only allowed for removable disks, i.e. CDROM and > Floppy disks. > > As the value for "tray" defaults to "closed", lots of tests are > updated to include "tray='closed'" in the disk target XML. I tend to think "tray='closed'" should be ommited since it's the default value, no need to serialize it out systematically > src/conf/domain_conf.c | 33 +++++++++++++++++++- > src/conf/domain_conf.h | 9 +++++ > tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml | 2 +- > .../qemuxml2argv-boot-complex-bootindex.xml | 6 ++-- > .../qemuxml2argvdata/qemuxml2argv-boot-complex.xml | 6 ++-- > .../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 2 +- > ...uxml2argv-boot-menu-disable-drive-bootindex.xml | 2 +- > .../qemuxml2argv-boot-menu-disable-drive.xml | 2 +- > .../qemuxml2argv-boot-menu-disable.xml | 2 +- > .../qemuxml2argv-boot-menu-enable.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml | 4 +- > tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 2 +- > .../qemuxml2argv-disk-cdrom-empty.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml | 2 +- > .../qemuxml2argv-disk-copy_on_read.xml | 2 +- > .../qemuxml2argv-disk-drive-boot-cdrom.xml | 2 +- > .../qemuxml2argv-disk-drive-boot-disk.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-directsync.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-unsafe.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v1-none.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v1-wb.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v1-wt.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v2-none.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v2-wb.xml | 2 +- > .../qemuxml2argv-disk-drive-cache-v2-wt.xml | 2 +- > ...muxml2argv-disk-drive-error-policy-enospace.xml | 2 +- > .../qemuxml2argv-disk-drive-error-policy-stop.xml | 2 +- > ...rgv-disk-drive-error-policy-wreport-rignore.xml | 2 +- > .../qemuxml2argv-disk-drive-fmt-qcow.xml | 2 +- > .../qemuxml2argv-disk-drive-no-boot.xml | 4 +- > .../qemuxml2argv-disk-drive-readonly-disk.xml | 2 +- > .../qemuxml2argv-disk-drive-readonly-no-device.xml | 2 +- > .../qemuxml2argv-disk-drive-shared.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml | 4 +- > .../qemuxml2argv-disk-ioeventfd.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml | 2 +- > .../qemuxml2argv-disk-snapshot.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 2 +- > .../qemuxml2argv-floppy-drive-fat.xml | 2 +- > .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-lease.xml | 2 +- > .../qemuxml2argv-net-bandwidth.xml | 2 +- > .../qemuxml2xmlout-graphics-spice-timeout.xml | 2 +- > tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 2 +- > tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 2 +- > tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 2 +- > tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 2 +- > tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 8 ++-- > tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 4 +- > tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 2 +- > tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 2 +- > tests/vmx2xmldata/vmx2xml-floppy-device.xml | 2 +- > tests/vmx2xmldata/vmx2xml-floppy-file.xml | 2 +- > tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml | 2 +- > tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml | 2 +- > 59 files changed, 109 insertions(+), 69 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index e2ed115..10174ab 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -624,6 +624,10 @@ VIR_ENUM_IMPL(virDomainStartupPolicy, VIR_DOMAIN_STARTUP_POLICY_LAST, > "requisite", > "optional"); > > +VIR_ENUM_IMPL(virDomainDiskTray, VIR_DOMAIN_DISK_TRAY_LAST, > + "closed", > + "open"); > + > #define virDomainReportError(code, ...) \ > virReportErrorHelper(VIR_FROM_DOMAIN, code, __FILE__, \ > __FUNCTION__, __LINE__, __VA_ARGS__) > @@ -3307,6 +3311,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, > char *authUsage = NULL; > char *authUUID = NULL; > char *usageType = NULL; > + char *tray = NULL; > > if (VIR_ALLOC(def) < 0) { > virReportOOMError(); > @@ -3415,6 +3420,7 @@ virDomainDiskDefParseXML(virCapsPtr caps, > (xmlStrEqual(cur->name, BAD_CAST "target"))) { > target = virXMLPropString(cur, "dev"); > bus = virXMLPropString(cur, "bus"); > + tray = virXMLPropString(cur, "tray"); > > /* HACK: Work around for compat with Xen > * driver in previous libvirt releases */ > @@ -3684,6 +3690,25 @@ virDomainDiskDefParseXML(virCapsPtr caps, > } > } > > + if (tray) { > + if ((def->tray_status = virDomainDiskTrayTypeFromString(tray)) < 0) { > + virDomainReportError(VIR_ERR_XML_ERROR, > + _("unknown disk tray status '%s'"), tray); > + goto error; > + } > + > + if (def->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY && > + def->device != VIR_DOMAIN_DISK_DEVICE_CDROM) { > + virDomainReportError(VIR_ERR_XML_ERROR, "%s", > + _("tray is only valid for cdrom and floppy")); > + goto error; > + } > + } else { > + if (def->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY || > + def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) > + def->tray_status = VIR_DOMAIN_DISK_TRAY_CLOSED; > + } > + > if (def->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY && > def->bus != VIR_DOMAIN_DISK_BUS_FDC) { > virDomainReportError(VIR_ERR_INTERNAL_ERROR, > @@ -10666,8 +10691,14 @@ virDomainDiskDefFormat(virBufferPtr buf, > } > } > > - virBufferAsprintf(buf, " <target dev='%s' bus='%s'/>\n", > + virBufferAsprintf(buf, " <target dev='%s' bus='%s'", > def->dst, bus); > + if (def->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY || > + def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) I would add here && (def->tray_status != VIR_DOMAIN_DISK_TRAY_CLOSED)) and keep most of the test outputs identical ! > + virBufferAsprintf(buf, " tray='%s'/>\n", > + virDomainDiskTrayTypeToString(def->tray_status)); > + else > + virBufferAddLit(buf, "/>\n"); > > /*disk I/O throttling*/ > if (def->blkdeviotune.total_bytes_sec || > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index 6da22f4..3c19534 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -451,6 +451,13 @@ enum virDomainDiskProtocol { > VIR_DOMAIN_DISK_PROTOCOL_LAST > }; > > +enum virDomainDiskTray { > + VIR_DOMAIN_DISK_TRAY_CLOSED, > + VIR_DOMAIN_DISK_TRAY_OPEN, > + > + VIR_DOMAIN_DISK_TRAY_LAST > +}; > + > typedef struct _virDomainDiskHostDef virDomainDiskHostDef; > typedef virDomainDiskHostDef *virDomainDiskHostDefPtr; > struct _virDomainDiskHostDef { > @@ -541,6 +548,7 @@ struct _virDomainDiskDef { > char *src; > virSecurityDeviceLabelDefPtr seclabel; > char *dst; > + int tray_status; > int protocol; > int nhosts; > virDomainDiskHostDefPtr hosts; > @@ -2093,6 +2101,7 @@ VIR_ENUM_DECL(virDomainDiskProtocol) > VIR_ENUM_DECL(virDomainDiskIo) > VIR_ENUM_DECL(virDomainDiskSecretType) > VIR_ENUM_DECL(virDomainDiskSnapshot) > +VIR_ENUM_DECL(virDomainDiskTray) > VIR_ENUM_DECL(virDomainIoEventFd) > VIR_ENUM_DECL(virDomainVirtioEventIdx) > VIR_ENUM_DECL(virDomainDiskCopyOnRead) > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml > index 77c73a1..d83773b 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml > @@ -16,7 +16,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml > index 3aab45e..babb33f 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex-bootindex.xml > @@ -37,17 +37,17 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/hdc'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd1'/> > - <target dev='fdb' bus='fdc'/> > + <target dev='fdb' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml > index 3aab45e..babb33f 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-complex.xml > @@ -37,17 +37,17 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/hdc'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd1'/> > - <target dev='fdb' bus='fdc'/> > + <target dev='fdb' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml > index 25490f1..f61890a 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='file' device='floppy'> > <source file='/tmp/firmware.img'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml > index f8eda91..3d085c9 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.xml > @@ -17,7 +17,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml > index f8eda91..3d085c9 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive.xml > @@ -17,7 +17,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml > index f8eda91..3d085c9 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml > @@ -17,7 +17,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml > index 89e1172..93d3bde 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable.xml > @@ -17,7 +17,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml > index eca1307..cc98ee7 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml > @@ -20,7 +20,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml > index cbbc958..d5c9dde 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml > @@ -20,7 +20,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/root/boot.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <boot order='1'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > @@ -36,7 +36,7 @@ > <disk type='file' device='floppy'> > <driver name='qemu' type='raw'/> > <source file='/dev/null'/> > - <target dev='fdb' bus='fdc'/> > + <target dev='fdb' bus='fdc' tray='closed'/> > <boot order='4'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml > index d201252..7e9126f 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml > @@ -16,7 +16,7 @@ > <emulator>/usr/bin/xenner</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/cdrom'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml > index e29b75e..82b5d20 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw' io='threads'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml > index 88f650f..7849335 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml > @@ -20,7 +20,7 @@ > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <disk type='file' device='cdrom'> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml > index 6bdd46b..1772fed 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/root/boot.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml > index 48c742b..01b0ef3 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml > @@ -23,7 +23,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml > index d137231..056a175 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml > index 5e638cd..4969a5d 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml > index 2abae66..ee44c9c 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml > index e4d29c7..9e8ad59 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml > index f3deecc..0321730 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml > index dc0d595..31cb1e6 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml > index af39de0..4419c28 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml > index 63e82f0..847a62f 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml > index 14f9a28..97c8c16 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml > index 5da9d2c..7dc6dce 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml > index d3b446b..65dd0cc 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml > index 721a5f6..26b0a29 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml > index 07a4cf7..066df48 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml > index 0fa5897..54e4e3c 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml > index 5750ab2..b24242a 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-no-boot.xml > @@ -23,12 +23,12 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml > index ab75067..a5b528b 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/sr0'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml > index ab75067..a5b528b 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/sr0'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml > index 0760afa..235a0a9 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml > @@ -25,7 +25,7 @@ > <disk type='block' device='cdrom'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml > index b9240cf..5ed9bb5 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml > @@ -21,12 +21,12 @@ > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <disk type='file' device='floppy'> > <source file='/tmp/firmware.img'/> > - <target dev='fdb' bus='fdc'/> > + <target dev='fdb' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > <controller type='usb' index='0'/> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml > index 82a6999..b5dd99d 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ioeventfd.xml > @@ -23,7 +23,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml > index 10cdee7..47e5eef 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-order.xml > @@ -16,7 +16,7 @@ > <emulator>/usr/bin/qemu</emulator> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > </disk> > <disk type='file' device='disk'> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml > index 019603d..26ea137 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml > @@ -23,7 +23,7 @@ > <disk type='block' device='cdrom' snapshot='no'> > <driver name='qemu' type='raw'/> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml > index 00111be..091c0e2 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml > index 2fa1e38..26b0af5 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/HostVG/QEMUGuest2'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml > index 5c4664c..755dcdf 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml > @@ -25,7 +25,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml > index c31bb29..04a0910 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml > @@ -17,7 +17,7 @@ > <disk type='dir' device='floppy'> > <driver name='qemu' type='fat'/> > <source dir='/var/somefiles'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml > index 8f751ff..6400292 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml > @@ -48,7 +48,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml > index c915cd7..dbfacb6 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml > @@ -21,7 +21,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/root/boot.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml > index e1cfdc6..a5e6517 100644 > --- a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml > +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml > @@ -30,7 +30,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/home/zippy/tmp/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml > index 14df58a..0a89946 100644 > --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml > +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml > @@ -48,7 +48,7 @@ > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml > index 726e4cf..ffe3e9b 100644 > --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml > +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='block' device='cdrom'> > <source dev='/dev/scd0'/> > - <target dev='hda' bus='ide'/> > + <target dev='hda' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='ide' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml > index 7fc6b3b..6c7f475 100644 > --- a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml > +++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='file' device='cdrom'> > <source file='[datastore] directory/cdrom.iso'/> > - <target dev='hda' bus='ide'/> > + <target dev='hda' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='ide' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml > index 7e823e8..30378cd 100644 > --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml > +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='block' device='cdrom'> > <source dev='/dev/scd0'/> > - <target dev='sda' bus='scsi'/> > + <target dev='sda' bus='scsi' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml > index d4179af..f6db8d7 100644 > --- a/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml > +++ b/tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='file' device='cdrom'> > <source file='[datastore] directory/cdrom.iso'/> > - <target dev='sda' bus='scsi'/> > + <target dev='sda' bus='scsi' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml > index de678c1..90147e2 100644 > --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml > +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml > @@ -20,17 +20,17 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='[datastore] directory/Debian1-cdrom.iso'/> > - <target dev='sdp' bus='scsi'/> > + <target dev='sdp' bus='scsi' tray='closed'/> > <address type='drive' controller='1' bus='0' target='0' unit='0'/> > </disk> > <disk type='file' device='cdrom'> > <source file='/vmimages/tools-isoimages/linux.iso'/> > - <target dev='hda' bus='ide'/> > + <target dev='hda' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <disk type='block' device='cdrom'> > <source dev='/dev/scd0'/> > - <target dev='hdb' bus='ide'/> > + <target dev='hdb' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > <disk type='file' device='disk'> > @@ -40,7 +40,7 @@ > </disk> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0' model='lsilogic'/> > diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml > index 4101634..d49c52f 100644 > --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml > +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml > @@ -19,12 +19,12 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Isos/debian-testing-amd64-netinst.iso'/> > - <target dev='hda' bus='ide'/> > + <target dev='hda' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <disk type='file' device='floppy'> > <source file='[498076b2-02796c1a-ef5b-000ae484a6a3] Debian2/dummy.flp'/> > - <target dev='fdb' bus='fdc'/> > + <target dev='fdb' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='1'/> > </disk> > <controller type='scsi' index='0' model='lsilogic'/> > diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml > index e1b7040..654b645 100644 > --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml > +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml > @@ -26,7 +26,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='[4af0231d-1eff559a-6369-0024e84773b6] isos/CentOS-5.5-x86_64-bin-DVD-1of2.iso'/> > - <target dev='hda' bus='ide'/> > + <target dev='hda' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0' model='lsilogic'/> > diff --git a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml > index 5583cff..0f42ad7 100644 > --- a/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml > +++ b/tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml > @@ -19,7 +19,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/usr/lib/vmware/isoimages/linux.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0' model='vmpvscsi'/> > diff --git a/tests/vmx2xmldata/vmx2xml-floppy-device.xml b/tests/vmx2xmldata/vmx2xml-floppy-device.xml > index 41cda93..f8eac2e 100644 > --- a/tests/vmx2xmldata/vmx2xml-floppy-device.xml > +++ b/tests/vmx2xmldata/vmx2xml-floppy-device.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='block' device='floppy'> > <source dev='/dev/fd0'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='fdc' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-floppy-file.xml b/tests/vmx2xmldata/vmx2xml-floppy-file.xml > index f436a3b..3e25249 100644 > --- a/tests/vmx2xmldata/vmx2xml-floppy-file.xml > +++ b/tests/vmx2xmldata/vmx2xml-floppy-file.xml > @@ -13,7 +13,7 @@ > <devices> > <disk type='file' device='floppy'> > <source file='[datastore] directory/floppy.flp'/> > - <target dev='fda' bus='fdc'/> > + <target dev='fda' bus='fdc' tray='closed'/> > <address type='drive' controller='0' bus='0' target='0' unit='0'/> > </disk> > <controller type='fdc' index='0'/> > diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml > index 2cca409..9bc4a49 100644 > --- a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml > +++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml > @@ -19,7 +19,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/usr/lib/vmware/isoimages/linux.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0' model='lsilogic'/> > diff --git a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml > index 391e45c..94efc0f 100644 > --- a/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml > +++ b/tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml > @@ -19,7 +19,7 @@ > </disk> > <disk type='file' device='cdrom'> > <source file='/usr/lib/vmware/isoimages/linux.iso'/> > - <target dev='hdc' bus='ide'/> > + <target dev='hdc' bus='ide' tray='closed'/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > <controller type='scsi' index='0' model='lsilogic'/> > -- > 1.7.1 Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list