mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-07 16:53:47 +02:00
Fix issue when starting GNS3 VM for Hyper-V
This commit is contained in:
parent
03c7744efd
commit
cba39a3744
@ -248,7 +248,10 @@ class HyperVGNS3VM(BaseGNS3VM):
|
|||||||
vnics = self._get_vm_resources(self._vm, 'Msvm_SyntheticEthernetPortSettingData')
|
vnics = self._get_vm_resources(self._vm, 'Msvm_SyntheticEthernetPortSettingData')
|
||||||
while True:
|
while True:
|
||||||
for port in ports:
|
for port in ports:
|
||||||
vnic = [v for v in vnics if port.Parent == v.path_()][0]
|
try:
|
||||||
|
vnic = [v for v in vnics if port.Parent == v.path_()][0]
|
||||||
|
except IndexError:
|
||||||
|
continue
|
||||||
config = vnic.associators(wmi_result_class='Msvm_GuestNetworkAdapterConfiguration')
|
config = vnic.associators(wmi_result_class='Msvm_GuestNetworkAdapterConfiguration')
|
||||||
ip_addresses = config[0].IPAddresses
|
ip_addresses = config[0].IPAddresses
|
||||||
for ip_address in ip_addresses:
|
for ip_address in ip_addresses:
|
||||||
|
Loading…
Reference in New Issue
Block a user