Optimize Your Cloud Infrastructure

Finding ISO Images on vSphere Datastores with Cloud Director

As a VMware Cloud Director administrator, there may be times when you need to find information about the placement of ISO images on vSphere datastores that were uploaded to the catalog by clients. In this article, we will explore the workflow for finding ISO images on vSphere datastores when they are uploaded to Cloud Director. We will also provide a SQL SELECT statement that can be used to retrieve information about all ISO images of a specific organization from the Cloud Director database.

Workflow for Finding ISO Images on vSphere Datastores

When a client initiates the upload of an ISO image from the “Media & Other” menu of Cloud Director, they must choose an existing catalog that was created using the Datastore that is available to the Provider VDC of their current Organization VDC. The uploaded ISO image will be stored in the spool area at the NFS mount-point (/opt/vmware/vcloud-director/data/transfer), and a folder with a UUID-like name (transfer_handle_id at logical_disk table) will be created. If the client is uploading a template of the VM, the folder name will be “file”, and the uploaded file will be chunked into 50Mb pieces.

After the upload on the NFS share is completed, the file will be transferred to the vSphere Datastore that is backing the Storage policy of the Cloud Director client’s catalog. Once the copying process is successful, the source file with the folder on the NFS share (spool area) will be deleted. The files in the spool area are always associated with a transfer session (true for both upload and download).

Understanding the Structure of ISO Images on Datastores

To find the uploaded ISO images on vSphere datastores, we need to understand the structure of the folders at the Datastore level. The screenshot below shows the structure of folders at the Datastore level:

/vcd_SystemName/media/UUID-1/UUID-2/media-UUID3.iso

Let’s break down this structure:

* /vcd_SystemName/media/UUID-1/UUID-2/ – This is the path to the media folder of the Datastore.

* media-UUID3.iso – This is the name of the uploaded ISO image file.

What do the UUIDs mean?

* SystemName can be found in the public.config table.

* UUID-1 and UUID-2 are unique identifiers for the Datastore and the catalog, respectively.

* media-UUID3.iso is the name of the uploaded ISO image file.

Retrieving Information about Uploaded ISO Images with SQL SELECT

To retrieve information about all ISO images of a specific organization from the Cloud Director database, we can use the following SQL SELECT statement:

“`sql

SELECT * FROM public.config

JOIN logical_disk ON public.config.uuid = logical_disk.system_id

JOIN media ON logical_disk.uuid = media.logical_disk_id

WHERE public.config.org_id =

AND media.type = ‘iso’

AND media.state IN (‘available’, ‘copied’)

“`

This SQL SELECT statement will retrieve all ISO images of a specific organization that are available and copied to the Datastore. The resulting output will include information such as the name of the ISO image, the path to the file on the Datastore, and the UUIDs of the Datastore and catalog.

Conclusion

Finding ISO images on vSphere datastores with Cloud Director can be a straightforward process if you understand the workflow and structure of the files at the Datastore level. By using the SQL SELECT statement provided in this article, you can easily retrieve information about all ISO images of a specific organization from the Cloud Director database. This information can help you troubleshoot issues related to ISO image uploading and downloading, as well as provide valuable insights into the usage of your organization’s Cloud Director environment.