VMware

VCD – Deleted an external network – How to fix it?

Hello All,

I am back again , after pretty long time . I have quite busy with work and personal commitments recently.

This is an issue which I ran into recently,were a Direct or External network was deleted mistakenly by me in my lab. This caused an impact , as I was unable to manage my VMs from VCD , getting as “Underlying resource  not found” (sorry did’nt get the screenshot).

I quickly went into vCenter> Networking and recreated the network with the same name , but it does not work . Well, because although the name was same definitly the moref id would change .

So, now after lot of research and checking multiple tables in VCD and vCenter database , found the right queries to match the moref id again.

Step1 : Getting the moref from vCenter database for the recreated direct network

select * from dbo.vpx_dvportgroup where DVPORTGROUP_NAME = ‘VCD-DIRECT’;

Step2 : Getting the moref from the vcloud database for the direct network
SELECT * FROM real_network WHERE id IN (SELECT rnet_id FROM logical_network WHERE scope_type=1); 

These would be different , after re-creating the direct network , the moref on vcenter would change and not match with vCloud database.

Thus,as they were different , did a simple update query (google it out ) on vcloud database to update the moref to be the same as on vcenter database.

Did the power on operation from VCD  portal and everything is working now.

NOTE : All these operations were in testing and nothing is officially documented from VMware, please ensure valid backups are taken for both vCenter and VCD.

Better than that never delete the direct network !!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s