diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-12-22 16:53:20 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-01-15 16:38:29 +0000 |
commit | 776e37e1eb33543c1194fd55c8da924b946e2a1d (patch) | |
tree | f01d5f35613cfb809b39db8ac8c160d284911e6e /tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml | |
parent | Add address info to sound, video and watchdog devices (diff) | |
download | libvirt-776e37e1eb33543c1194fd55c8da924b946e2a1d.tar.gz libvirt-776e37e1eb33543c1194fd55c8da924b946e2a1d.tar.bz2 libvirt-776e37e1eb33543c1194fd55c8da924b946e2a1d.zip |
Set default disk controller/bus/unit props
When parsing the <disk> element specification, if no <address>
is provided for the disk, then automatically assign one based on
the <target dev='sdXX'/> device name. This provides for backwards
compatability with existing applications using libvirt, while also
allowing new apps to have complete fine grained control.
* src/conf/domain_conf.h, src/conf/domain_conf.c,
src/libvirt_private.syms: Add virDomainDiskDefAssignAddress()
for assigning a controller/bus/unit address based on disk target
* src/qemu/qemu_conf.c: Call virDomainDiskDefAssignAddress() after
generating XML from ARGV
* tests/qemuxml2argvdata/*.xml: Add in drive address information
to all XML files
Diffstat (limited to 'tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml')
-rw-r--r-- | tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml index d5341b395..ff315e117 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml @@ -17,10 +17,12 @@ <disk type='block' device='disk'> <source dev='/dev/HostVG/QEMUGuest1'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' unit='0'/> </disk> </devices> </domain> |