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.