From 8105b68d5272f2d3ec39e089fbc368698167aeed Mon Sep 17 00:00:00 2001 From: David Kreitschmann Date: Tue, 3 Sep 2019 16:03:27 +0200 Subject: [PATCH] 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. --- gns3server/compute/qemu/qemu_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index 62eaef90..95b2cff9 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -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: