VMkernel network interfaces provide the network access for the VMkernel TCP/IP stack. You must create new VMkernel ports for your ESXi system if you plan on using VMotion, VMware FT, or iSCSI and NAS storage. A VMkernel port consists of a port on the virtual switch and a VMkernel interface.
To add a VMkernel Network Interface to your ESXi system, use the following steps.
Procedure
Example: Adding a VMkernel Network Interface
private HostVirtualNicSpec createVNicSpecification() { HostVirtualNicSpec vNicSpec = new HostVirtualNicSpec(); HostIpConfig ipConfig = new HostIpConfig(); ipConfig.setDhcp(false); ipAddr = cb.get_option("ipaddress"); ipConfig.setIpAddress(ipAddr); ipConfig.setSubnetMask("255.255.255.0"); vNicSpec.setIp(ipConfig); return vNicSpec; } .... HostVirtualNicSpec vNicSpec = createVNicSpecification(); service.addVirtualNic(nwSystem, portGroup, vNicSpec);