[Home] [Forum] [3i RCLI Guide]
The commands vicfg-vmknic.pl (esxcfg-vmknic.pl) commands are use to create and delete VMkernel port groups. There port groups are used for the management connection to your ESXi host, Vmotion and connectivity to NFS and iSCSI targets.
The following options are available with this command. Some documentation mentions the --enable option. This does not appear to be part of the ESXi 3.5 Update 2 RCLI.
--list (-l) - This option will list currently configured VMkernel NICs
--add <portgroup_name> (-a <portgroup_name>) - This option will add a VMkernel NIC to a port group. When using this option you must also specify the --ip and --netmask options.
--del <portgroup_name> (-d <portgroup_name) - This will delete the VMkernel NIC that you specify.
--ip < IP address | DHCP > (-i < IP address | DHCP) - This will specify the IP address or to use DHCP for a VMkernel NIC
--netmask < x.x.x.x > (-n < x.x.x.x>) - Used with the --ip option, this will specify the netmask to use.
Sample Session
vicfg-vmknic.pl --server 192.168.1.33 --list
Interface Port Group IP Address Netmask MAC Address
vmk0 Management Network 192.168.1.33 255.255.255.0 00:1a:92:53:e6:8f
vicfg-vmknic.pl --server 192.168.1.33 --add --ip 192.168.3.40 --netmask 255.255.255.0 "iSCSI_VMkernel"
Failed to add vmkernel nic: vim.fault.NotFound
NOTE: You must first create the port group with the vicfg-vswitch.pl command
vicfg-vswitch.pl --server 192.168.1.33 --add-pg iSCSI_VMkernel vSwitch0
vicfg-vmknic.pl --server 192.168.1.33 --add --ip 192.168.3.40 --netmask 255.255.255.0 "iSCSI_VMkernel"
Added the VMkernel nic successfully on port group iSCSI_VMkernel
vicfg-vmknic.pl --server 192.168.1.33 --list
Interface Port Group IP Address Netmask MAC Address
vmk0 Management Network 192.168.1.33 255.255.255.0 00:1a:92:53:e6:8f
vmk2 iSCSI_VMkernel 192.168.3.40 255.255.255.0 00:50:56:77:07:72
vicfg-vmknic.pl --server 192.168.1.33 --ip 192.168.4.40 --netmask 255.255.255.0 "iSCSI_VMkernel"
Modified the VMkernel nic successfully on port group iSCSI_VMkernel
vicfg-vmknic.pl --server 192.168.1.33 --list
Interface Port Group IP Address Netmask MAC Address
vmk0 Management Network 192.168.1.33 255.255.255.0 00:1a:92:53:e6:8f
vmk2 iSCSI_VMkernel 192.168.4.40 255.255.255.0 00:50:56:77:07:72
vicfg-vmknic.pl --server 192.168.1.33 --ip DHCP "iSCSI_VMkernel"
Modified the VMkernel nic successfully on port group iSCSI_VMkernel
vicfg-vmknic.pl --server 192.168.1.33 --list
Interface Port Group IP Address Netmask MAC Address
vmk0 Management Network 192.168.1.33 255.255.255.0 00:1a:92:53:e6:8f
vmk2 iSCSI_VMkernel 0.0.0.0 0.0.0.0 00:50:56:77:07:72
vicfg-vmknic.pl --server 192.168.1.33 --delete "iSCSI_VMkernel"
Removed the VMkernel nic successfully from port group iSCSI_VMkernel
You may also configure this with the VI client.

Copyright © 2009 - Dave Mishchenko