No clever title – ESXCLI

I have been missing in action for a few weeks. It is time to catch up for all the lost time. One topic I feel many people don’t know too much about is esxcli. I know how to do what I usually do with esxcli. There is a lot more there for us to explore.

First stop and take a look at the virtuallyGhetto article.

It can be run from the Service Console, the ESXi Tech Support Mode command line, or from the vMA. As William points out if you are running these command from the vMA you need to authenticate individually to each host. He goes on to list some articles that go over the most used case of esxcli, swiscsi.

A couple of quick examples I like to use:

esxcli nmp device setpolicy –device naa.6090a07800c2ea66b8c114050000c00d –psp VMW_PSP_RR

This command changes the policy for a storage device to another path selection policy. In this case it is Round Robin. This is great for when you are rebuilding ESX and the storage is already zoned. ESX will add the storage with the default PSP and changing a few dozen datastores on each host one at a time via the GUI can be VERY tedious.

Then how do I change the default PSP?

esxcli nmp satp setdefaultpsp –psp VMW_PSP_RR –satp VMW_SATP_DEFAULT_AA

This can be modified for different array types after the “—satp” tag or different path policies after the “–psp” tag.

For the VCAP-DCA4 exam I am studying for I wonder how much deeper than this they will go? I would feel most Data Center Administrators need to set up swisci settings and possibly change path policies. Anything I am missing? If you check out Duncan’s article here it will be great to know how to list what is available.

4 thoughts on “No clever title – ESXCLI”

  1. I’ve had a hard time to get these rules to work at all, for instance:
    esxcli nmp satp addrule –satp VMW_SATP_SYMM –model SYMMETRIX –vendor EMC –psp VMW_PSP_RR -O iops=10

    Can’t get this to work, even without the PSP option removed (-O iops=10)

    Suggestions?

  2. It can also be run from rcli, or the rmote cli that you can install on linux. I personally have installed it on CentOS Servers, Fedora Desktop, and Ubuntu. Same commands as VMA i belive, as i think that the vma is only just a tiny little linux appliance.

Leave a Reply

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