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!
Awesome… Solved my very problem… Lifesaver.
Thanks. Works great 🙂
Hi,
Found this while waiting for VMware support….
All fixed and Guest back in business.
Cheers,
Jon
This worked perfectly for me.. thank you.
Thanks a lot…works like a dream.
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.
Thanks! That worked beautifully!
ty, trick still working @ esx 4.1 U1
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
d’oh vmid was stripped from the tools.cancelinstall command.
vim-cmd vmsvc/tools.cancelinstall VMID
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.
Its really nice, its solved my issue
Great. It works for me very very good
Thanks!!!!
ESXi: vim-cmd vmsvc/listallvms
ESXi: vim-cmd vmsvc/tools.cancelinstall
I can’t get this cmd to work
Invalid command ‘vmsvc/listallvms’.
Connecting to the host and ending the install worked just fine. Would be nice to know the steps to do this via SSH in a host.
Use getallvms instead of listallvms.
Simply amazing…saved my day!