Esx Cheat Sheet

 

—————————————————–

Get ESXi version
vmware -l

—————————————————-
Get ESXi Version with build

vmware -v

—————————————————–

Checking installed VIB

esxcli software vib list

—————————————————–

Stopping virtual machine from the esx server

vmware-cmd /vmfs/volumes/Volume for server/hostname/hostname.vmx stop trysoft hard
if comes back with 1 server is shutdown
e.g.
vmware-cmd /vmfs/volumes/ESX1_GB_DS1/vmlab01/vmlab01.vmx stop trysoft hard

————————————————–
Retrieve the UUID list

List path and names of .registered VM vmx files on the present host
Very important!
Use the path with the UUID (vmfslabel) where requested in vmware-cmd

vmware-cmd -l

————————————————–
Getstat ( gest VM stat )

Retrieve power state of the VM: off, on, suspended, stuck

vmware-cmd /vmfs/volume/vmfslabel/VMName/VMName.vmx getstate

—————————————————
Reboot virtual machine

Reboot the VM. First try a soft shutdown, then if necessary force a shutdown before reboot

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx reset trysoft

—————————————————
Start Virtual machine

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx start

—————————————————-
Suspend

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx suspend

—————————————————-
Query if VM has a snapshot

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx hassnapshot

—————————————————–
Createsnapshot

Quiesce will quiesce file system writes
Memory will grab the memory state (will lose pings during this)

vmware-cmd createsnapshot name description quiesce memory

——————————————————
Revertsnapshot

Revert to previous created snapshot (you loose the current VM state!)

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx revertsnapshot

——————————————————
Removesnapshots

Remove previous created snapshots (you keep the current VM state!)

vmware-cmd vmfs/volume/vmfslabel/VMName/VMName.vmx removesnapshots

——————————————————-
Register

Register VM (add to inventory)

vmware-cmd -s register vmfs/volume/vmfslabel/VMName/VMName.vmx

——————————————————-
Unregister

Unregister VM (add to inventory)

vmware-cmd -s unregister vmfs/volume/vmfslabel/VMName/VMName.vmx

——————————————————–

Lun Status

esxcfg-mpath -l

 

 

Please  Subscribe

 138 total views,  1 views today