Top Posts
What’s New In VMware Cloud Foundation 9.0
Deploying & Configuring the VMware LCM Bundle Utility...
VMware Cloud Foundation: Don’t Forget About SSO Service...
VMware Explore Las Vegas 2025: Illuminating the Path...
Securing Software Updates for VMware Cloud Foundation: What...
VMware Cloud Foundation 5.2: A Guide to Simplified...
VMware Cloud Foundation 5.2: Unlocking Secure Hybrid Cloud...
VMware Cloud Foundation – Memory Tiering: Optimizing Memory...
Decoding VMware Cloud Foundation: Unveiling the numerous amount...
VMware Cloud Director 10.6.1: Taking Cloud Management to...
Virtual Bytes
  • Home
  • Home Data Center 2025
  • VMware
    • Cloud
    • Datacenter & Cloud Infrastructure
      • VMware ESXi
      • VMware vCenter
      • VMware vSAN
    • Networking & Security
    • Desktop & App Virtualization
      • Omnissa Horizon
    • Troubleshooting
    • Ansible
  • Education
  • Hardware
    • Hardware Tips & Tricks
  • Events
  • About
    • About Me
    • Home Lab Archives
      • Home Lab 2020-2022
      • Home Lab 2016-2020
Tag:

ADSI

Omnissa Horizon

Removing Invalid Instant Clones / Horizon Pool

by Tommy Grot October 19, 2020
written by Tommy Grot 3 minutes read

A quick tip for the day, if you encounter any issues with your Horizon platform and you bring it back up from a backup or any other issues, and you see that some Instant Clones are missing, no worries you will need to do few things to clean up your Horizon View, with the ViewDbChk and ADSI Edit.

First step, login to your Horizon server. Once you are logged in you will need to open ADSI Edit and run these commands specifically.

Right click on ADSI Edit -> Connect To

EXACTLY Fill it out like I have it, or you will run into issues or corrupt something else. Once it is all filled out, click OK.

Name: Horizon View ADAM
Connection Point: DC=vdi, DC=vmware, DC=int
Computer: localhost:389

Now you see that you are connected to the ADAM database and you will now drill down to the specific areas.

First you want to remove the specific Horizon Pool(s) Ex. My Lab Horizon server has two Pools Download Desktop, Remote Desktop. These are both test pools. Be very CAREFUL to make sure you delete the proper CN=HORIZON_POOL.

After the desktop pool objects within the OU=Applications are deleted, you will want to delete the corresponding CN=HORIZON_POOL in the OU=Server Groups, this I have noticed wouldn’t let me rebuild the Horizon Pools with the previous name. After the OU=Server Groups have been removed it worked and let me create a new pool.

Next steps, is to run the viewdbchk.cmd, you will have to execute this from Command Prompt, you will not be able to just click on the .cmd file. Below I have provided the path so you may copy it and paste it in Command Prompt, ran as Administrator.

cd C:\Program Files\VMware\VMware View\Server\tools\bin

Once the script is ran you will see syntax and switches to use. I have provided a table of all them.

ViewDbChk --findDesktop --desktopName <desktop name> [--verbose]
   Find a desktop pool by name.
ViewDbChk --enableDesktop --desktopName <desktop name> [--verbose]
   Enable a desktop pool.
ViewDbChk --disableDesktop --desktopName <desktop name> [--verbose]
   Disable a desktop pool.
ViewDbChk --findMachine --desktopName <desktop name> --machineName <machine name> [--verbose]
   Find a machine by name.
ViewDbChk --removeMachine --machineName <machine name> [--desktopName <desktop name>] [--force] [--noErrorCheck] [--verbose]
   Remove a machine from a desktop pool.
ViewDbChk --scanMachines [--desktopName <desktop name>] [--limit <maximum deletes>] [--force] [--verbose]
   Scan all machines for problems. The scan can optionally be limited to a specific desktop pool.
ViewDbChk --help [--commandName] [--verbose]
   Display help for all commands, or a specific command.

First, you will need to find the pool you want to operate on. But for this tutorial we will be removing the desktop pool. So you will need to scan for it

ViewDbChk --findDesktop --desktopName <desktop name> --verbose

Once you have found your Desktop Pool you want to scan, this will also delete the entry if the Virtual Machine is orphaned or no longer existing. If you encounter other issues, you will need to use the –force switch to forcefully remove the pool, but in my scenario I was able to remove a large pool of Instant Clones in the last image.

ViewDbChk --scanMachines --desktopName <desktop name> --limit <maximum deletes>  --verbose

That is it! If you were able to remove all the Virtual Machines that were stuck in the Horizon View, now you are able to re-use or create a new pool even with the same name!

October 19, 2020 0 comments 3.7K views
0 FacebookTwitterLinkedinEmail




Recent Posts

  • What’s New In VMware Cloud Foundation 9.0
  • Deploying & Configuring the VMware LCM Bundle Utility on Photon OS: A Step-by-Step Guide
  • VMware Cloud Foundation: Don’t Forget About SSO Service Accounts
  • VMware Explore Las Vegas 2025: Illuminating the Path to Cloud Excellence!
  • Securing Software Updates for VMware Cloud Foundation: What You Need to Know

AI AVI Vantage cloud Cloud Computing cloud director computing configure cyber security director dns domain controller ESXi How To las vegas llm llms multi-cloud multicloud NSx NSX-T 3.2.0 private AI servers ssh storage tenant upgrade vcd vcda VCDX vcenter VCF VDC vexpert Virtual Machines VMs vmware vmware.com vmware aria VMware Cloud Foundation VMware cluster VMware Explore VMware NSX vrslcm vsan walkthrough

  • Twitter
  • Instagram
  • Linkedin
  • Youtube

@2023 - All Right Reserved. Designed and Developed by Virtual Bytes

Virtual Bytes
  • Home
  • Home Data Center 2025
  • VMware
    • Cloud
    • Datacenter & Cloud Infrastructure
      • VMware ESXi
      • VMware vCenter
      • VMware vSAN
    • Networking & Security
    • Desktop & App Virtualization
      • Omnissa Horizon
    • Troubleshooting
    • Ansible
  • Education
  • Hardware
    • Hardware Tips & Tricks
  • Events
  • About
    • About Me
    • Home Lab Archives
      • Home Lab 2020-2022
      • Home Lab 2016-2020