esxcli troubles – order matters!

As part of my efforts to renew my VCP5-DCV certification to the new and shiny VCP6-DCV (not to mention avoiding having to take another week-long class in order to qualify to do so), I have been spinning up a lab environment to mess around with. Like when I was studying for VCP5-DCV, I am using Mastering VMware vSphere 6 by Nick Marshall as my go-to guide.

In my lab, I deployed an instance of the vSphere Management Assistant (vMA) so that I can run vSphere CLI commands such as esxcli. The deployment of vMA went without any problems, but I was having a bunch of trouble getting it to authenticate with vCenter.

esxcli –server= –vihost= -username=administrator@vlab.local network ip interface list

(It may whine about not having a certificate in the credential store… if so, add the certificate.

/usr/lib/vmware-vcli/apps/general/ add -s -t [certificate])

Then I started getting a weird authentication error…


That’s weird. I tried the same password multiple times just to make sure I wasn’t typing it in wrong. No dice. I started looking online and found this thread:

Basically, this guy’s fix was to disconnect the host and reconnect it in vCenter. I tried that. It still failed.

Finally, I found the answer.

After installation, run ESXCLI commands against a specific host by first specifying all dispatcher options. If the target server is a vCenter Server system, specify the target ESXi host before any ESXCLI namespaces, commands, and supported options.

It was purely a matter of what options in the command come first. I ran the command again like this:



Tada! Order DOES matter to esxcli. The book example will not work as formatted.

Up next: scripting the nightly shutdown of the lab.



IT Pilot cleared for takeoff, runway 5



Well, here we are.

I haven’t had a domain name registered in a while but as I start getting serious about becoming an active member in my region’s IT scene, I figure it’s time to commit to a blog.

Here’s a little about me: I am a presales engineer for a large global corporation, covering a variety of established (named) accounts and territory accounts. I focus primarily on backup and recovery hardware and software, and over the last few years I have developed an itch for virtualization, namely vSphere.

I’m a big proponent of solid backup and disaster recovery in both the enterprise as well as at home, and it’s my mission to show both organizations as well as end users the value of a properly maintained backup paradigm.

There are several purposes to this blog; posting my personal thoughts regarding backup and recovery is only one of them. I hold a current VCP certification, of which I am working towards renewing, and my colleague Jonathan Frappier convinced me that I should document my steps towards recertification via blogging. Not a bad idea… I get to discuss my steps, get feedback, learn from others, and contribute back to the community.

You’ll also see other things, like my flying hobby (the title picture should be a tip-off).

So, that’s it for now. Backups, DR, virtualization, and flying. IT Pilot has begun!