<p>I've got a virtual machine running on a server that I can't stop or reboot - I can't log onto it anymore and I can't stop it using the VMware server console.  There are other VM's running so rebooting the host is out of the question. Is there any other way of forcing one machine to stop?</p>

[{'answer_id': 81743, 'author': 'Espo', 'author_id': 2257, 'author_profile': 'https://Stackoverflow.com/users/2257', 'pm_score': 5, 'selected': True, 'text': '<p>If you are using Windows, the virtual machine should have it\'s own process that is visible in task manager. Use sysinternals <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="noreferrer">Process Explorer</a> to find the right one and then kill it from there.</p>\n'}, {'answer_id': 81761, 'author': 'Ian', 'author_id': 4396, 'author_profile': 'https://Stackoverflow.com/users/4396', 'pm_score': 4, 'selected': False, 'text': "<p>If you're on linux then you can grab the guest processes with </p>\n\n<pre><code>ps axuw | grep vmware-vmx\n</code></pre>\n\n<p>As @Dubas pointed out, you should be able to pick out the errant process by the path name to the VMD</p>\n"}, {'answer_id': 81993, 'author': 'Rikalous', 'author_id': 4271, 'author_profile': 'https://Stackoverflow.com/users/4271', 'pm_score': 2, 'selected': False, 'text': "<p>Here's what I did based on   </p>\n\n<p>a) @Espo 's comments and<br>\nb) the fact that I only had Windows Task Manager to play with....</p>\n\n<p>I logged onto the host machine, opened Task Manager and used the view menu to add the PID column to the Processes tab.</p>\n\n<p>I wrote down (yes, with paper and a pen) the PID's for each and every instance of the vmware-wmx.exe process that was running on the box. </p>\n\n<p>Using the VMWare console, I suspended the errant virtual machine.</p>\n\n<p>When I resumed it, I could then identify the vmware-vmx process that corresponded to my machine and could kill it.</p>\n\n<p>There doesn't seem to have been any ill effects so far.</p>\n"}, {'answer_id': 7330794, 'author': 'Daniel Tallentire', 'author_id': 502968, 'author_profile': 'https://Stackoverflow.com/users/502968', 'pm_score': 2, 'selected': False, 'text': '<p>Similar, but using WMIC command line to obtain the process ID and path:</p>\n\n<pre><code>WMIC /OUTPUT:C:\\ProcessList.txt PROCESS get Caption,Commandline,Processid\n</code></pre>\n\n<p>This will create a text file with each process and its parameters.  You can search in the file for your VM File Path, and get the correct Process ID to end task with.</p>\n\n<p>Thanks to <a href="http://windowsxp.mvps.org/listproc.htm" rel="nofollow">http://windowsxp.mvps.org/listproc.htm</a> for the correct command line parameters.</p>\n'}, {'answer_id': 7355916, 'author': 'saschabeaumont', 'author_id': 592, 'author_profile': 'https://Stackoverflow.com/users/592', 'pm_score': 2, 'selected': False, 'text': '<p>For ESXi 5, you\'ll first want to enable ssh via the vSphere console and then login and use the following command to find the process ID</p>\n\n<pre><code>ps -c | grep -i "machine name"\n</code></pre>\n\n<p>You can then find the process ID and end the process using <code>kill</code></p>\n'}, {'answer_id': 11508733, 'author': 'EJ2020', 'author_id': 1529528, 'author_profile': 'https://Stackoverflow.com/users/1529528', 'pm_score': 3, 'selected': False, 'text': '<p>In some cases you may not be able to suspend, or for that matter take any of the "Power" actions on the VM. You may also already have multiple VMs up and running. Use this process to identify the correct PID to kill.</p>\n\n<p>On Windows 7 - Open Task Manager - Look for processes with the name, "vmware-vmx.exe", note the PIDs.</p>\n\n<p>Switch to the Performance tab and start the "Resource Monitor". Expand the "Disk Activity" panel. Sort the "File" column. Look for the appropriate vmdk file for the VM you want to kill. The "Image" column will have the "vmware-vmx" process listed. Note the PID.</p>\n\n<p>Switch back to the "Processes" tab and kill the PID.</p>\n'}, {'answer_id': 18319578, 'author': 'spuder', 'author_id': 1626687, 'author_profile': 'https://Stackoverflow.com/users/1626687', 'pm_score': 2, 'selected': False, 'text': '<p>For VmWare fusion, hold the <kbd>alt</kbd> key while you click \'restart virtual machine\' </p>\n\n<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1006215" rel="nofollow">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1006215</a></p>\n'}, {'answer_id': 18872792, 'author': 'Jocelyn', 'author_id': 1926197, 'author_profile': 'https://Stackoverflow.com/users/1926197', 'pm_score': 2, 'selected': False, 'text': '<p>see the following from VMware\'s webpage</p>\n\n<p>Powering off a virtual machine on an ESXi host (1014165)\nSymptoms</p>\n\n<p>You are experiencing these issues:</p>\n\n<pre><code>You cannot power off an ESXi hosted virtual machine.\nA virtual machine is not responsive and cannot be stopped or killed.\n</code></pre>\n\n<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1014165" rel="nofollow">http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1014165</a></p>\n\n<p>"Using the ESXi 5.x esxcli command to power off a virtual machine</p>\n\n<p>The esxcli command can be used locally or remotely to power off a virtual machine running on ESXi 5.x. For more information, see the esxcli vm Commands section of the vSphere Command-Line Interface Reference.</p>\n\n<pre><code>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.\n\nGet a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file, using this command:\n\nesxcli vm process list\n\nPower off one of the virtual machines from the list using this command:\n\nesxcli vm process kill --type=[soft,hard,force] --world-id=WorldNumber\n\nNotes:\nThree power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.\nAlternate power off command syntax is: esxcli vm process kill -t [soft,hard,force] -w WorldNumber\n\nRepeat Step 2 and validate that the virtual machine is no longer running.\n</code></pre>\n\n<p>For ESXi 4.1:</p>\n\n<pre><code>Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file, using this command:\n\nesxcli vms vm list\n\nPower off one of the virtual machines from the list using this command:\n\nesxcli vms vm kill --type=[soft,hard,force] --world-id=WorldNumber"\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/81732', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4271/']