SQL Query to get parent information from a volume name.

To determine which Enterprise, VDC, VApp and VM a volume belongs to you can run the next query under kinton environment.

SELECT rm.idResource, rm.idVirtualDatacenter, rm.idVirtualApp, rm.idVM, vm.idEnterprise
FROM
rasd_management rm,
virtualmachine vm
WHERE
rm.idVM = vm.idVM AND
rm.idResourceType = 8 AND
rm.idResource like '<volume_uuid>';

And this one that also retrieves storage device name which hosts the volume:

SELECT rm.idResource, rm.idVirtualDatacenter, rm.idVirtualApp, rm.idVM, vm.idEnterprise, sd.name, sd.idDatacenter
FROM
rasd_management rm,
virtualmachine vm,
rasd r,
storage_pool sp,
storage_device sd
WHERE
r.poolid = sp.idStorage AND
sp.idStorageDevice = sd.id AND
rm.idVM = vm.idVM AND
rm.idResource = r.instanceID AND
rm.idResourceType = 8 AND
rm.idResource like '<volume_name>';



Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk