Switch the virtual machine on and off after ssh logs in to the esxi machine
Switch the virtual machine on and off after ssh logs in to the esxi machine
Vim-cmd vmsvc/getallvms / View the information of all virtual machines on ESXi, mainly check the corresponding ID number of virtual machines.
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
The virtual machine of vim-cmd vmsvc/power.on / corresponding ID starts immediately.
Vim-cmd vmsvc/power.shutdown 38 shuts down nas
Vim-cmd vmsvc/power.off 38 forcibly shuts down nas
Vim-cmd vmsvc/power.getstate 38 View the status of nas switch