This is how it looks like:
So, how to remove duplicates.
Way to detect which one is 'original' and which one is 'duplicate', select VM, check on recent job and see which one has been live migrated. (Actually, it does not seem to matter if you remove duplicate or original, it is just a SCVMM database entry that we are removing. VM actually keeps running even if you remove both of those)
Open properties of that VM and start doing some change, for example like this:
And click 'View Script'
It opens notepad, where we can see ID of this VM in SCVMM database.
And rest is done in SCVMM Powershell. First, use get-vm and check that we get two VMs with different ID.
get-vm <servername>|fl id |
get-vm <servername>|where ID -eq "<ID>"|remove-vm -force |
And now important thing, you have to use "-force" switch. Remove-vm (or to be precise, Remove-SCVirtualMachine) without -force, removes all files and configurations of that VM, but when you use -force, it only removes entry from SCVMM database. Obvious, right?
Here is documentation: http://technet.microsoft.com/en-us/library/hh801721.aspx and quote from that page: 'NOTE: When used with the Force parameter, Remove-SCVirtualMachine only deletes the virtual machine from the VMM database. It does not delete the virtual machine itself.'
And why this happens? Well, I don't know. It seems to be a bug in SCVMM. For some reason, sometimes SCVMM 'detects' that new VM has been added to cluster. It happens 15-30 seconds before Live Migration is finished. And when it happens, you get duplicate VMs.