esxi host command line interface can not be forced to close off the front end by the virtual machine ESXI

Environment: esxi5.1-esxi6.5

background: If esxi below a table vm crashed and stuck esxi console can not be used, in order not to affect the same esx vm under normal use of the other, then we can only use the command a separate line to restart this vm, got to ensure safety and efficiency. Now I will come four ways to restart the vm

login esxi Host: practice

methods of landing esxi:

1. Open the ssh service, and then go through ssh (usually the default is off)

2. monitor connected via the control port, or room, then press alt + f1 can also enter a password to go.

Three restart VM

1. to restart the by-cmd Vim:

Vim-cmd vmsvc / getallvms (vmid acquiring information of all the virtual machines)

 

off the virtual machine: vim-cmd vmsvc / power.off 3

on the virtual machine: vim-cmd vmsvc / power.on 3

restart the virtual machine: vim-cmd vmsvc / power.reset 3

acquires the current state of the virtual machine: Vim-cmd vmsvc / power.getstate. 3

 

2. use esxi esxcli command to shut down the host VM

 esxcli VM Process List (Get information running virtual machine)

 

off the virtual machine: vm process kill --type = hard --world -id = 245735

Note that there are three off the virtual machine mode: the lowest level of soft, hard to implement immediately, if you still can not shut down you can only use force mode.

See virtual machine has not been closed: esxcli vm process list (display this command, if not in the list, said inside has closed)

3. esxi transmission signal to close vm above

 description: the main command line virtual machines related processes stopped so close

 

 warning: this operation is potentially dangerous for esxi machine tools, ID if you can not correctly identify the process, manslaughter and other processes, will lead to unpredictable consequences, so try not to use general this method.

 

1) There is no need to know the following esxi virtual machine can use the following command in the Run:

 PS | grep VMX (respectively pid, parent process, called service)

 

2) From the above it can be seen that the father of my tw08c011s2 virtual machine process is 247,107, so I just put it kill off ok. Namely:

 the termination of the virtual machine parent process: kill 247107

 forcibly terminated: the kill -9 247 107  

3) were detected using the above command, you should be ok.

Guess you like

Origin www.cnblogs.com/xingyunfashi/p/11343692.html