1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-23 23:38:21 +00:00

Merge pull request #1649 from neffs/fix-sata

Don't specify the PCI bus for AHCI device
This commit is contained in:
Jeremy Grossmann 2019-09-05 17:37:13 +07:00 committed by GitHub
commit 6ec5683c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1640,9 +1640,10 @@ 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{},index={},media=disk'.format(disk, disk_index, disk_index)])
options.extend(["-device", 'ide-drive,drive=drive{},bus=ahci{}.0,id=drive{}'.format(disk_index, disk_index, disk_index)])
else:
options.extend(["-drive", 'file={},if={},index={},media=disk,id=drive{}'.format(disk, interface, disk_index, disk_index)])