ssh登录到esxi机器中后开关虚拟机
vim-cmd vmsvc/getallvms /查看ESXi上所有虚拟机信息,主要查看虚拟机对应的ID号
<a href="http://s1.51cto.com/wyfs02/M00/7B/5A/wKiom1bMJd6jxTMzAAAq6L3ALAg188.png" target="_blank"></a>
Vmid Name File Guest OS Version Annotation
30 win2003-ERP [500G] win2003-test-1/win2003-test-1.vmx winNetEnterpriseGuest vmx-08
32 centos-1 [500G] centos-1/centos-1.vmx centosGuest vmx-08
34 centos-SMB [500G] centos/centos.vmx centosGuest vmx-08
38 nas [500G] nas/nas.vmx other26xLinuxGuest vmx-08
46 win2008-DC [500G] win2008/win2008.vmx winLonghornGuest vmx-08
49 CactiEZ10 [250G] CactiEZ10/CactiEZ10.vmx centosGuest vmx-08
59 freenas1 [250G] freenas1/freenas1.vmx freebsdGuest vmx-08
62 panabit [250G] panabit/panabit.vmx other26xLinuxGuest vmx-08
vim-cmd vmsvc/power.on <VM ID> /对应ID的虚拟机即启动
vim-cmd vmsvc/power.shutdown 38 关闭nas
vim-cmd vmsvc/power.off 38 强行关机nas
vim-cmd vmsvc/power.getstate 38 查看nas开关机状态
本文转自 枫叶云 51CTO博客,原文链接:http://blog.51cto.com/fengyunshan911/1744389