mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Change how Hyper-V VMs are found. Ref #1612
This commit is contained in:
1 parent
60cc5c7bb4
commit
dcdaffa056
1 file changed
+2
-2
@@ -182,8 +182,8 @@ class HyperVGNS3VM(BaseGNS3VM):
|
||||
|
||||
vms = []
|
||||
try:
|
||||
for vm in self._conn.Msvm_VirtualSystemSettingData():
|
||||
if vm.VirtualSystemType == "Microsoft:Hyper-V:System:Realized":
|
||||
for vm in self._conn.Msvm_ComputerSystem():
|
||||
if vm.ElementName != self._management.SystemName:
|
||||
vms.append({"vmname": vm.ElementName})
|
||||
except wmi.x_wmi as e:
|
||||
raise GNS3VMError("Could not list Hyper-V VMs: {}".format(e))
|
||||
|
||||
Reference in new issue
Block a user