I had a customer with VMware Horizon 7.0.2 desktop pools with desktops that were stuck with errors while recomposing. We were seeing the error message : “View Composer Error: Failed to delete VM – null” on the Desktop Machines in VMware Horizon View Administrator.
To fix the issue I had to manually delete the Virtual machines from vCenter inventory and then clean up the VMware Horizon database. Once that was achieved, VMware Horizon re-provisioned the machines. The re-provisioned machines were available for users to access.
The below command can be used to clean up machines in error state in VMware Horizon View Administrator.
The tool I used was viewdbchk which was introduced with Horizon View 6.2. The viewdbchk file is located in the installation of Horizon View directory in the VMware Horizon View Connection servers. The location is : “Installation Drive”\Program Files\VMware\VMware View\Server\tools\bin directory.
- viewdbchk.cmd –scanMachines –limit 10
When the command was run, It scanned the desktops pools one by one for any machines in “Error” state and prompted if I wanted to delete the machines. A simple “yes” helped and we were able to delete the machines from VMware Horizon Admin console.
There are other ways also to fix the same issue but I found this to be the simplest one as it scanned the machines for errors in the environment.
The command would ask you to disable the desktop pool, scan for the machines in error state and will ask you if you want to enable the desktop pool again. If you do not want to scan a particular pool you can always type “no” when message appears to disable the desktop pool. If you type “no” it will skip that pool and move on to the next pool.
I hope this was helpful.