Failed to get dvportgroup properties of source Org VDC network

Not everyone has finished their NSX V>T migrations yet… I have had a couple of problems when using the VCDNSXMigration 1.4.2.1 tool, in the bridging process, it calls to get the dvpg settings. The problem is not the migration tool itself, but Cloud Director referring to a dvpg not in vCenter.

GET /cloudapi/1.0.0/orgVdcNetworks/urn:vcloud:network:1f5a73c5-7d39-4d5f-bee3-1652ce224b9e/dvpgProperties HTTP/1.1" 500 None.
Exception: Failed to get dvportgroup properties of source Org VDC network xxx

Emulating the same API call in Postman and you get a response that the requested portgroup does not exist.

Looking for the dvpg in the Cloud Director database shows us that VCD thinks it exists.

vcloud=#  select * from real_network_backing where dvpg_moref = 'dvportgroup-5945' and vc_id = (select id from virtual_center where name = 'vcsa');
                  id                  |               rnet_id                |                vc_id                 |    dvpg_moref
--------------------------------------+--------------------------------------+--------------------------------------+------------------
 1182fbdb-7ad4-4480-9773-8b926eddb2cc | 9e17dddc-5b75-49d2-8442-5f63d01a0862 | d0b752ac-be4c-4939-9245-d5e191806430 | dvportgroup-5945
(1 row)

To check that vCenter agress that it does not exist, we can use MOB to see if tere is a entry. If it gives back 404 we are good to delete the entry in the VCD database.

If we get a 404, it means that vCenter does not know about it, and you can proceed with the Cloud Director database cleanup.

delete from real_network_backing where dvpg_moref = 'dvportgroup-5945' and vc_id = (select id from virtual_center where name = 'vcsa');
DELETE 1
vcloud=#

The stall entry has now been cleaned, and when you now the postman call you get a valid JSON in return.

{
    "dvpgProperties": [
        {
            "dvpgMoref": "dvportgroup-5945",
            "vlanId": null,
            "promiscuousMode": true,
            "forgedTransmit": true,
            "dvSwitch": {
                "backingRef": {
                    "id": "dvs-20",
                    "name": null
                },
                "virtualCenter": {
                    "name": "vcsa",
                    "id": "urn:vcloud:vimserver:d0b752ac-be4c-4939-9245-d5e191806430"
                }
            }
        }
    ]
}

Conclusion

It’s a bug in VCD for NSX-V logical wires. Hopefully, the usage for this will soon be over because all are finishing up their NSX-V migrations. But until then there is a fix for it with the above process.

Was this post helpful?

Was this article helpful?
YesNo

Jesper Ramsgaard