How To Remove vSphere FT Secondary Virtual Machines Without vCenter

Okay I know the title sounds a little bit like, “Why on earth would you need to do that?”.  Well as with everything this odd situation happened to me as I was rebuilding a lab kit in the Cambridge office.  Here is the situation that resulted in the need to deal with such an odd situation.

  • vCenter Server was toast and being a lab was not worth fixing
  • Updated the hosts to ESXi 5.1 using the offline bundle
  • Installed the vSphere 5.1 vCenter Appliance
  • Tried to add hosts previously managed to the new vCenter
  • The last operation fails with the error “Cannot add a host with virtual machines that have Fault Tolerance turned on as a stand-alone host.”

On further inspection of the hosts I noticed there was apparently someone messing around previously with VMware FT on these as you can see from the screen shots there was a secondary virtual machine that you cannot delete.

Once I realized why the error was being thrown, I needed to figure out a way to remove these stale objects.  So with the help of Jeremy Sage from GSS who is a friend of mine, we determined we could delete all the data off the disk using the datastore browser.  That was step one, but we still needed to deal with the inventory objects.  The fix for that was quite simple actually but I decided to let everyone know.

First log into the host with SSH, and browse to /etc/vmware/hostd and locate the vmInventory.xml file and edit it.  Once you edit it you will see the object information in the inventory for the stale object as shown below.

At this point simply delete the lines for the stale vSphere FT object close and save the file.

Lastly you just need to restart the hostd service or in my case I just restarted all services to be safe.  Once you have done that the host can be added into the new vSphere vCenter Server without a problem.

# /sbin/services.sh restart

Thanks to Jeremy for the help and getting me moving forward with this lab rebuild and maybe someone else can use this to help them get out of the same situation I was in.

About Chris Colotti

Chris is active on the VMUG and event speaking circuit and is available for many events if you want to reach out and ask. Previously to this he spent close to a decade working for VMware as a Principal Architect. Previous to his nine plus years at VMware, Chris was a System Administrator that evolved his career into a data center architect. Chris spends a lot of time mentoring co-workers and friends on the benefits of personal growth and professional development. Chris is also amongst the first VMware Certified Design Experts (VCDX#37), and author of multiple white papers. In his spare time he helps his wife Julie run her promotional products as the accountant, book keeper, and IT Support. Chris also believes in both a healthy body and healthy mind, and has become heavily involved with fitness as a Diamond Team Beachbody Coach using P90X and other Beachbody Programs. Although Technology is his day job, Chris is passionate about fitness after losing 60 pounds himself in the last few years.

8 comments

  1. Interesting. Probably a silly question, but does this do cleanup as well? I mean it seems like we’re simply unregistering the VM, so when we restart the service, does the kernel check the list, see what should/shouldn’t be there and — in this case — release all the resources used by the VM (e.g. the shadow’s memory res)?

  2. Hello Chris

    Thanks for the great tip . I was fiddling around with vmware KB for a while with this issue and your post comes as life saver . I am a trainer in Virtualization and the issue occurred when a FT enabled VM was accidentally removed from disk . Anyway thanks a lot once again .

  3. Thanks. It was really helpfull.

  4. thanks! worked perfectly

  5. This was a really life saver! THanks so much for sharing Chris.

Leave a Reply

Your email address will not be published. Required fields are marked *