- Used to view and set configure the VMkernel ports on virtual Ethernet switches. A VMkernel port is a special type of port group on a virtual Ethernet switch which is used to assign an IP address to the VMkernel. The VMkernel only needs an IP address for VMotion, software-initiated iSCSI or NFS access.If you need to create a VMkernel port at the command line, then you need to create a port group first and then enable it as a VMkernel port. This tool does not allow you to enable the VMkernel port for VMotion, you must either use vimsh or the VI client for that.[root@esx1host root]# esxcfg-vswitch -A VMotion vSwitch0[root@esx1host root]# esxcfg-vmknic -a -i 100.100.100.121 -n 255.255.255.0 VMotion
In the following example, we list the VMkernel ports, then use esxcfg-vmknic to delete one of them and then list them again.
[root@esx1host etc]# esxcfg-vmknic -l
Port Group IP Address Netmask Broadcast MAC Address MTU Enabled
NFS access 100.100.100.21 255.255.255.0 100.100.100.255 00:50:56:62:ca:f6 1514 true
VMotion 100.100.100.121 255.255.255.0 100.100.100.255 00:50:56:6d:7c:7d 1514 true
[root@esx1host etc]# esxcfg-vmknic -d VMotion
[root@esx1host etc]# esxcfg-vmknic -l
Port Group IP Address Netmask Broadcast MAC Address MTU Enabled
NFS access 100.100.100.21 255.255.255.0 100.100.100.255 00:50:56:62:ca:f6 1514 true
The command line options are:
esxcfg-vmknic <options> [[<portgroup>]]
-a|–add Add a VMkernel NIC to the system, requires IP parameters and portgroup name.
-d|–del Delete VMkernel NIC on given portgroup.
-e|–enable Enable the given NIC if disabled.
-D|–disable Disable the given NIC if enabled.
-l|–list List VMkernel NICs.
-i|–ip <X.X.X.X> The IP address for this VMkernel NIC. Setting an IP address requires that the
–netmask option be given in same command.
-n|–netmask <X.X.X.X> The IP netmask for this VMkernel NIC. Setting the IP netmask requires that the –ip
option be given in the same command.
-r|–restore Restore VMkernel TCP/IP interfaces from Configuration file (FOR INTERNAL USE ONLY).
-h|–help Show this message.


Posted in
Tags: