Summary of all ESXCLI commands: # esxcli esxcli command list • ESXCLI connection options when connecting through vCenter Server: --server --vihost • ESXCLI connection options when connecting directly to ESXi host: --server
Host Commands
Virtual Machine Commands Other Commands
Authentication
TBD
ESXi Resources and Quick Links
vMA Deployment Tips
vCLI Supported Platforms
ESXCLI Name Spaces
Storage CommandsNetwork Commands
ESXi Upgrade Path
VMware ESXi™ 5.0 Reference
Performance and Troubleshooting
vSphere Client
PowerCLI
vMA/ESXCLI/vCLI
SCSI Performance Statistics (ESXi Shell only)# vscsiStats {options}
Show Open Ports (ESXi Shell only)# nc –z
Capture Network Tra�c (ESXi Shell only)# tcpdump-uw –c 5 –n –I vmk0 host and port 123
Test Network Connectivity (ESXi Shell only)# vmkping [–s 9000]
Memory/CPU Utilization# esxtop (ESXi Shell)# resxtop (vCLI)
ESXi
VMkernel
Boot Options
Stateless PXE
USB
SAN
User mode API (fuller POSIX subset)
ResourceScheduling
DistributedVM file system
CIM broker HA
hostd
NTP
DCUI
syslog
vpxa SNMP VMX
Virtual NIC& Switch
Storage Stack
Device Drivers
Network Stack
VMCIM
providers
VMM
Local Disk
ESXCFG/VICFG Command
PowerCLI Cmdlet ESXCLI 5.0
svmotion Move-VM –Datastore No equivalent
esxcfg-advcfgvicfg-advcfg
Get-VMHostAdvancedConfigurationSet-VMHostAdvancedConfiguration
esxcli system settings advanced
vicfg-cfgbackup Get-VMHostFirmwareSet-VMHostFirmware
No equivalent
vicfg-dns Get-VMHostNetworkSet-VMHostNetwork
esxcli network ip dns server
esxcfg-dumppartvicfg-dumppart
Get-EsxCLI esxcli system coredump
esxcfg-firewall Get-VMHostFirewallDefaultPolicyGet-VMHostFirewallExceptionSet-VMHostFirewallDefaultPolicySet-VMHostFirewallException
esxcli network firewall
vicfg-hostops Get-VMHostSet-VMHostRestart-VMHost
No equivalent
esxcfg-ipsecvicfg-ipsec
No equivalent No equivalent
esxcfg-swiscsiesxcfg-hwiscsivicfg-iscsi
Get-iScsiHBATargetNew-iScsiHBATargetSet-iScsiHBATargetRemove-iScsiHBATarget
esxcli iscsi
esxcfg-modulevicfg-module
Get-EsxCLI esxcli system module
esxcfg-mpathvicfg-mpath
Get-ScsiLunSet-ScsiLun
esxcli storage core path
vicfg-mpath35 Get-ScsiLunSet-ScsiLun
No equivalent
esxcfg-nasvicfg-nas
Get-DatastoreNew-DatastoreSet-Datastore
esxcli storage nfs
esxcfg-nicsvicfg-nics
Get-VMHostNetworkAdapterSet-VMHostNetworkAdapter
esxcli network nic
vicfg-ntp Get-VMHostNTPServerSet-VMHostNTPServer
No equivalent
esxcfg-rescanvicfg-rescan
Get-VMHostStorage –RescanAllHBA esxcli storage core
esxcfg-routevicfg-route
Set-VMHostNetwork No equivalent
esxcfg-scsidevsvicfg-scsidevs
Get-ScsiLunSet-ScsiLun
esxcli storage coreesxcli storage core filesystem
vicfg-snmp Get-VMHostSNMPSet-VMHostSNMP
No equivalent
vicfg-syslog Get-VMHostSysLogServerSet-VMHostSysLogServer
esxcli system syslog
vicfg-user Get-VMHostAccountSet-VMHostAccountNew-VMHostAccountRemove-VMHostAccount
No equivalent
esxcfg-vmknicvicfg-vmknic
Get-VMHostNetworkAdapterSet-VMHostNetworkAdapter
esxcli network interface
esxcfg-volumevicfg-volume
Get-View needed to call APIs esxcli storage filesystem
esxcfg-vswitchvicfg-vswitch
Get-VirtualSwitchSet-VirtualSwitchGet-VirtualPortGroupSet-VirtualPortgroup
esxcli network vswitch
vifs.pl Copy-DatastoreItemPSDrives
No equivalent
vihostupdate Install-VMHostPatch esxcli software
vihostupdate35 Install-VMHostPatch No equivalent
vmkfstools Get-HardDiskCopy-HardDiskSet-HardDisk
No equivalent
vmware-cmd Various cmdlets including:Get-VM Set-VM Get-SnapshotSet-Snapshot Get-VMGuestInfo Start-VM Stop-VM Restart-VM
No equivalent
esxtopresxtop
Get-EsxTop No equivalent
esxupdate Get-VMHostPatchInstall-VMHostPatch
esxcli software vib
vmkfstools No equivalent No equivalent
vmkping No equivalent No equivalent
vmware-cmd Multiple VM cmdlets available No equivalent
vm-support Get-Log No equivalent
adapternic
cpubootdeviceclockmemorypciplatform
adapternetworkportalphysicalnetworkportalsessionibftbootlogicalnetworkportalpluginsoftware
fencefirewallipvswitchnic
sourcesacceptanceprofilevib
corenmpvmfsfilesystemnfs
bootcoredumpmoduleprocesssecpolicysettingsstatssyslogvisorfshostnametimeuuidversionwelcomemsg
process
esxcli5.0
fcoe hardware iscsi network software storage system vm
List Registered VMs (vCLI only)# vmware-cmd --server --vihost –l
Unregister a VM (vCLI only)# vmware-cmd --server --vihost -s unregister /vmfs/volumes///.vmx
Register a VM (vCLI only)# vmware-cmd --server --vihost -s register /vmfs/volumes///.vmx
Get Guest OS Platform (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx getproductinfo platform
Get Platform Hosting VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx getproductinfo product
Power on a VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx start [ soft | hard ]
Power o� a VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx stop [ soft | hard ]
Reset a VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx reset [ soft | hard ]
Suspending a VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx suspend [ soft | hard ]
Resume a VM (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx resume
Show VM Uptime (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx getuptime
Show VMware Tools Status (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx gettoolslastactive
0 = not installed/not running1 = normal5 = intermittent heartbeat10 = no heartbeat
Create VM Snapshot (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx createsnapshot 0 0
Check if VM Has a Snapshot (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx hassnapshot
0 = snapshot exists1 = no snapshot
Revert to VM Snapshot (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx revertsnapshot
Remove VM Snapshot (vCLI only)# vmware-cmd --server --vihost /vmfs/volumes///.vmx removesnapshot
Forcibly Stop a VM with ESXCLI# esxcli vm process list
# esxcli vm process kill --type soft|hard|force --world-id
Setting up vMA FastPass# vifp addserver --username --password
# viftptarget --set
ESXCLI Command-Line Authentication# esxcli --server= --vihost= --user --password
ESXCLI Creating a Session File# save_session --savesessionfile --server --username --password
ESXCLI Using Windows Pass-Through AuthenticationC:\esxcli --server --passthroughauth --passthroughauthpackage “Kerberos” --vihost network ip interface list
ESXCLI Using Environment Variables# VI_USERNAME=root
# VI_PASSWORD=vmware123
# VI_SERVER=
vMA Docs: https://www.vmware.com/support/developer/vima/
vMA Downloads: http://www.vmware.com/downloads/login.do
vMA Community: http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/vima
vSphere SDK and Perl Documentation: https://www.vmware.com/support/developer/viperltoolkit/
vSphere Knowledge Base: http://kb.vmware.com/selfservice/microsites/microsite.do
vMALinux-based appliance that includes the vCLI and vSphere SDK for Perl Linux- RHEL 5.5 Server (32-bit and 64-bit)- SLES 10 SP1 (32-bit and 64-bit)- SLES 11 (32-bit and 64-bit)- Ubuntu 10.04 (32-bit and 64-bit)
vSwitchesList Defined Standard Virtual Switches# esxcli network vswitch standard list
Add/Remove a vSwitch# esxcli network vswitch standard [add|remove] --vswitch-name
Set MTU for a vSwitch# esxcli network vswitch standard set --mtu=9000 --vswitch-name
List Network Policy Settings# esxcli network vswitch standard policy [ failover | security | shaping ] get
Port GroupsList Defined Port Groups# esxcli network vswitch standard portgroup list
Add a Port Group# esxcli network vswitch standard portgroup [add|remove] --portgroup-name --vswitch-name
Add Active Uplink to Port Group# esxcli network vswitch standard portgroup policy failover set –-active-uplinks=
Set a Port Group vlan ID# esxcli network vswitch standard portgroup set --portgroup-name --vlan-id=
Add a Virtual Network Adaptor to Port Group# esxcli network ip interface add --portgroup-name
Configure the IP Address and netmask for a Port Group# esxcli network ip interface ipv4 set --interface-name= --ipv4= --netmask --type=static
List All Uplink Adapters# esxcli network nic list
List VMkernel Interfaces# esxcli network ip interface list
Add VMkernel Interface# esxcli network ip interface add –-interface-name= --portgroup-name=
List VMkernel Interfaces# esxcli network ip interface ipv4 set –-ip= --netmask= --interface-name=
Scan Storage Devices# esxcli storage core adapter rescan
VMFSShow all VMFS Volumes# esxcli storage filesystem list
Attach a Datastore# esxcli storage core device detached list
# esxcli storage core device set –d naa.XXX –state=on
Mount a Datastore# esxcli storage filesystem list
# esxcli storage filesystem volume mount –volume-label=label
NASList NAS Filesystems# esxcli storage nfs list
Add NAS Filesystem# esxcli storage nfs add –-host= --share=/path/to/share --volume-name=
Remove NAS Filesystem# esxcli storage nfs remove --volume-name=
iSCSIEnable Software iSCSI# esxcli iscsi software set –-enabled=true
List iSCSI Adapters# esxcli iscsi adapter list
Add iSCSI Adapters# esxcli iscsi networkportal add –n -A
Show iSCSI Status# esxcli iscsi software get
Set the iSCSI Name and Alias# esxcli iscsi adapter set –-adapter= --name=
# esxcli iscsi adapter set –-adapter= --alias=
Set iSCSI CHAP Authentication# esxcli iscsi adapter auth chap set –-direction=mutual –mchap_username= --mchap_password= --level=required --secret= --adapter=
Discover iSCSI Storage Devices# esxcli iscsi adapter discovery rediscover
Display host ESXi version# esxcli system version get
Set the system time# esxcli system time set --hour --min --sec
Set the banner message# esxcli system welcomemsg set --message
Configure a remote log host# esxcli system syslog config set --loghost=# esxcli system syslog reload
Configure a remote dump host# esxcli system coredump network set --interface-name --server-ipv4 --server-port 6500# esxcli system coredump network set --enable true
Join host to Active DirectoryJoin host to AD domain (vCLI only)# vicfg-authconfig --server= --username= --password= --authscheme AD --joindomain --adusername= --adpassword=
Verify AD domain (vCLI only)# vicfg-authconfig --server --authscheme AD –c
Host OperationsEnter/Exit Maintenance Mode (vCLI only)# vicfg-hostops --operation [enter | info | exit]
Shutdown/reboot a single host (vCLI only)# vicfg-hostops --operation [ shutdown | reboot ]
Host Backup/RestoreBackup host configuration (vCLI only)# vicfg-cfgbackup -s
Restore host configuration (vCLI only)# vicfg-cfgbackup -l
Managing ModulesList all modules# esxcli system module list [--enabled=true]
List all loaded modules# esxcli system module list --loaded=true
Enable/Disable modules# esxcli system module list --enabled = [ true | false ]
Configure NTPAdd NTP Server (vCLI only)# vicfg-ntp --add
Remove NTP Server (vCLI only)# vicfg-ntp --delete
Start NTP Service (vCLI only)# vicfg-ntp --start
List NTP Service (vCLI only)# vicfg-ntp --start
Stop NTP Service (vCLI only)# vicfg-ntp --stop
UsersList Users (vCLI only)# vicfg-user -e user –o list
Add User (vCLI only)# vicfg-user -e user –o add –l -p
Change User Password (vCLI only)# vicfg-user -e user –o modify –l -p
Assign User Read Only Role (vCLI only)# vicfg-user -e user –o modify –l --role read-only
Remove User (vCLI only)# vicfg-user -e user –o delete –l -g
GroupsList Groups (vCLI only)# vicfg-user -e group –o list
Add Group (vCLI only)# vicfg-user -e group –o add –d
Add User to Group (vCLI only)# vicfg-user -e group –o modify –d --adduser ,,
Remove User from Group (vCLI only)# vicfg-user -e group –o modify –d --removeuser
Remove Group (vCLI only)# vicfg-user -e group –o delete –d
Configure ESXi Dump Collector# esxcli system coredump network set –-interface-name vmk0 --server-ipv4= --port=# esxcli system coredump network set –-enabled=true# esxcli system coredump network get
Configure ESXi Syslog Collector# esxcli system syslog config set –-loghost=# esxcli system syslog reload
Attaching DevicesConnect CDROM (vCLI only)# vmware-cmd --server --vihost /vmfs/ volumes///.vmx connectdevice
Disconnect CDROM (vCLI only)# vmware-cmd --server --vihost /vmfs/ volumes///.vmx disconnectdevice
Manage RoutesSet Gateway (vCLI only)# vicfg-route
Add Route (vCLI only)# vicfg-route -add
List Routes (vCLI only)# vicfg-route
Configure DNSSet Fully Qualified Hostname# esxcli system hostname set --fdn=
Display DNS Servers# esxcli network ip dns server list
Add/Remove DNS Server# esxcli network ip dns server [add|remove] --server=
Display DNS Search Domain# esxcli network ip dns search list
Add/Remove DNS Search Domain# esxcli network ip dns server [add|remove] --domain=
Enable DHCP# esxcli network ip interface ipv4 set --interface-name= --type=dhcp
Set Static IP# esxcli network ip interface ipv4 set -- interface-name= --ipv4= --netmask= --type=static
Download ESXi: http://downloads.vmware.com/d/
ESXi Documentation: http://www.vmware.com/support/pubs/
ESXi Frequently Asked Questions: http://www.vmware.com/products/vsphere/esxi-and-esx/faqs.html#c177114
vSphere Install and Upgrade Community: http://communities.vmware.com/community/vmtn/server/vsphere/upgradecenter
ESXi 5 Community: http://communities.vmware.com/community/vmtn/server/vsphere/esxi5
ESXi 4 Community: http://communities.vmware.com/community/vmtn/server/vsphere/esxi
ESXi O�cial Blog: http://blogs.vmware.com/esxi/
Twitter: @VMwarevSphere, @VMwareESXi
vSphere Automation Tools Community: http://communities.vmware.com/community/vmtn/server/vsphere/automationtools?view=overview
Training: vSphere Transition to ESXi Essentials: http://mylearn.vmware.com/mgrreg/courses.cfm?ui=www_edu&a=one&id_subject=23970
Training: What Is New in ESXi 5.0: http://mylearn.vmware.com/mgrreg/courses.cfm?ui=www_edu&a=one&id_subject=24417
Running vCenter 5.0
Host on 32-bit or Incompatible
Hardware
Host RunningESX/ESXi 4.x
UpgradableBoot Disk
Replace Server
Upgrade to 4.x
New 5.0 InstallHost on 64-bit
CompatibleHardware
Upgrade to 5.0Using Update
Manager
Upgrade to 5.0Using ESXi
Installer
Non-UpgradableBoot Disk
Host RunningESX/ESXi 3.5
Windows- Windows Vista Enterprise SP1
(32-bit and 64-bit)- Windows 2008 64-bit- Windows 7 32-bit and 64-bit