/ BLOG / SCVMM 2008 duplicated, but missing, VMs

I’m afraid that for this blog entry you’re going to have to sit through some “bullshit-back-story”.

For whatever reason our live cluster, running under System Center Virtual Machine Manager (SCVMM) 2008 R2 had gained duplicate copies of 3 virtual machines, and all the duplicate VMs (Virtual Machines) were marked as missing.

SCVMM is a relatively new “toy” for me, however I’m already starting to feel the love-hate relationship growing, probably indicated by the fact that I’m referring to it as “scum” to my co-workers and friends. My point being forgive me if this is common knowledge. It doesn’t appear to be.

Delving deeper the Failover Cluster Manager MMC was showing only a single copy of the virtual machines in question. That narrowed it down to just SCVMM being the problem child. All attempts to perform a repair, or even an attempt at removal (despite my better judgement) in SCVMM itself resulted in a bullshit error message. Frankly a restore at 23:00 isn’t exactly what I’d want to have been doing any way, so I was somewhat pleased by that.

Poking further there appeared to be a MS KB (KB2308590) that directly addressed this problem No joy.

So, doing what I always do in these situations, I started prodding at the database that powers SCVMM, using SQL Studio Manager. Yeah it’s a GUI, but it was nearly midnight, and it was easier.

If you’re using the default database you’ll want to connect to COMPUTERNAME\MICROSOFT$VMM$. Otherwise it’ll be where ever you specified at install. The table that interests most of all is the tbl_WLC_VObject. If you select with a where statement to find your problem machines you should fine that you have duplicate entries. Carefully choose the entry that is not running, and delete it. Luckily our duplicates had no tags, and no owners, so it was actually fairly easy to figure out which ones to remove. Close and reload the SCVMM console and you should find that you have a less scary looking SCVMM administration console.

I’m sure that there are some bits left behind in other tables that are referencing the VMs, however I’m going to bed. It can be tidied in the morning.