Translate

Total Pageviews

My YouTube Channel

Monday, 14 December 2015

Creating an external network in VMware vCloud Director fails with the error: Failed to create external network as port group dvportgroup-XXX or its VLAN ID XXX is in use (2042474)

Symptoms

  • You cannot create an external network in vCloud Director (vCD).
  • Creating an external network in vCD fails.
  • You see the error:

    Failed to create external network as port group dvportgroup-XXX or its VLAN ID XXX is in use

Cause

This issue occurs: 
  • If stale Portgroup or VLAN entries exist in the vCloud Director database.
  • If elements are removed directly from vCenter Server. For example, if you delete portgroup XXX in vCenter Server before deleting it in vCloud Director or if you delete a vShield Edge device directly from vCenter Server.

Resolution

This issue is resolved in vCloud Director 5.1.2, available at VMware Downloads. For more information about this version, see the vCloud Director 5.1.2 Release Notes.

To work around this issue when you do not want to upgrade, manually remove the stale entries from the Resource_Assignment table in the vCloud Director database.

To manually remove stale entries from the vCloud Director database:
  1. Back up the vCloud Director database.
  2. Connect to the vCloud Director database.
  3. To verify stale entries for the VLAN, run this command:

    SELECT * from resource_assignment where resource_uri = 'urn:vlanid:xxx';

    Where xxx is the affected VLAN ID. 

    Note: The output returns only one result as the VLAN ID is unique.
  4. To verify stale entries for the portgroups associated with that VLAN, run this command:

    Note: Depending on your environment, you may have multiple entries for the VLAN

    SELECT * from resource_assignment where resource_uri in (
    SELECT owner_uri from resource_assignment where resource_uri = 'urn:vlanid:xxx');

  5. Verify if the affected portgroups or VLANs are in use in vCloud Director.

    • If the portgroups or VLANs are not in use, proceed to step 6 to delete the entries in the vCloud Director database.
    • If the portgroups or VLANs are in use, they may have been recreated with the same name.
  6. To delete the VLAN:xxx entry, run this command:

    DELETE from resource_assignment where resource_uri = 'urn:vlanid:xxx';
  7. To delete associated portgroup entries, run this command:

    DELETE from resource_assignment where resource_uri in (
    SELECT owner_uri from resource_assignment where resource_uri = 'urn:vlanid:xxx');
  8. To verify that the stale entries are removed, run this command:

    SELECT * from resource_assignment where resource_uri = 'urn:vlanid:xxx';
Source:-
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042474&src=vmw_so_vex_ragga_1012

No comments:

Post a Comment