VMWare Virtual Machine can’t migrate / vMotion because the VM is installing VMware Tools and cannot initiate a migration operation quick CLI fix

Posted by

Have you ever been trying to vMotion a VMWare virtual machine but get an error that prevents you because the VM is attempting to install VMWare Tools?  Has this ever occurred when trying to put a host into Maintenance Mode?  Are you looking for a quick way to vMotion the VM?  Below I have the CLI commands to execute on the ESXi host to cancel the VMWare Tools install so you can vMotion the VM.

Errors:

Machine generated alternative text:
Compatibility 
o 
There are compatibility issues that need your attentiorL 
Shaw 
CANCEL

There are compatibility issues that need your attention.

Machine generated alternative text:
Compatibility Issues 
Shaw by 
Compatibility Issue Host 
Virtual Machine 
0 
Virtual 
DALTSTMOSOI 
O The virtual machine is installing VMware Tools and 
cannot initiate a migration operation 
dalnpruxr01Nreemancocam 
No guest as heartbeats are being received Either the 
guest as is not responding or VMware Tools is not 
configured correctly 
dalnpruxr01Nreemancocam 
CL OSE

The virtual machine is installing VMware Tools and cannot initiate a migration operation

No guest OS heartbeats are being received. Either the guest OS is not responding or VMware Tools is not configured correctly.

Solution:
Log into the ESXi host via SSH.  Execute the following commands. 
#vim-cmd vmsvc/getallvms
Use the above command to get the Vmid of the VMs that haven’t been migrated

#vim-cmd vmsvc/tools.cancelinstall <vmid>
Use the above command to cancel the VMWare Tools Install for that VM

Summary:
As you can see there is not a lot of work once you identify the virtual machine and use the getallvms command to find it’s/their Vmid and cancel the install.  Once again, I hope y’all found this useful.

Leave a Reply