Often the most basic examples of a request involve a machine with a single disk. In that simple use case, exposing a dropdown to the user to select a specific datastore, datastore cluster or storage policy isn’t onerous.

But what happens when you have multiple disks?

With multiple datastores (or datastore clusters) available in a reservation, you don’t have any kind of guarantee about where the disks will be placed unless you expose a property for each and every one.
I worked through this scenario with a customer this week whereby datastore clusters were created based on functionality (replicated/non replicated) and he wanted to provide the means for all disks to be placed on the same datastore cluster, without needing a property for each disk.

Enter a new custom property which I’ve not made use of before, and I suspect you haven’t either.

VirtualMachine.Storage.AllocationType
The available values are Collected or Distributed.

Collected will keep all disks together, while distributed will allow them to be placed on any datastore (or datastore cluster) available in the reservation.

Our solution in this case was to allow the selection of “replicated” or “non-replicated” values for VirtualMachine.Disk0.StorageReservationPolicy
and then make use of the new property mentioned above also, to keep the remaining disks with the original one.

So why not just allow the selection of each disk? If you need unique placement per disk then this makes sense, but selection of the same thing four times for four disks is not the best user experience.

Hope this helps!