VMware Cloud Community
TheITHollow
Enthusiast
Enthusiast
Jump to solution

Datastore Decision in vRA7

I've got a scenario where a customer may want a single blueprint to be deployed on either replicated storage or non-replicated storage. Since this is a single blueprint that could be deployed on two different datastores, I can't use a Reservatoin Policy to make the decision because it's tied to an entire blueprint.

My plan was to:

  1. Execute an update property worfklow during the VMPSMasterWorkflow32.Requested Lifecycle State. That changed a reservation policy based on a user input.
  2. When the machine lifecycle state hits the VMPSMasterWorkflow32.BuildingMachine it would use the updated reservation policy to place the VM in the right datastore.

It turns out that this doesn't work.

The property updates successfully and you can see the property has been changed once the machine has been provi@sioned, but it doesn't use the changed value during provisioning.

Does anyone have any insight on a way to do this other than the usual suspects:

  • Post Provisioning Action to Storage vMotion the machine,
  • Publish two blueprints and make the user decide which one to use.
http://www.theithollow.com
1 Solution

Accepted Solutions
jadelzein
VMware Employee
VMware Employee
Jump to solution

If all you're looking for is storage selection, you can accomplish this by using the VirtualMachine.Storage.Name custom property...

Take a look at the following [old] post, starting at section 3b for the storage piece (excerpt below)... vCAC Property Dictionary: Customize Service Requests with Dynamic Menus - [virtualjad.com]

3b. Storage: VirtualMachine.Storage.Name - The reserved custom property “VirtualMachine.Storage.Name” defines which storage path (datastore) a machine will be deployed to. We’re going to define a list of available storage paths to allow users to select a preferred location, overriding vCAC’s own placement algorithm. For our use case, the list of storage paths will be tied to the datacenter location parent. Considering the Vrm.DataCenter.Location custom propery is tied to a specific Compute Resource, we need to make sure only storage paths that are available to that resource are available for selection. In fact, the storage paths we define here need to be available to the Resource Reservation allocation of the Compute Resource (this applies to Network Paths as well). To recall which storage and network resources have been allocated, check the “Resources” tab for each reservation.

Let me know if that does that trick...otherwise please expand a bit on the use case so I can better understand the desired end result.

++++

@virtualjad

View solution in original post

Reply
0 Kudos
4 Replies
jadelzein
VMware Employee
VMware Employee
Jump to solution

If all you're looking for is storage selection, you can accomplish this by using the VirtualMachine.Storage.Name custom property...

Take a look at the following [old] post, starting at section 3b for the storage piece (excerpt below)... vCAC Property Dictionary: Customize Service Requests with Dynamic Menus - [virtualjad.com]

3b. Storage: VirtualMachine.Storage.Name - The reserved custom property “VirtualMachine.Storage.Name” defines which storage path (datastore) a machine will be deployed to. We’re going to define a list of available storage paths to allow users to select a preferred location, overriding vCAC’s own placement algorithm. For our use case, the list of storage paths will be tied to the datacenter location parent. Considering the Vrm.DataCenter.Location custom propery is tied to a specific Compute Resource, we need to make sure only storage paths that are available to that resource are available for selection. In fact, the storage paths we define here need to be available to the Resource Reservation allocation of the Compute Resource (this applies to Network Paths as well). To recall which storage and network resources have been allocated, check the “Resources” tab for each reservation.

Let me know if that does that trick...otherwise please expand a bit on the use case so I can better understand the desired end result.

++++

@virtualjad

Reply
0 Kudos
matthiaseisner
Hot Shot
Hot Shot
Jump to solution

Hi,

I totally agree with Jad. Use this custom property. On top you have the possibility to create a pull-down menu allowing the requestor to select the datastore where the vm is going to be deployed to.

Kind Regards,

Matthias

TheITHollow
Enthusiast
Enthusiast
Jump to solution

Jad was dead on with this one. Thanks a lot!

I was updating the storage reservation policy custom property with vRO and that wasn't working.

Instead I updated these two custom properties and the machine provisioned as I had intended it to

  • VirtualMachine.Storage.Name
  • VirtualMachine.Disk0.Storage

Here was a property dump from the VMPSMasterWorkflow32.Requested event (Notice the datastore is "Synology02-NFS01"

1.PNG

The VMPSMasterWorkflow32.Requested event called my vRO workflow to update those two custom properties.

Then the VMPSMasterWorkflow32.BuildingMachine event ran and did another dump. Notice the datastore has been changed correctly.

2.PNG

Once the machine finished building in vSphere, here is the datastore it's located on.

3.PNG

http://www.theithollow.com
Michael_Rudloff
Enthusiast
Enthusiast
Jump to solution

Hasn't this changed in 7 though ?

I am trying to accomplish exactly that but fail to create a drop down for the selection.

I found the below, which would indicate you cannot use the old way of doing this as in your vCAC article Jad ?

Screen Shot 2016-03-31 at 10.25.21.png

TheITHollowjadelzein

___ My own knowledge base made public: http://open902.com
Reply
0 Kudos