Highlighted
Hot Shot
Hot Shot

Get storage reservation policy name assigned to a Datastore in the Compute Resource via vco

Jump to solution

I'm using vra 7.3 with embedded vco.

I'm trying to get the storage reservation policy assigned to a Datastore in the reservation in which i'm trying to deploy vm to be able to deploy the VM in a specific datastore.

It seems I'm not able to find the association between the datastore and the policy via vco.

I have the reservation name i'm using and the storagePath (datastore name) but cannot get the data from the vra page infrastructure/compute resources/configuration

Anyone know what query/function I can use to get this information? I've tried a lot of combination but I always end up with the storagePath and not with the Storage Reservation name that I need.

pastedImage_0.png

Thanks

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Enthusiast
Enthusiast

Getting in the weeds a little bit, you could query the IaaS MSSQL database directly for this kind of information. If you were to query the HostStorageReservationPolicy table you can capture the names, descriptions, and most importantly any IDs associated to your storage reservation policies. With that information you can join to the HostToStorageID table with the ID (HostStorageReservationPolicyID) and relate to the StoragePath field.

Hopefully this gets you started on what you're looking for. As always the typical disclaimer of take caution when querying this DB directly, especially if the query is large or takes a long time to compute rule applies. Smiley Happy

View solution in original post

0 Kudos
2 Replies
Highlighted
Enthusiast
Enthusiast

Getting in the weeds a little bit, you could query the IaaS MSSQL database directly for this kind of information. If you were to query the HostStorageReservationPolicy table you can capture the names, descriptions, and most importantly any IDs associated to your storage reservation policies. With that information you can join to the HostToStorageID table with the ID (HostStorageReservationPolicyID) and relate to the StoragePath field.

Hopefully this gets you started on what you're looking for. As always the typical disclaimer of take caution when querying this DB directly, especially if the query is large or takes a long time to compute rule applies. Smiley Happy

View solution in original post

0 Kudos
Highlighted
Hot Shot
Hot Shot

Thanks for the suggestion...

My need was to just be able to assign a datastore I choose to the VM disks so at the end I was able to do it without Storage reservation policy but just using VirtualMachine.Storage.Name / VirtualMachine.DiskN.Storage but being able to query the DB can be a good idea in some cases.

I've now some difficulties to set ip addresses Smiley Happy

0 Kudos