vCloud can’t delete Organizational VDC

In my last VMware vCloud Director project I ran into an issue that I want to share with you. Initially the design was to create two OrgVDC to use different allocation models, but the resources would be almost the same because it was only a fairly small environment. I created one Edge Gateway and two OrgVDCs connected to this Edge Gateway, with a shared Org network. The first OrgVDC was meant to be for real performance testing and would get FC Storage, while the second orgVDC would host most VMs and was only for Development and testing.

Because of some changes in the final design, I didn’t need the first OrgVDC anymore and I tried to delete this, but this was impossible. When trying to delete it, the well known error: ‘The vCloud Org cannot be deleted because it is in use”. Checking all vApps, vApp Templates, catalogs etc, but there was nothing still connected to this OrgVDC except of course for the shared Organizational network and the shared Edge.

This is when I first noticed that the second OrgVDC didn’t show that the Edge was connected to it. See the screenshots.

FirstOrgVDC

SecondOrgVDC

The only way to delete the OrgVDC is to first delete the OrgNetwork the OrgVDC is connected to. It seems that somewhere inside vCloud the direct connection to the first OrgVDC with the OrgNetwork and the Edge remains the primary connection that can never be deleted without deleting the OrgNetwork. Creating a new OrgVDC that uses the shared OrgNet, doesn’t “transfer” the OrgNet to the second OrgVDC.

Seems logical, but I expected that somehow you could transfer this shared OrgNetwork and connect it to a new OrgNetwork. This does mean that any extra OrgVDCs you build on a shared OrgNet always stay dependent on the first OrgVDC that “created” the shared OrgNet. Good thing to remember in your next design.

  • nate

    This one is easy to fix at the database level…
    1. Select * from [vcloud].[dbo].[vdc_logical_resources]
    2. Copy the vdc_id of one of the rows that has lr_type = ‘NETWORK’ that is associated with your new Organization vDC.
    3. Identify the row for the Organization vDC Network that you want associated with a different Organization vDC. Copy the vdc_id from that row for safekeeping.

    4. Update that row to have the vdc_id from step 2.
    5. Refresh your view in vCloud. The Organization vDC Network is now associated with the desired Organization vDC.
    6. Delete the old Organization vDC in vCloud Director.

  • Matthias

    Hi Nate,
    does this also transfer the Edge Gateway to the new Organization vDC ?