How To Remove vSphere FT Secondary Virtual Machines Without vCenter • Chris Colotti's Blog

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 currently a Principal Technical Marketing Architect with the vCloud Air business unit at VMware. Chris is amongst the first VMware Certified Design Experts (VCDX#37), and author of multiple white papers. He spends much of his time working on customer facing collateral to help drive adoption and usage of VMware vCloud Air. Most recently Chris 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. Now he spreads both the word of technology and fitness along with the Team Beachbody Business through both his blogs.

  • http://twitter.com/vPic Phil Cohen

    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)?

    • http://www.chriscolotti.us/ Chris Colotti

      That I don’t know my first order of business was to get the host managed by the new vcenter. There does not seem to be any leftover from that VM though.

  • shyamlal

    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 .

    • http://www.v-fit.us/ Chris Colotti

      Thanks for the note! Glad it help you out.

  • Huseyin NAZIR

    Thanks. It was really helpfull.

Scroll To Top