pyvmomi-community-samples
pyvmomi-community-samples copied to clipboard
add_nic_to_vm.py issue: TypeError: For "deviceName" expected type str, but got vim.dvs.DistributedVirtualPortgroup
Traceback (most recent call last):
File "./add_nic_to_vm-new.py", line 165, in
If we change line #113 from: nic_spec.device.backing.deviceName = network to: nic_spec.device.backing.deviceName = network.name
then it works.