VMware Cloud Community
BarryUWSEFS
Enthusiast
Enthusiast
Jump to solution

Orphaned VM Mystery

Hello, VSphere 6.7

I spent a couple hours researching this and still do not have a definitive answer.

I had a dozen or more Linked clone VM's that were no longer in VMware Horizon pools. I had shut them all down with the intention to delete them. I did some work on the cluster that initiated a failover. After the cluster was healthy again these VM's were all orphaned. I want to delete them from disk but most of the research I did only mentioned removing from inventory. When I look at the VSAN storage these all still have folders and vmdk. I tried to register one but that did not work.

I opened PowerCLI and  Get-VM -Name *  on the host. None of the orphaned VM's were listed. So now I am not sure what to do. Can I just remove from inventory and delete the data folders?

Thanks

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
NathanosBlightc
Commander
Commander
Jump to solution

If you remove/unregister from the ESXi web console or vCenter server directly, Horizon View Connection server doesn't know about it and think it still exists.

If you remove/unregister from the Connection server middle of connection interruption between Horizon servers and the vCenter, it may cause the VM to still be registered in the vCenter and doesn't remove them really. So remove operation of a VM from VDI desktop pool needs to knowledge of both vCenter and Connection Servers and database VDI and vSphere must be informed of this action, otherwise, you need to remove them by connecting to that mentioned databases. (Sometimes PowerCLI cannot find object of that VM if it's not belong to your virtual datacenter anymore )

Please mark my comment as the Correct Answer if this solution resolved your problem

View solution in original post

Reply
0 Kudos
2 Replies
NathanosBlightc
Commander
Commander
Jump to solution

If you remove/unregister from the ESXi web console or vCenter server directly, Horizon View Connection server doesn't know about it and think it still exists.

If you remove/unregister from the Connection server middle of connection interruption between Horizon servers and the vCenter, it may cause the VM to still be registered in the vCenter and doesn't remove them really. So remove operation of a VM from VDI desktop pool needs to knowledge of both vCenter and Connection Servers and database VDI and vSphere must be informed of this action, otherwise, you need to remove them by connecting to that mentioned databases. (Sometimes PowerCLI cannot find object of that VM if it's not belong to your virtual datacenter anymore )

Please mark my comment as the Correct Answer if this solution resolved your problem
Reply
0 Kudos
BarryUWSEFS
Enthusiast
Enthusiast
Jump to solution

Thank you Amin. Good explanation of the cause and process.

-Barry

Reply
0 Kudos