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

Sata disk interface support for Qemu VMs. (#862)

This commit is contained in:
Julien Duponchelle 2017-01-10 14:11:40 +01:00 committed by GitHub
parent e0071f5b59
commit 9480065b28

View File

@ -1367,6 +1367,13 @@ class QemuVM(BaseNode):
else: else:
disk = disk_image disk = disk_image
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(["-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'.format(disk_index, disk_index)])
else:
options.extend(["-drive", 'file={},if={},index={},media=disk'.format(disk, interface, disk_index)]) options.extend(["-drive", 'file={},if={},index={},media=disk'.format(disk, interface, disk_index)])
return options return options