6.0

Table Of Contents
VMware, Inc. 37
Chapter 4 Running vCLI Host Management Commands
Running Host Management Commands from a Windows System
AfteryouinstallvCLIandrebootyoursystem,youcantesttheinstallationbyrunningavCLIorSDKforPerl
commandfromtheWindowscommandprompt.
To run a vCLI command on Windows
1FromtheWindowsStartmenu,choosePrograms>VMware>VMwarevSphereCLI>Command
Prompt.
Acommandpromptshellforthelocation
wherevCLIisinstalledappears.YouhaveeasyaccesstovCLI
andtovSphereSDKforPerlcommandsfromthatlocation.
2Runthecommand,passinginconnectionoptionsandotheroptions.
OnWindows,theextension.plisrequiredforvicfg-commands,butnotforESXCLI.
<command>.pl <conn_options> <params>
Forexample:
esxcli --server <esxi_HOSTNAME_OR_IP> --username “snow-white” --password “dwarf$” network ip
interface list
vicfg-mpath.pl --server <esxi_HOSTNAME_OR_IP> --username “snow-white” --password “dwarf$”
--list
Thesystempromptsyouforausernameandpassword.
Running Host Management Commands from a Linux System
Afterinstallation,youcanrunvCLIcommandsandvSphereSDKforPerlutilityapplicationsatthecommand
prompt.
To run a vCLI command on Linux
1Openacommandprompt.
2 (Optional)ChangetothedirectorywhereyouinstalledthevCLI(defaultis/usr/bin).
3Runthecommand,includingtheconnectionoptions.
<command> <conn_options> <params>
Specifyconnectionoptionsinaconfigurationfileorpassthemonthecommandline.Theextension.pl
isnotrequiredonLinux.Forexample:
esxcli --server <esxi_HOSTNAME_OR_IP> --username snow\-white --password dwarf\$ network ip
interface list
vicfg-mpath --server <esxi_HOSTNAME_OR_IP> --username snow\-white --password dwarf\$ --list
Thesystempromptsyouforausernameandpasswordforthetargetserver.