A. There may be times when you can't manage ESX through the GUI, but thankfully you can still manage virtualization from the command prompt.
First, you can list all the VMs on a server using the vmware-cmd -l command. For example,
vmware-cmd -l
produces
/vmfs/volumes/f27f61fa-1c0f60ae/Test/Test.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalvdi01/savdalvdi01.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/savdalesxvc.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalappv01/savdalappv01
.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalvdi01/savdalvdi01.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/savdalesxvc.vmx
/vmfs/volumes/f27f61fa-1c0f60ae/savdalappv01/savdalappv01
.vmx
Note that you're shown the VMX location for each VMs. You need these paths to actually control the VMs.
To check if a VM is running, specify the VMX file and the getstate switch. For example,
vmware-cmd /vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/
savdalesxvc.vmx getstate
savdalesxvc.vmx getstate
returns
getstate() = off
To start a VM, just use the start switch. For example,
vmware-cmd /vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/
savdalesxvc.vmx start
savdalesxvc.vmx start
returns
start() = 1
The VM will now be running.
Related Reading:
- The Virtualization Stakes
- Q. How can I quickly get the status of all the virtual machines (VMs) System Center Virtual Machine Manager (VMM) is managing from PowerShell?
- Q. Can I perform Storage vMotion with ESX 3.5 and keep disks thin?
- Q. Are there disadvantages to using technologies that allow zero downtime migrations between virtual servers with different versions of a CPU?
Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.