mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
776e37e1eb
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
29 lines
853 B
XML
29 lines
853 B
XML
<domain type='qemu'>
|
|
<name>QEMUGuest1</name>
|
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
<memory>219200</memory>
|
|
<currentMemory>219200</currentMemory>
|
|
<vcpu>1</vcpu>
|
|
<os>
|
|
<type arch='i686' machine='pc'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu</emulator>
|
|
<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>
|
|
<input type='mouse' bus='ps2'/>
|
|
<graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
|
|
<video>
|
|
<model type='cirrus' vram='9216' heads='1'/>
|
|
</video>
|
|
</devices>
|
|
</domain>
|