Duplicate VMs issue

Hello,

I am running SCVMM 2012 R2 with UR 5. Our VMs are running on the Windows Failover Cluster. One of the VMs (lets say VM1) is showing duplicated in the SCVMM Console.

Virtual Machine State of both duplicate VMs is Stopped, as well as the Status of both VMs is Stopped. When I try to delete any of the duplicate VMs, it prompts You have chosen to remove the following virtual machines from Virtual Machine Manager and delete their virtual hard disks: VM1. Do you want to continue?

Date Added of one VM is 1/26/2015, and the Date Added of other VM is 12/20/2014. When I migrate the VM from one host to another using the Failover Cluster Manager, it updates the Host name for both of the duplicate VM entries. Actually, I was just trying to see which entry is real and which one is fake.

Please help me to remove these duplicate VM entries.

Regards,
Hasan Bin Hasib

February 16th, 2015 2:52am

You can fix it by removing the vm from the console, its just a db error.

get-vm *name of vm* | where cloud -eq $null | remove-vm -force

Or get-scvirtualmchine *vmname* | remove-scvirtualmachine -force

and then readd the server till VMM

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 5:05am

You can fix it by removing the vm from the console, its just a db error.

get-vm *name of vm* | where cloud -eq $null | remove-vm -force

Or get-scvirtualmchine *vmname* | remove-scvirtualmachine -force

and then readd the server till VMM

February 16th, 2015 1:03pm

You can fix it by removing the vm from the console, its just a db error.

get-vm *name of vm* | where cloud -eq $null | remove-vm -force

Or get-scvirtualmchine *vmname* | remove-scvirtualmachine -force

and then readd the server till VMM

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 1:03pm

You can fix it by removing the vm from the console, its just a db error.

get-vm *name of vm* | where cloud -eq $null | remove-vm -force

Or get-scvirtualmchine *vmname* | remove-scvirtualmachine -force

and then readd the server till VMM

February 16th, 2015 1:03pm

Thanks Johan.

These commands to be run from VMM Command Shell?

Few days ago, I deleted a duplicate VM from SCVMM Console and it also deleted the VM from Hype-V, but thanks God that it was just a test VM. But I don't want to play this with my production VMs.

Regards,

Hasan Bin Hasib

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 11:51pm

As long as you have the VM online, VMM will not be able to remove the files, so its safe.

What you want to do here is to remove the incorrect record from the DB.

Ofc, if you are worried, you can always do a online clone ;)

February 17th, 2015 3:55am

Dear Sir,

I deleted a running VM from the SCVMM console, and it got deleted from Hyper-V. I have tested it. The Virual Machine State was Running. I was also shocked about this behaviour.

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 4:29am

Unsure on how you do it then.

If the VM is online, and you do remove-scvirtualmachine -force on it, only the record in VMM will be removed. And you would still see it in hyper-v manager.

February 17th, 2015 4:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics