From 010d65114de7e9bd738f8d33ff1902f0bf01dc4d Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 13 Mar 2019 02:15:58 +0700 Subject: [PATCH] Hyper-V with nested virtualization is only supported on Windows 10 Anniversary Update or later. --- gns3server/controller/gns3vm/hyperv_gns3_vm.py | 6 +++++- gns3server/controller/project.py | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gns3server/controller/gns3vm/hyperv_gns3_vm.py b/gns3server/controller/gns3vm/hyperv_gns3_vm.py index 98e17b98..119e6db4 100644 --- a/gns3server/controller/gns3vm/hyperv_gns3_vm.py +++ b/gns3server/controller/gns3vm/hyperv_gns3_vm.py @@ -56,9 +56,13 @@ class HyperVGNS3VM(BaseGNS3VM): if not sys.platform.startswith("win"): raise GNS3VMError("Hyper-V is only supported on Windows") - if sys.getwindowsversion().platform_version[0] < 10:# or sys.getwindowsversion().build < 14393: + if sys.getwindowsversion().platform_version[0] < 10: raise GNS3VMError("Windows 10/Windows Server 2016 or a later version is required to run Hyper-V with nested virtualization enabled (version {} detected)".format(sys.getwindowsversion().platform_version[0])) + if sys.getwindowsversion().platform_version[0] == 10 and sys.getwindowsversion().platform_version[1] == 0: + if sys.getwindowsversion().platform_version[1] < 14393: + raise GNS3VMError("Hyper-V with nested virtualization is only supported on Windows 10 Anniversary Update (build 10.0.14393) or later") + try: conn = wmi.WMI() except wmi.x_wmi as e: diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index af55b80b..6833a0ea 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -744,8 +744,10 @@ class Project: os.remove(snapshot.path) async def close(self, ignore_notification=False): - if self._status == "closed" or self._loading: - log.debug("Closing project '{}' ignored because it is already closed or being loaded".format(self.name)) + if self._status == "closed": + return + if self._loading: + log.warning("Closing project '{}' ignored because it is being loaded".format(self.name)) return await self.stop_all() for compute in list(self._project_created_on_compute):