diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index 3489b922..9dfc4bff 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -1766,7 +1766,8 @@ class QemuVM(BaseNode): interface = getattr(self, "hd{}_disk_interface".format(drive)) # fail-safe: use "ide" if there is a disk image and no interface type has been explicitly configured if interface == "none": - setattr(self, "hd{}_disk_interface".format(drive), "ide") + interface = "ide" + setattr(self, "hd{}_disk_interface".format(drive), interface) disk_name = "hd" + drive if not os.path.isfile(disk_image) or not os.path.exists(disk_image): diff --git a/tests/handlers/api/controller/test_template.py b/tests/handlers/api/controller/test_template.py index c9eaf75a..2aeff91f 100644 --- a/tests/handlers/api/controller/test_template.py +++ b/tests/handlers/api/controller/test_template.py @@ -669,13 +669,13 @@ async def test_qemu_template_create(controller_api): "default_name_format": "{name}-{0}", "first_port_name": "", "hda_disk_image": "IOSvL2-15.2.4.0.55E.qcow2", - "hda_disk_interface": "ide", + "hda_disk_interface": "none", "hdb_disk_image": "", - "hdb_disk_interface": "ide", + "hdb_disk_interface": "none", "hdc_disk_image": "", - "hdc_disk_interface": "ide", + "hdc_disk_interface": "none", "hdd_disk_image": "", - "hdd_disk_interface": "ide", + "hdd_disk_interface": "none", "initrd": "", "kernel_command_line": "", "kernel_image": "",