VMware {code} Community
ahalimz
Contributor
Contributor

How to connect physicl nic to a virtual switch ? (esxi 5.1)

Hi,

I am trying to programatically connect a physical nic to a virtual switch.

I am doing this as part of the virtual switch creation in which the HostVirtualSwithSpec is used with vimPort.addVirtualSwitch call.

I can create a switch itself (w/o physical nic) fine. However if I use switchSpec.setBridge(bridge) to associate physical nic (like vmnic1),

and the bridge is the SimpleBridge, the vimPort.addVirtualSwitch will throw soap exception which says something about invalid parameter (no details).

Is the simple bridge the right one to use ? I tried the bond bridge but then I do not see any method to set the dev names.

Or perhaps should completely different apis be used ?

Your help is greatly appreciated.

ahalimz

0 Kudos
0 Replies