esxcfg-vmknic
-a|--add Add a VMkernel NIC to the system,
requires IP parameters and
connection point(portgroup/dvs-name & dvport-id).
-d|--del Delete VMkernel NIC on the system
requires connection point(portgroup/dvs-name & dvport-id).
-e|--enable Enable the given NIC if disabled.
-D|--disable Disable the given NIC if enabled.
-p|--portgroup Setting portgroup as connection point.
-s|--dvs-name Setting DVSwitch name of the connection point.
This requires --dvport-id option to
be given in the same command.
-v|--dvport-id Setting DVPort ID of connection point.
This requires --dvs-name option to
be given in the same command.
-l|--list List VMkernel NICs.
-i|--ip Where can be one of the following...
- to use static IPv4 address specified
DHCP - to enable IPv4 DHCP for address.
- to use static IPv6 address
DHCPV6 - to enable IPv6 DHCP for address.
AUTOCONF - to enable IPv6 Router advertised address.
-U|--unset-ip Where can be one of the following...
V4 - to unset IPv4 address.
- to remove the specified IPv6 address
DHCPV6 - to disable IPv6 DHCP address.
AUTOCONF - to disable IPv6 Router advertised flag.
-n|--netmask The IP netmask for this VMkernel NIC.
Setting the IP netmask requires that the --ip
option be given in the same command.
-P|--peerdns Set peer dns. If set the system
will use the HostName, HostIPAddress
Domain returned by DHCP. Valid only for DHCP
-M|--mac-address MAC address for the interface being created.
-m|--mtu MTU MTU for the interface being created.
Valid MTU values are 1280-9000
-6|--enable-ipv6 Enable or disable IPv6 for next boot.
-r|--restore Restore VMkernel TCP/IP interfaces from
Configuration file (FOR INTERNAL USE ONLY).
-N|--netstack Netstack Instance
-h|--help Show this message.
Examples:
To add a vmknic to a portgroup
esxcfg-vmknic -a -i DHCP -p pgName
or
esxcfg-vmknic -a -i x.x.x.x -n 255.255.255.0 pgName
To delete a vmknic from a portgroup
esxcfg-vmknic -d -p pgName
or
esxcfg-vmknic -d pgName
Note:
esxcfg-vmknic does not support VMkernel NICs having opaque network as a
connection point. However, they will be listed during -l|--list option.