From 3dcb7799e3a604c70faf594cbb3abe46829e985e Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 12 Mar 2019 22:40:37 +0700 Subject: [PATCH] Use accurate info to detect Windows version. --- gns3server/controller/gns3vm/hyperv_gns3_vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/controller/gns3vm/hyperv_gns3_vm.py b/gns3server/controller/gns3vm/hyperv_gns3_vm.py index 83a9ead1..98e17b98 100644 --- a/gns3server/controller/gns3vm/hyperv_gns3_vm.py +++ b/gns3server/controller/gns3vm/hyperv_gns3_vm.py @@ -56,8 +56,8 @@ class HyperVGNS3VM(BaseGNS3VM): if not sys.platform.startswith("win"): raise GNS3VMError("Hyper-V is only supported on Windows") - if sys.getwindowsversion().major < 10:# or sys.getwindowsversion().build < 14393: - 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().major)) + if sys.getwindowsversion().platform_version[0] < 10:# or sys.getwindowsversion().build < 14393: + 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])) try: conn = wmi.WMI()