VMWare ESXi CLI reference

All of these commands require ssh to be enabled on the VMware host and were tested on 5.1.

List all VMs:
vim-cmd vmsvc/getallvms

List power state of VM:
vim-cmd vmsvc/power.getstate

Power on VM
vim-cmd vmsvc/power.on

Power off VM
vim-cmd vmsvc/power.off

Other important commands under vmsvc:

Commands available under vmsvc/:
acquiremksticket get.snapshotinfo
acquireticket get.spaceNeededForConsolidation
connect get.summary
convert.toTemplate get.tasklist
convert.toVm getallvms
createdummyvm gethostconstraints
destroy login
device.connection logout
device.connusbdev message
device.disconnusbdev power.getstate
device.diskadd power.hibernate
device.diskaddexisting power.off
device.diskremove power.on
device.getdevices power.reboot
device.toolsSyncSet power.reset
device.vmiadd power.shutdown
device.vmiremove power.suspend
devices.createnic power.suspendResume
disconnect queryftcompat
get.capability reload
get.config setscreenres
get.config.cpuidmask snapshot.create
get.configoption snapshot.dumpoption
get.datastores snapshot.get
get.disabledmethods snapshot.remove
get.environment snapshot.removeall
get.filelayout snapshot.revert
get.filelayoutex snapshot.setoption
get.guest tools.cancelinstall
get.guestheartbeatStatus tools.install
get.managedentitystatus tools.upgrade
get.networks unregister
get.runtime upgrade

© 2017 The Forwarding Plane. All rights reserved.

Copyright 2016 Nick Buraglio, ForwardingPlane, LLC

%d bloggers like this: