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)
    Path:
    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

    Example:
    VI_SERVER = XXX.XXX.XXX.XXX
    VI_USERNAME = root
    VI_PASSWORD = geheim
    VI_PROTOCOL = https
    VI_PORTNUMBER = 443

  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 VMware training/consultant (no specific order) with more than 15 years in the IT industry. Main focus is VMware vSphere, Horizon View and Site Recovery Manager with a deepdive to performance. Michael is VCDX 210, VCAP 4/5 certified, has been rewarded with the vExpert title from 2011, is a PernixPro, Nutanix Tech Champion and a Nutanix Platform Professional.

2 Comments to “vCLI: Running vCLI Commands”

  • vCLI: Managing Files « — December 21, 2010 @ 17:41

  • vCLI: Managing Files « — December 21, 2010 @ 17:41

  • RSS feed for comments on this post. TrackBack URI

    Leave a Reply

    You must be logged in to post a comment.