Recently, I got a case where a customer deployed a Cisco ASA v10 appliance in his on-prem environment and attached a couple of CD drives to that VM. The VM was then transferred to the vCloud Air. After the transfer, the customer was unable to power on the VM as the second CD drive of the VM was not mapped to the ISO that the customer uploaded to his catalog.
VCD does not provide an option to the end user to specify a particular CD-ROM device for inserting an ISO file. The only option available is “Insert CD/DVD from Catalog” and when the iso file is inserted, it is always mapped to the first CD-ROM device at the vCenter level.
The customer was looking to map the uploaded iso to his second CD-ROM device from the backend (vCenter) if possible.
The challenge was to find the datastore location where the ISO file was stored. Any ISO that is uploaded to vCloud Director gets stored on the backend datastore in a directory named ‘vcd-hostname/media/funky-uuid/one more funky uuid/media name.
The directory structure for media files looks as shown below
Also, the iso file does not retain the name provided by the user in the vCD catalog. If you attempt to search for the ISO file in vCenter by its name, you will get nothing.
The biggest challenge was to find the datastore location of the iso and its UUID. I started by firing API calls against the catalog to see if it returns any meaningful info, but unfortunately, I got nothing.
The next step was to search VCDDB, as any media file stored in vCD has its information stored in the database.
I reviewed a few tables and found one that provided the exact information I was looking for. The below SQL query finds the iso and the datastore where it is stored.
|
1 |
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, it’s very easy to locate the corresponding datastore name via MOB by typing this URL: https://vc-fqdn/mob/?moid=datastore-26313.
Also, in the above screenshot, you can see the complete path to the media file.
I navigated to the datastore and located the media file, and inserted that ISO in the second CD-ROM device from vCenter. Finally, the VM booted without any issues.
I hope you find this post informative. Feel free to share this on social media if it’s worth sharing.



