]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vbox: Correctly generate drive name in dumpxml
authorDawid Zamirski <dzamirski@datto.com>
Tue, 7 Nov 2017 18:49:25 +0000 (13:49 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 7 Nov 2017 19:45:51 +0000 (14:45 -0500)
commita4919338baff854cccd08fc8f511855e8c60ed1a
treef31cd25614bc588842e79703a2f845a6c8fe221a
parent32a944115b78c8a0205dfb206dc4fd7599a74464
vbox: Correctly generate drive name in dumpxml

If a VBOX VM has e.g. a SATA and SCSI disk attached, the XML generated
by dumpxml used to produce "sda" for both of those disks. This is an
invalid domain XML as libvirt does not allow duplicate device names. To
address this, keep the running total of disks that will use "sd" prefix
for device name and pass it to the vboxGenerateMediumName which no
longer tries to "compute" the value based only on current and max
port and slot values. After this the vboxGetMaxPortSlotValues is not
needed and was deleted.
src/vbox/vbox_common.c