Power off VM via command line

Power off VM via command line

VMware testing env: ESX 4.1, the command is fittable for ESXi 4

vim-cmd vmsvc/getallvms - this command checks for your existing VMs

vim-cmd vmsvc/power.off 16 - <vm id> on my ESXi is 16.

 

If you need to restart your VM on a daily basis I would edit and add the cron job in:

var/spool/cron/crontabs/root

Command for restarting any vm is:

vim-cmd vmsvc/power.restart <vm-id>

你可能感兴趣的:(command,power,line,VIA,off)