Start and stop ESXi VMs from console
Sometimes you don’t have VMware vSphere Client handy, or you might need to restart a server remotely via SSH. In these cases it’s great to be able to turn virtual machines on and off via the command line.
Read on for a brief overview.
Log on to the ESXi server using SSH and then you can use the following commands:
The basic command to control the virtual machines is
To list all virtual machines run:
To work with individual VMs you need the ID provided by the previous command. To get a summary of the machine run:
vim-cmd vmsvc/get.summary [ID]
To power on a VM run:
vim-cmd vmsvc/power.on [ID]
To power off a VM run
vim-cmd vmsvc/power.off [ID]
To suspend a VM run
vim-cmd vmsvc/power.suspend [ID]