Find vCloud Director Orphaned VM’s

By | 03/10/2017

We all are familiar with concept of orphaned VM’s in vSphere. However orphaned VM’s in vCloud Director have slightly different meaning. 

From vCD perspective, virtual machines that are referenced in the vCenter database but not in the vCloud Director database are considered orphan VMs because vCD cannot access them even though they may be consuming compute and storage resources. This kind of reference mismatch can arise for a number of reasons, including high-volume workloads, database errors, and administrative actions.

Starting with vCD 8.2, VMware added one more option to cell management utility to locate such orphaned VM’s so that they can be removed or re-imported into vCloud Director. This utility is not available with any vCD version prior to 8.20.

The command to find orphaned VM’s is find-orphan-vms command which is used in conjunction with cell-management-tool and enables an administrator to list these VMs .

To list the options available with this command, run command: 

# /opt/vmware/vcloud-director/bin/cell-management-tool find-orphan-vms –help


If you are using self-signed certificates in vCD, then you have to specify truststore file and truststore password along with supplying vcd username/password and vcenter credentials etc. This is the full command that one can use: 

[root@vcd-a bin]# ./cell-management-tool find-orphan-vms –host vcd-a.alex.local -u admin –password vCD-Pwd –trustStore /opt/vmware/vcloud-director/vcd.ks –trustStorePassword vCloud@2017 –vc-name resourcevc01.alex.local –vc-user vcadmin@alex –vc-password passwd –output-file vmlist.txt

The above command will query all all Org VDC’s that are present in vCD and present the list of VM’s in the output file specified in above command.

You can use cat or less utility to see the contents of the output file. The file will list all orphaned VM’s/Org VDC. In my lab I did not had any orphaned VM’s so the list is empty

Below is an example taken from vCD documentation which shows the output when orphaned VM’s are found

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂

Category: vCloud Director

About Alex Hunt

Hi All I am Manish Jha. I am currently working in OVH US as Operations Support Engineer (vCloud Air Operations). I have around 7 Years of IT experience and have exposure on VMware vSphere, vCloud Director,vSphere Replication, vRealize Automation, NSX and RHEL. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.