NAME

vicfg-vmknic - configure virtual network adapters


SYNOPSIS

 vicfg-vmknic [conn_options] 
    [--add --ip<address> --netmask <netmask> <port-group-name> |
     --delete <nic_name> |
     --disable-vmotiion <portgroup> |
     --dvs-name <dvs> |
     --dvport_id <port_id> |
     --enable-ipv6 [true|false] |
     --enable-vmotion <portgroup> |
     --help |
     --ip <address> |
     --list |
     --mtu <mtu> |
     --netmask <netmask> |
     --portgroup <port_group> |
     --tso |
     --unset-ip |
     --vihost <esx_host> ]


DESCRIPTION

The vicfg-vmknic command configures VMkernel NICs (virtual network adapters).

Use the esxcli swisis nic command to specify NIC bindings for VMkernel NICs.


OPTIONS

conn_options

Specifies the target server and authentication information if required. Run vicfg-vmknic --help for a list of all connection options.

--add | -a

Adds a VMkernel NIC to the system. You must specify the IP address using --ip, the netmask, and the port group name. When the command completes successfully, the newly added VMkernel NIC is enabled.

You cannot specify the dvsName and dvportId parameters with this option.

--delete | -d <port_group>

Delete the VMkernel NIC on the given port group. The port group name is the same as the VMkernel NIC name.

--disable-vmotion | -u <port_group>

Disables VMotion for the VMkernel NIC on a specified port group.

--dvs-name | -s

Specifies the distributed virtual switch (DVS) name to use as a connection point. DVS is also known as vNetwork Distributed Switch (VDS). Requires that --dvport-id is also specified.

--dvport-id | -v

Specifies the distributed virtual port ID of the connection point. Requires that --dvs-name is also specified.

--enable-ipv6 | -6 true | false

Enables or disables IPv6 for this VMkernel NIC for the next boot. Valid for vSphere 4.0 and later.

--enable-vmotion | -E <port_group>

Enables VMotion for the VMkernel NIC on a specified port group. By default, VMotion is disabled for a port group. To perform migration with VMotion over the network, you have to enable VMotion.

--help

Prints a help message for each command-specific and each connection option. Calling the script with no arguments or with --help has the same effect.

--ip | -i <ip_address> | DHCP

Sets the IP address for this VMkernel NIC. If you specify DHCP, the VMkernel must support DHCP. IP address can be in one of the following format:

--list | -l

Lists all VMkernel NICs on the system. The list contains the network information, port group, MTU, and current state for each virtual network adapter in the system.

--mtu | -m <mtu>

MTU (maximum transmission unit) for the interface being created (valid for vSphere 4.0 and later).

--netmask | -n <netmask>

IP netmask (X.X.X.X) to be used for the virtual network adapter. When you set a netmask, you must specify the --ip option in the same command.

--portgroup | -p

Specifies the port group to use as connection point.

--tso | -t

Disables TCP Segment Offloading (TSO) for the VMkernel NIC being created. By default, TSO is enabled for a virtual NIC. When you specify this option, TSO is disabled for the virtual NIC that is being created (valid for vSphere 4.0 and later).

--unset-ip | -U

Unsets the IP address for this VMkernel NIC (valid for vSphere 4.0 and later). The address can have one of the following format:

--vihost | -h

When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --vihost to specify the ESX/ESXi host to run the command against.


EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying the server, user name, and password. Run vicfg-vmknic --help for a list of common options including connection options.

Add a VMkernel NIC to the system:

 vicfg-vmknic <conn_options> -a --ip <IP address> -n <net mask> "VMkernel NIC Name"

Delete a VMkernel NIC:

 vicfg-vmknic <conn_options> -d "VMkernel NIC 37"

Add a VMkernel NIC to the system:

 vicfg-vmknic <conn_options> -a --ip <IP address> -n <net mask> --dvs-name "dvs-001" --dvport-id 1

Delete a VMkernel NIC:

 vicfg-vmknic <conn_options> -d --dvs-name "dvs-001" --dvport-id 1

List all the VMkernel NICs:

 vicfg-vmknic <conn_options> -l

Modify a VMkernel NIC's IP address and netmask:

 vicfg-vmknic <conn_options --ip <IP address> -n <net mask> "VMkernel NIC 37"

Set the VMkernel NIC to use DHCP:

 vicfg-vmknic <conn_options>  --ip DHCP "VMkernel NIC 37"

Enable IPv6 for the VMkernel NIC for the next boot:

 vicfg-vmknic VMkernel  --enable-ipv6 true

Enable VMotion for the VMkernel NIC on a specified portgroup:

 vicfg-vmknic <conn_options> --enable-vmotion "portgroup 42"

Disable VMotion for the VMkernel NIC on a specified portgroup:

 vicfg-vmknic <conn_options> --disable-vmotion "portgroup 42"