Useful VMware Commands

ESXi commands

List all VMs registered to this host with VMID         vim-cmd /vmsvc/getallvms

Get power state of a VM         vim-cmd /vmsvc/power.getstate <Vmid>

Power off VM             vim-cmd /vmsvc/ <Vmid>

Power on VM            vim-cmd /vmsvc/power.on <Vmid>

Register a VM           vim-cmd /solo/register /folder/file.vmx

Unregister a VM        vim-cmd /vmsvc/unregister <Vmid>

ESX Commands

Restart management services: Service mgmt-vmware restart
Find DNS servers: Cat /etc/resolv.conf
Check ESX version: esxupdate query
Restart vmware management: service vmware-vpxa restart

service mgmt- vmware restart

vdf –h view partion info (disk space etc)
ls –larth list files in a directory in by GB, MB (easy to see file sizes)
ls –larth *delta* as above but only show files with “delta” in the name
List registered VMs: vmware-cmd –l (gives machine id)
Check if VM powered on (e.g.): vmware-cmd /vmfs/volumes/4a006885-0aed81dd-0cdc-002219b72e1d/Exchange01/Exchange01.vmx getstate
Check if VM powered on (e.g.): Type ifconfig to check the current IP address.
esxcfg-vswif -i x.x.x.x vswif0
Example esxcfg-vswif -i vswif0
Check jumbo frames are working Vmkping –s 9000 <IP-address-SAN>
ifconfig Display IP information


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.