How to Cancel a Stuck VMware Tools Install from the ESX CLI

by Bob Plankers on December 11, 2009 · 15 comments

in How To,Virtualization

Q: I’m trying to evacuate a machine that is suffering a hardware failure, and one of the VMs thinks it is installing the VMware Tools, so it won’t VMotion. The error is “The virtual machine is installing VMware Tools and cannot initiate a migration operation.” I also cannot right-click the VM in vCenter and choose “End VMware Tools Install.” Is there a way for me to end the VMware Tools installation from the ESX command line?

A: Yes, it’s a two-step process once you’ve logged into the console OS of the ESX server where the VM is executing.

First, you need the ID of the VM (all on one line if it wraps):

/usr/bin/vmware-cmd /vmfs/volumes/datastore-name/vm-folder/vmx-file.vmx getid

Then you can do a:

/usr/bin/vmware-vim-cmd vmsvc/tools.cancelinstall idnumber

Have fun!

Related posts:

  1. Keep Your VMware Tools Up To Date
  2. Check and Upgrade VMware Tools
  3. Install the nano Editor on the VMware vMA 5
  4. How to Install Microsoft SQL Server 2008 R2 for VMware vCenter 5
  5. How to Install Microsoft SQL Server 2008 for VMware vCenter 4

{ 13 comments… read them below or add one }

Ash August 18, 2010 at 6:38 PM

Awesome… Solved my very problem… Lifesaver.

Reply

Steffan August 20, 2010 at 7:11 AM

Thanks. Works great :)

Reply

Jon September 23, 2010 at 4:56 PM

Hi,

Found this while waiting for VMware support….
All fixed and Guest back in business.

Cheers,

Jon

Reply

adam December 28, 2010 at 9:25 AM

This worked perfectly for me.. thank you.

Reply

Simon February 7, 2011 at 9:31 AM

Thanks a lot…works like a dream.

Reply

Derek April 13, 2011 at 1:47 PM

This will also work on ESXi hosts with a few modifications:

From a command line, type the following:
/vim-cmd vmsvc/getallvms

Note the Vmid of the VM with the stuck install and then use the second command as indicated:

/usr/bin/vim-cmd vmsvc/tools.cancelinstall vmid

Took me a while to figure this one out, so hopefully this will help others who have similar problems.

Reply

Matt May 24, 2011 at 5:47 AM

Thanks! That worked beautifully!

Reply

JC May 5, 2011 at 5:55 PM

ty, trick still working @ esx 4.1 U1

Reply

Steve December 15, 2011 at 9:17 AM

Thank you. Very frustrating problem, easily solved.

ESX: vmware-vim-cmd vmsvc/listallvms
ESX: vmware-vim-cmd vmsvc/tools.cancelinstall

ESXi: vim-cmd vmsvc/listallvms
ESXi: vim-cmd vmsvc/tools.cancelinstall

Reply

Steve December 15, 2011 at 9:20 AM

d’oh vmid was stripped from the tools.cancelinstall command.
vim-cmd vmsvc/tools.cancelinstall VMID

Reply

HK March 4, 2012 at 11:16 PM

An easier way…
Just connect to the esx/esxi directly via vsphere client, not through the Virtual Centre and dismount the tools from the Guest…end vmware tools install.

Reply

Edukondalu March 5, 2012 at 9:43 AM

Its really nice, its solved my issue

Reply

Kiko23 April 24, 2012 at 7:39 AM

Great. It works for me very very good

Thanks!!!!

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: