mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
1 parent
ba4128f57b
commit
8225bad76b
2 files changed
+18
-1
No files matched your search
@@ -157,7 +157,11 @@ class QemuVM(BaseVM):
|
||||
else:
|
||||
qemu_bin = os.path.basename(qemu_path)
|
||||
qemu_bin = re.sub(r'(w)?\.(exe|EXE)$', '', qemu_bin)
|
||||
self._platform = re.sub(r'^qemu-system-(.*)$', r'\1', qemu_bin, re.IGNORECASE)
|
||||
# Old version of GNS3 provide a binary named qemu.exe
|
||||
if qemu_bin == "qemu":
|
||||
self._platform = "i386"
|
||||
else:
|
||||
self._platform = re.sub(r'^qemu-system-(.*)$', r'\1', qemu_bin, re.IGNORECASE)
|
||||
if self._platform.split(".")[0] not in QEMU_PLATFORMS:
|
||||
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,
|
||||
|
||||
Reference in new issue
Block a user