mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Add aliases for devices (#1374)
It is more reliable to identify disk and network devices by use of aliases, in addition to being able to establish in the absence of information the purpose of such devices. There is a possibility that in some cases this will also resolve issues where the same device attach issued twice with the same details will fail due to the second request not appearing to be honoured. Additionally when destroying domains, may not have the relevant details on how many disks are provided by the box, for those that support multiple disks. Being able to traverse the domain XML and destroy the appropriate volumes based on aliases names will remove the need to have predictable device identifiers during the destroy and allow for an improved resolver. Relates: #1342
This commit is contained in:
@@ -27,11 +27,13 @@
|
||||
</clock>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<alias name='ua-box-volume-0'/>
|
||||
<driver name='qemu' type='qcow2' cache='default'/>
|
||||
<source file='/var/lib/libvirt/images/vagrant-test_default.img'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<alias name='ua-disk-volume-0'/>
|
||||
<driver name='qemu' type='qcow2' cache='default'/>
|
||||
<source file='/var/lib/libvirt/images/vagrant-test_default-vdb.qcow2'/>
|
||||
<target dev='vdb' bus='virtio'/>
|
||||
|
||||
Reference in New Issue
Block a user