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>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章