Dirmann Technology Consultants

vMotion Fails because VMTools is Installing

Team!

This is a “quickie, but goodie” post that I wanted to share with everyone. A project that we’re currently working on for a client is a massive migration of VMs into a VCF environment. During some of the migrations we hit a handful of VMs where we would get this error message:

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

Sure, you could log in to the guest operating system and eject the .iso file from the virtual CD-ROM. Or, you could right-click the guest in the ‘Hosts and Clusters’ or ‘VMs and Templates’ view, and choose ‘End VMTools Install’. What those cases with it’s a false positive and vCenter thinks there’s a Tools install going on? There is no ISO to eject, or install to end. Well, truth be told, I revert to the CLI for a lot of things as my go to solution, and this is one of them.

First, I enable SSH on the host because I don’t like to keep it enabled. I turned it on when I need to and shut it off when I’m done.

Enable SSH

Second, we need to SSH into the host that the VM currently resides on and execute some command via vim-cmd. The first command that we’ll execute is (remember, this is case-sensitive!):

vim-cmd vmsvc/getallvms

This will list all of the VMs on this host and provide us with the VM ID, inventory name, path to the .vmx, guest OS version, and VM hardware version. To trim down the output, I always pipe the command into grep and use a substring or VM name to search for as seen below.

vim-svc cmd

Finally, we look at the first column in the output and use that VM ID in our next command. In this example you can see that the VM ID of this VM is ’10’. We’ll run the following:

vim-cmd vmsvc/tools.cancelinstall 10

And that’s it! Tools “install” gone! vim-cmd isn’t limited to just this use. There’s actually a whole slew of commands that you can use. Anything pertaining to the modification of a VM or its status can be found under the vmsvc/ sub-command. Take a look!

Conclusion

Today, we quickly ran through what is and how to use the vim-cmd to assist you with stopping a phantom VMTools installation. The vim-cmd is my go to solution for this and can actually has many other uses. However, those will be topics for another day! Thanks for reading. If you enjoyed the post make sure you check us out at dirmann.tech and follow us on LinkedInTwitterInstagram, and Facebook!

Share this article on social media:
Facebooktwitterredditpinterestlinkedinmail