You can add and configure an IPv4 VMkernel NIC by using vicfg-vmknic.

Specify one of the options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>.

Procedure

  1. Add a new VMkernel network interface.
    You must specify the IP address by using --ip, the netmask, and the name. For the following examples, assume that VMSF-VMK-363 is a port group to which you want to add a VMkernel network interface.
    vicfg-vmknic <conn_options> --add --ip <ip_address> -n 255.255.255.0 VMSF-VMK-363
    You can specify the MTU setting when adding a VMkernel network interface. You cannot change that setting at a later time.
    When the command finishes successfully, the newly added VMkernel network interface is enabled.
  2. Change the IP address as needed.
    vicfg-vmknic <conn_options> --ip <address> VMSF-VMK-363
    For IPv4, the IP address can have one of the following formats.
    • <X.X.X.X> – Static IPv4 address.
    • DHCP – Use IPv4 DHCP.
    The VMkernel supports DHCP only for ESXi 4.0 and later.
  3. (Optional) Enable vMotion.
    By default, vMotion is disabled.
    vicfg-vmknic <conn_options> --enable-vmotion VMSF-VMK-363
    You can later use --disable-vmotion to disable vMotion for this VMkernel network interface.
  4. List information about all VMkernel network interfaces on the system.
    vicfg-vmknic <conn_options> --list
    The command displays the network information, port group, MTU, and current state for each virtual network adapter in the system.