vCLI: Running vCLI Commands

As I want to get deeper into VMware CLI (vCLI) I deciced to make a summary of the vSphere Command-Line Interface Installation and Scripting Guide. Every chapter will be a separate blog post.
This summary is meant for my documentation but feel free to make use of it.

In this blog post: Running vCLI Commands

Authentication order

  1. Commandline (–password, –sessionfile, –config)
    Linux: /usr/share/doc/vmware-vcli/apps/session
    Windows: c:Program FilesVMwareVMware vSphere CLIPerlappssession

    save_session(.pl) –savesessionfile /tmp/vimsession –server s1 –username user1 –password wachtwoord
    (.pl is used in Windows)

    vicfg-mpath –sessionfile /tm/vimsession –list

  2. Enviroment variable
    Linux: export VI_SERVER=[servernaam]
    Windows: set VI_SERVER=[servernaam]
  3. Configuartion file
    vicfg-mpath –config [path_to_config_file] –list

    VI_USERNAME = root
    VI_PASSWORD = geheim
    VI_PROTOCOL = https

  4. Current Account (AD)
    vicfg-mpath –server [vc_Server] –passthroughauth –passthroughauthpackage “Kerberos” –vihost [esxhost] –list
  5. Prompt the user for a password

Command not available in lockdown mode (because you can only use vcli command at a vCenter server):

  • vicfg-snmp
  • vifs
  • vicfg-user
  • vicfg-cfgbackup
  • vihostupdate
  • vmkfstools
  • esxcli
  • vicfg-ipsec

About Michael
Michael Wilmsen is a experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture. Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.

RSS feed for comments on this post.

Leave a Reply

You must be logged in to post a comment.