mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 04:47:54 +00:00
List Hyper-V VMs on non-english OSes. Fixes #1612
This commit is contained in:
parent
6a7d47ce97
commit
39da0f3904
@ -182,8 +182,8 @@ class HyperVGNS3VM(BaseGNS3VM):
|
|||||||
|
|
||||||
vms = []
|
vms = []
|
||||||
try:
|
try:
|
||||||
for vm in self._conn.Msvm_ComputerSystem():
|
for vm in self._conn.Msvm_VirtualSystemSettingData():
|
||||||
if vm.Caption == "Virtual Machine":
|
if vm.VirtualSystemType == "Microsoft:Hyper-V:System:Realized":
|
||||||
vms.append({"vmname": vm.ElementName})
|
vms.append({"vmname": vm.ElementName})
|
||||||
except wmi.x_wmi as e:
|
except wmi.x_wmi as e:
|
||||||
raise GNS3VMError("Could not list Hyper-V VMs: {}".format(e))
|
raise GNS3VMError("Could not list Hyper-V VMs: {}".format(e))
|
||||||
|
Loading…
Reference in New Issue
Block a user