1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Check if HAXM support is installed on macOS. Ref #1242.

This commit is contained in:
grossmj 2018-03-22 22:37:09 +07:00
parent 9a9ac6d9f7
commit 135bbe8825

View File

@ -1700,8 +1700,13 @@ class QemuVM(BaseNode):
else:
return False
elif sys.platform.startswith("darwin"):
# TODO: support for macOS
raise QemuError("HAXM acceleration is not yet supported on macOS")
process = yield from asyncio.create_subprocess_shell("kextstat | grep com.intel.kext.intelhaxm")
yield from process.wait()
if process.returncode != 0:
if require_hardware_accel:
raise QemuError("HAXM acceleration support is not installed on this host (com.intel.kext.intelhaxm extension not loaded)")
else:
return False
return True
return False