Vmware 如何杀死赢得';你不会死吗?

Vmware 如何杀死赢得';你不会死吗?,vmware,Vmware,我的虚拟机运行在一台服务器上,无法停止或重新启动—我无法再登录它,也无法使用VMware服务器控制台停止它。还有其他虚拟机正在运行,因此无法重新启动主机。是否有其他方法强制一台计算机停止?如果您使用的是Windows,虚拟机应该有自己的进程,该进程在任务管理器中可见。使用sysinternals找到正确的一个,然后从那里杀死它。如果您在linux上,那么您可以使用 ps axuw | grep vmware-vmx 正如@Dubas所指出的,您应该能够通过VMD的路径名识别出错误的进程 a)

我的虚拟机运行在一台服务器上,无法停止或重新启动—我无法再登录它,也无法使用VMware服务器控制台停止它。还有其他虚拟机正在运行,因此无法重新启动主机。是否有其他方法强制一台计算机停止?

如果您使用的是Windows,虚拟机应该有自己的进程,该进程在任务管理器中可见。使用sysinternals找到正确的一个,然后从那里杀死它。

如果您在linux上,那么您可以使用

ps axuw | grep vmware-vmx

正如@Dubas所指出的,您应该能够通过VMD的路径名识别出错误的进程

a) @Espo的评论和
b) 事实上,我只有Windows任务管理器可以使用

我登录到主机,打开任务管理器,并使用查看菜单将PID列添加到进程选项卡

我写下了(是的,用纸和笔写下了)盒子上运行的vmware-wmx.exe进程的每个实例的PID

使用VMWare控制台,我挂起了错误的虚拟机

当我恢复它时,我可以识别与我的机器相对应的vmware vmx进程,并可以杀死它


到目前为止似乎没有任何不良影响。

类似,但使用WMIC命令行获取进程ID和路径:

WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid
这将创建一个包含每个进程及其参数的文本文件。您可以在文件中搜索VM文件路径,并获取结束任务所需的正确进程ID


感谢提供了正确的命令行参数。

对于ESXi 5,您首先需要通过vSphere控制台启用ssh,然后登录并使用以下命令查找进程ID

ps -c | grep -i "machine name"

然后,您可以使用
kill

查找进程ID并结束进程。在某些情况下,您可能无法挂起进程,或者因此无法对VM执行任何“Power”操作。您可能已经有多个虚拟机启动并运行。使用此过程确定要终止的正确PID

在Windows 7上-打开任务管理器-查找名为“vmware vmx.exe”的进程,注意PID

切换到性能选项卡并启动“资源监视器”。展开“磁盘活动”面板。对“文件”列进行排序。为要杀死的VM查找适当的vmdk文件。“映像”列将列出“vmware vmx”进程。注意PID


切换回“进程”选项卡并关闭PID。

对于VmWare fusion,在按住alt键的同时单击“重新启动虚拟机”


请参见VMware网页中的以下内容

关闭ESXi主机(1014165)上的虚拟机电源 症状

您遇到以下问题:

You cannot power off an ESXi hosted virtual machine.
A virtual machine is not responsive and cannot be stopped or killed.

“使用ESXi 5.x esxcli命令关闭虚拟机电源

esxcli命令可用于本地或远程关闭运行在ESXi 5.x上的虚拟机。有关更多信息,请参阅vSphere命令行界面参考的esxcli vm命令部分

Open a console session where the esxcli tool is available, either in the ESXi Shell, the vSphere Management Assistant (vMA), or the location where the vSphere Command-Line Interface (vCLI) is installed.

Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file, using this command:

esxcli vm process list

Power off one of the virtual machines from the list using this command:

esxcli vm process kill --type=[soft,hard,force] --world-id=WorldNumber

Notes:
Three power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.
Alternate power off command syntax is: esxcli vm process kill -t [soft,hard,force] -w WorldNumber

Repeat Step 2 and validate that the virtual machine is no longer running.
对于ESXi 4.1:

Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file, using this command:

esxcli vms vm list

Power off one of the virtual machines from the list using this command:

esxcli vms vm kill --type=[soft,hard,force] --world-id=WorldNumber"

不会有任何不良影响。VMWare会分别处理每个VM的进程。事实上,它也会分别处理VM引擎和VM图形。因此,您的图形可能会崩溃,但您的VM会继续工作。很高兴看到它有所帮助。如果您使用Process Explorer,您可能会看到窗口标题和磁盘文件名,这将你不用打字了。(这些天谁在使用纸笔?:)太好了。使用这个命令,你可以查看机器的路径,轻松地选择正确的PID。