How to locate iso file uploaded in vCloud Director on backend datastore

6 Months back I got a case where one customer deployed a Cisco ASA v10 appliance in his on-prem and attached 2 CD drives in that VM and then transferred that VM in vCloud Air. Post transfer of VM, customer was not able to power on the VM as the second CD drive of VM was not mapped to iso which customer uploaded in his catalog.

If you are familiar with vCD UI, then you might be aware of the fact that vCD do not provides an option to end user to specify particular CD ROM device for inserting ISO file. The only option which user gets is “Insert CD/DVD from Catalog’ and when an iso is inserted, it is always mapped to first CD ROM device at vCenter level.

cd-catalog.PNG

Customer was looking for mapping the uploaded iso to his second CD ROM device from backend (vCenter) if possible.

Now being an administrator, it was easy for me to do the mapping, but the challenge was to find the datastore location where the ISO file was sitting. Any ISO that is uploaded in vCloud director, gets stored on backend datastore in a directory named ‘vcd-hostname/media/funky-uuid/one more funky uuid/media name.

The above mentioned directory structure looks like as below

cd-3.PNG

Also the iso file do not retain the name as given by user in vCD catalog. If you try to search the iso file in vCenter with its name, you will get nothing.

iso-vcenter.PNG

So the biggest challange for me was to find out the datastore location of the iso and its funky name. I started with firing API calls against catalog to see if it returns any meaningful info, but unfortunately I got nothing.

Next was to search VCDDB as anything that is stored in vCD, have its information stored in DB.

I looked at few tables and finally managed to get a table which gave me the exact info what I was looking for.

Used below query

select media_name,filepath,dstore_moref from managed_media where media_name = 'Esxi65.iso';

And got the following output 

Once you have got the datastore moref, its very easy to locate corresponding datastore name via MOB by typing this URL : https://vc-fqdn/mob/?moid=datastore-26313.

Also in above screenshot, you can complete path to media file.

I navigated to the datastore and then located the media file and inserted that ISO in second CD ROM device from vCenter and we got a happy customer at the end as his VM booted without any issues.

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

 

Add a Comment