VMware 虚拟机强制重启

    有时候虚拟机蓝屏,使用WEB或者“VMware vSphere Client”都无法关闭或者重启的时候,我们可以使用命令来强制重启虚拟机。


一、先确定虚拟机在哪台物理服务器上,然后开启对应服务器的SSH服务。

对应的 物理服务器 > 配置 > 安全配置文件 > 属性

VMware 虚拟机强制重启_第1张图片


二、开启SSH服务。

选中SSH服务 > 选项

VMware 虚拟机强制重启_第2张图片

启动 > 确定

VMware 虚拟机强制重启_第3张图片


三、使用工具连接SSH,我使用“putty”。

VMware 虚拟机强制重启_第4张图片


四、运行“esxcli vm process list”命令,查看运行的虚拟机。

VMware 虚拟机强制重启_第5张图片


五、使用“esxclivm process kill –type='hard' –world-id=137610”强制重启虚拟机。

VMware 虚拟机强制重启_第6张图片


过程:

~ # esxcli vm process list

SOESC_SafetyServer
   World ID: 137613
   Process ID: 0
   VMX Cartel ID: 137610
   UUID: 42 02 82 0f a8 5d af dd-32 78 23 9c 75 ce a6 7e
   Display Name: SOESC_SafetyServer
   Config File: /vmfs/volumes/5afbfd8d-4cd076de-08fa-001a6452093d/SOESC_SafetyServer/SOESC_SafetyServer.vmx
SOESC_LiveServer
   World ID: 252217
   Process ID: 0
   VMX Cartel ID: 250360
   UUID: 56 4d 43 75 0c a5 a6 f6-97 36 65 27 ca df b1 86
   Display Name: SOESC_LiveServer

   Config File: /vmfs/volumes/5afbfd8d-4cd076de-08fa-001a6452093d/SOESC_LiveServer/SOESC_LiveServer.vmx

~ # esxclivm process kill –type='hard' –world-id=137610


说明:

命令:esxcli vm processkill --type=[soft,hard,force] --world-id=WorldNumber 

type 选项:Soft 权限最低,hard 立即执行重启,不能关闭,再使用force模式。


你可能感兴趣的:(VMware)