VMware Horizon is a Virtual Desktop Infrastructure (VDI) product which allows customers to easily virtualize desktops and manage them. Besides its core VDI purpose, it delivers applications and allows for easy management. If you want to read more about Horizon View features please read it on VMware site: https://www.vmware.com/products/horizon.html</a>.
I am working with a customer on Horizon based VDI implementation and today I want to share with you how to fix Desktop Pool stuck in delete state.
Whenever you delete Desktop Pool in VMware Horizon which is larger than ~20 desktops you might face the issue that the Desktop Pool will be stuck in deleting.
This issue occurs mostly when you decide to delete the Desktop Pool with all corresponding virtual machines.
I don't think it has anything to do with vCenter Server or VMware Horizon Connection Server because both of them were idling in terms of CPU/RAM resource usage.
In the web you can find several good resources how to fix the issue:
- http://vcdx56.com/2016/03/remove-horizon-view-desktops-pools-and-vms-stuck-in-delete-state/</a> Fix with the usage of the viewdbchk.cmd worked for me in one of the locations.
- In one of the locations vCenter was in different domain/network than Horizon View Connection Servers and I couldn't use viewdbchk.cmd due to the java keystore error. See more here https://labs.vmware.com/flings/viewdbchk/comments</a>
- https://jacob.gardiner-moon.co.uk/2016/08/15/removing-vmware-horizon-view-desktop-pools-stuck-in-deleting-stage/</a><br> When I tried to play with ADSI Edit and View Connection Server I had unexpected results (to be precise I broke replication between two Horizon Connection Servers - I am glad that I used snapshots 🙂 )
Easier Fix 🙂
Sometimes the solutions to fix some errors are easier than we think. I had one of the pool stuck in deleting for more than a week as I was busy with implementation of the VDI solution in other locations. By accident/luck, I clicked in Horizon View admin interface in Machines. While I was sorting the VDI's looking for one particular I saw the VDI's in deleting status.
Eureka! I clicked on one of the VM's and I was able to remove it from the inventory.
I clicked Remove button and the new window opened where I was able to remove the virtual machine stuck in deleting from Horizon View Connection Server.
Unfortunately, it isn't possible to select all VM's stuck in deleting mode and remove them, but one by one I was able to clean up the stuck Desktop Pool.
I hope this information will be useful to you and you will be able to clean up your Desktop Pool stuck in delete state.