6.0
Table Of Contents
- Getting Started with vSphere Command-Line Interfaces
- Contents
- About This Book
- Managing vSphere with Command-Line Interfaces
- Installing vCLI
- Running Host Management Commands in the ESXi Shell
- Running vCLI Host Management Commands
- Overview of Running vCLI Host Management Commands
- Protecting Passwords
- Authenticating Through vCenter Server and vCenter Single Sign-On
- Authenticating Directly to the Host
- Trust Relationship Requirement for ESXCLI Commands
- Common Options for vCLI Host Management Command Execution
- Using vCLI Commands in Scripts
- Running Host Management Commands from a Windows System
- Running Host Management Commands from a Linux System
- Running DCLI Commands
- Index
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.