From 135bbe8825281cef4596de949968edd6f44e86fe Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 22 Mar 2018 22:37:09 +0700 Subject: [PATCH] Check if HAXM support is installed on macOS. Ref #1242. --- gns3server/compute/qemu/qemu_vm.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index e3e14bf9..3aa4390f 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -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