mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 18:56:27 +00:00
Fix Qemu binary not set when adding appliance from template
This commit is contained in:
parent
e5ecdd270d
commit
0f49911432
@ -216,7 +216,7 @@ class QemuVM(BaseNode):
|
|||||||
if qemu_bin == "qemu":
|
if qemu_bin == "qemu":
|
||||||
self._platform = "i386"
|
self._platform = "i386"
|
||||||
else:
|
else:
|
||||||
self._platform = re.sub(r'^qemu-system-(.*)$', r'\1', qemu_bin, re.IGNORECASE)
|
self._platform = re.sub(r'^qemu-system-(\w+).*$', r'\1', qemu_bin, re.IGNORECASE)
|
||||||
if self._platform.split(".")[0] not in QEMU_PLATFORMS:
|
if self._platform.split(".")[0] not in QEMU_PLATFORMS:
|
||||||
raise QemuError("Platform {} is unknown".format(self._platform))
|
raise QemuError("Platform {} is unknown".format(self._platform))
|
||||||
log.info('QEMU VM "{name}" [{id}] has set the QEMU path to {qemu_path}'.format(name=self._name,
|
log.info('QEMU VM "{name}" [{id}] has set the QEMU path to {qemu_path}'.format(name=self._name,
|
||||||
|
@ -35,7 +35,7 @@ QEMU_TEMPLATE_PROPERTIES = {
|
|||||||
"platform": {
|
"platform": {
|
||||||
"description": "Platform to emulate",
|
"description": "Platform to emulate",
|
||||||
"enum": QEMU_PLATFORMS,
|
"enum": QEMU_PLATFORMS,
|
||||||
"default": "i386"
|
"default": ""
|
||||||
},
|
},
|
||||||
"linked_clone": {
|
"linked_clone": {
|
||||||
"description": "Whether the VM is a linked clone or not",
|
"description": "Whether the VM is a linked clone or not",
|
||||||
|
Loading…
Reference in New Issue
Block a user