ESX Commands: esxcfg-vmknic

You need to have VMkernel ports to do VMotion, Software iSCSI and Fault Tolerance. These ports can be easy to create and manage from the command line. I generally can be found adding them for vSphere iSCSI. I especially use the cli for tasks that are repeated over and over. Creating multiple ports per ESX host is time consuming and tends to introduce typing errors. So it is always a good idea to get them all done in a script file to reduce the chance for error.

List out all the VMkernel Nics:
esxcfg-vmknic -l

Create a new portgroup first with esxcfg-vswitch then create a vmk port with esxcfg-vmknic, example:
esxcfg-vswitch -a VMkport vSwitch1
esxcfg-vmknic -a -i -n VMkport

In VI3 you can only have one Vmkernel port per vswitch, in vSphere this is changed. It is especially usefully setting up iSCSI multipathing. As the software iSCSI initiator will initiate IO from each iSCSI enabled vmkernel port when using Round Robin as your path selection policy.

Leave a Reply

Your email address will not be published. Required fields are marked *