Don't specify the PCI bus for AHCI device

pci.X is not always defined, let qemu handle this.

I think PCI buses only exist if PCI network adapters are defined, this
is not the case with virtio.
pull/1649/head
David Kreitschmann 5 years ago
parent 941857470d
commit 8105b68d52

@ -1640,7 +1640,7 @@ class QemuVM(BaseNode):
if interface == "sata":
# special case, sata controller doesn't exist in Qemu
options.extend(["-device", 'ahci,id=ahci{},bus=pci.{}'.format(disk_index, disk_index)])
options.extend(["-device", 'ahci,id=ahci{}'.format(disk_index)])
options.extend(["-drive", 'file={},if=none,id=drive-sata-disk{},index={},media=disk'.format(disk, disk_index, disk_index)])
options.extend(["-device", 'ide-drive,drive=drive-sata-disk{},bus=ahci{}.0,id=drive-sata-disk{}'.format(disk_index, disk_index, disk_index)])
else:

Loading…
Cancel
Save