Fix issues with VMnet interface on macOS >= 11.0. Ref #3381

This commit is contained in:
grossmj 2022-11-07 23:59:33 +08:00
parent 18b0863ba8
commit 5696d1ccb7
2 changed files with 5 additions and 0 deletions

View File

@ -380,6 +380,7 @@ class VMware(BaseManager):
if vmnet in vmnet_interfaces and self.is_managed_vmnet(vmnet) is False:
vmnet_interfaces.remove(vmnet)
log.debug("VMnet interfaces found: ", vmnet_interfaces)
self._vmnets = vmnet_interfaces
@property

View File

@ -465,6 +465,10 @@ class VMwareVM(BaseNode):
try:
if self._ubridge_hypervisor:
if parse_version(platform.mac_ver()[0]) >= parse_version("11.0.0"):
# give VMware some time to create the bridge interfaces, so they can be found
# by psutil and used by uBridge
await asyncio.sleep(1)
for adapter_number in range(0, self._adapters):
nio = self._ethernet_adapters[adapter_number].get_nio(0)
if nio: