1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

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.
This commit is contained in:
David Kreitschmann 2019-09-03 16:03:27 +02:00
parent 941857470d
commit 8105b68d52

View File

@ -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: