List Hyper-V VMs on non-english OSes. Fixes #1612

This commit is contained in:
grossmj 2019-07-30 15:01:17 -02:30
parent 6a7d47ce97
commit 39da0f3904

View File

@ -182,8 +182,8 @@ class HyperVGNS3VM(BaseGNS3VM):
vms = []
try:
for vm in self._conn.Msvm_ComputerSystem():
if vm.Caption == "Virtual Machine":
for vm in self._conn.Msvm_VirtualSystemSettingData():
if vm.VirtualSystemType == "Microsoft:Hyper-V:System:Realized":
vms.append({"vmname": vm.ElementName})
except wmi.x_wmi as e:
raise GNS3VMError("Could not list Hyper-V VMs: {}".format(e))