Skip to main content

How to kill an Unresponsive VM (ESXi 5.x)

When a Virtual Machine crashed it might happen that you cannot power it off with the vSphere Client. In that case, you have to kill the VM through the ESXi command-line.
Connect to the ESXi host with SSH. (If a virtual machine crashed in a cluster and you cannot identify where it is running, you have to identify the ESXi Hosts where the VM is running)
Locate the World ID with esxcli vm process list or vmdumper -l
[root@esx1:~] vmdumper -l
wid=
462925 pid=-1 cfgFile="/vmfs/volumes/5474e3ca-af7a8515-9aef-001b2193b3b0/vcsa.virten.lab/vcsa.virten.lab.vmx" uuid="56 4d a9 f8 05 4a d6 a6-cb 08 de 39 a6 e7 a4 38" displayName="vcsa.virten.lab" vmxCartelID=462924
[root@esx1:~] esxcli vm process list
vcsa.virten.lab
 World ID:
462925
 Process ID: 0
 VMX Cartel ID: 462924
 UUID: 56 4d a9 f8 05 4a d6 a6-cb 08 de 39 a6 e7 a4 38
 Display Name: vcsa.virten.lab
 Config File: /vmfs/volumes/5474e3ca-af7a8515-9aef-001b2193b3b0/vcsa.virten.lab/vcsa.virten.lab.vmx
The World ID in that case is 462925
Kill the World ID. The kill command has 3 options which should be used consecutively. Verify that the VM is no longer running with vmdumper after each step. If the process is still active (vmdumper output still displays the virtual machine) go to the next step:
  1. soft – Give theVMX process a chanceto shutdown cleanly (like kill or kill-SIGTERM)
    [root@esx1:~] esxcli vm process kill -w 462925 -t soft
    [root@esx1:~] vmdumper  -l |grep 462925
  2. hard – Kills the process immediately (like kill -9 or kill-SIGKILL)
    [root@esx1:~] esxcli vm process kill -w 462925 -t hard
    [root@esx1:~] vmdumper  -l |grep 462925
  3. force – Last resort attempt to kill the VM
    [root@esx1:~] esxcli vm process kill -w 462925 -t force
    [root@esx1:~] vmdumper  -l |grep 462925
  4. If the process is still running, reboot the ESXi host.


Comments

Popular posts from this blog

Visual Studio 2012 / 2013 Update 1 2 3 4 Offline Installer

Visual Studio 2012 Update 2 was released about a week ago.  This update includes lots of fixes and some features – you can see the list   here .  The only problem with the update is that Microsoft does not offer an offline installer.  If you are installing this on your own PC or for one person, you may not have a need for one.  But…  if your entire team needs to install this (or you just want to have it for later for a PC rebuild, you can download all 1.8 GB and have an offline installer for you or your team to share.  Here’s how: Get the update from Microsoft  here . (updated with Update 4 link) Save the file to a folder. open the folder Pro tip – Shift + right-click the background of the folder and choose ‘Open command window here’ in the command window type  VS2013.4.exe /Layout (or VS2013.1.exe /Layout or VS2013.2.exe /Layout depending on your update) It will then ask you w...

Deployment of the Microsoft Windows Malicious Software Removal Tool in an enterprise environment

INTRODUCTION Microsoft has released the Microsoft Windows Malicious Software Removal Tool to help you remove specific, prevalent malicious software from a computer.  Skip the details and download the tool For more information about how to download the tool, go to the following Microsoft webpage: http://www.microsoft.com/security/pc-security/malware-removal.aspx The information that is contained in this article is specific to the enterprise deployment of the tool. We highly recommend that you review the following Microsoft Knowledge Base article. It contains general information about the tool and about the download locations.  The tool is primarily intended for noncorporate users who do not have an existing, up-to-date antivirus product installed on their computers. However, the tool can also be deployed in an enterprise environment to enhance existing protection and as part of a defense-in-depth strategy. To deploy the tool in an enterprise environmen...

Enabling VNC Server on Solaris 10

By default, In Solaris 10, VNC service is almost configured. Below is the process to enable it. Check VNC service root#  svcs -a | grep -i vnc disabled 13:47:12 svc:/application/x11/xvnc-inetd:default We need to enable the VNC service root#  svcadm enable svc:/application/x11/xvnc-inetd:default By default, it broken we need to      so some changes. root#  svcs svc:/application/x11/xvnc-inetd:default STATE STIME FMRI maintenance 14:22:41 svc:/application/x11/xvnc-inetd:default Need to append vnc to the      /etc/services root#  echo “vnc-server\t5900/tcp\t\t\t# Xvnc” >>/etc/services Cross verify /etc/services root#  tail /etc/services snmpd 161/udp snmp # SMA snmp daemon vnc-server 5900/tcp # Xvnc Need to customizethe gnu display      manager root#  ls -al /etc/X11/gdm/custom.conf /etc/X11/gdm/custom.conf: No such file o...