在ESXi主机上关闭无响应的虚拟机.doc
文本预览下载声明
分类: LINUX
在ESXi主机上关闭无响应的虚拟机适用情况
该方法适用于以下情况:
ESXi主机上的虚拟机不能关闭。
虚拟机无响应且不能停止。
目的
这篇文章描述在ESXi环境中如何正确的关闭一台无响应的虚拟机。注意: 这篇文章只适用于ESXi主机,不适用于ESX主机。对于ESX主机,请参考 Powering off an unresponsive virtual machine on an ESX host (1004340).注意: 如果你尝试查找造成虚拟机无响应的原因,首先应当收集性能变化规律,然后中止虚拟机运行,从而收集更多的故障信息。要获得更多信息,请参考 Troubleshooting a virtual machine that has stopped responding: VMM and Guest CPU usage comparison (1017926) 或者 Troubleshooting a virtual machine that has stopped responding (1007819).
解决方案
警告: 请严格按照文章中的步骤操作。每一步操作对虚拟机都有一定的影响,所以请不要跳过其中任何一步!
用vSphere Client关闭虚拟机
用客户端尝试顺利关闭虚拟机:
1. 用vSphere Client或者 VI Client连接 VMware vCenter Server或VirtualCenter Server。
2. 右键单击要关闭的虚拟机,从弹出的快捷菜单中选择“电源-关闭客户机”。如果操作失败并提示“正在处理另一个任务”,请等待任务完成,或者参考 Powering off a virtual machine fails with the error: Cannot power Off: Another task is already in progress (1027040) 或 vCenter operation times out with the error: Operation failed since another task is in progress (1004790).
3. 如果虚拟机依然在运行,请尝试在主机上进行相同的操作。
4. 用vSphere Client或者 VI Client 直接连接ESXi主机来运行虚拟机。
5. 右键单击要关闭的虚拟机,从弹出的快捷菜单中选择“电源-关闭客户机”。
如果虚拟机使用客户端不能正常关机,请选用以下任一种命令行模式。
安装 vSphere Command-Line Interface 工具
vSphere Command-Line Interface (vCLI) 会在本文的某些步骤中用到,所以在使用前请确保你已经正确的安装了它。
对于ESXi 3.5 主机, 请在 Remote Command-Line Interface Installation and Reference Guide中参考Remote CLI Installation and Execution 。
对于ESXi 4.0 主机, 请在 vSphere Command-Line Interface Installation and Reference Guide中参考vSphere CLI Installation, Execution, and Command Overviews 。
对于 ESXi 4.1主机,请参考 vSphere Command-Line Interface Installation and Scripting Guide。
对于ESXi 5.0 主机,请参考 vSphere Command-Line Interface Documentation。
注意: 对于ESXi 4.x 和 ESX 5.0主机,远程命令行接口程序会通过vSphere Management Assistant (vMA) 访问。 如果你偏爱这个工具,请在 vSphere Command-Line Interface Installation and Reference Guide中参考 Installing vMA and Running Commands from vMA 。
确认虚拟机的位置
请确认虚拟机是在哪个主机上运行。你可以通过vSphere Client中虚拟机的“摘要”选项卡来查看相关信息。随后将在虚拟机所在的主机上运行相关命令来关闭虚拟机。
使用ESXi 5.0 主机的esxcli 命令来关闭虚拟机
esxcli 命令能够在本地或远程来关闭运行在ESXi 5.0主机上的虚拟机。要获得更
显示全部