How to utilize the Yaml and Custom form & add Multiple disks during provisioning in VRA8.X

As we all know VRA8 has introduced lot of feature and capabilities and Designing the blueprint using code is one of the them .

In VRA8.X yaml play very critical role in designing the blueprint . Recently I have come across the situation where we want to add disk during the provisioning time .

This can be accomplished in many ways like VRO workflow or ABX action and so on
,One of the way I have found is use the custom form and yaml.

To set up the blueprint for the first time , Make sure we have configured Content Source, Content sharing and Content .

Here is the my Form looks like .

Note: Once we choose the Required value as Yes – end user can enter disk size ,
If end user clicked No, then automatically 1 value will appear for both disk.
To do that I have set the conditional value in the form .

To create the disk during the provisioning time we need to get Cloud Volume object for each disk and then map it to Cloud machine object on attached disk property

Here is the Yaml Code for the same.

formatVersion: 1
#-------------------Input Start Here----------------#
    type: string
    description: <b>Choose the OS to deploy</b>
    default: VMW-PhotonOS
    title: Choose Image
      - title: CentOS
        const: VMW-CentOS
      - title: PhotonOS
        const: VMW-PhotonOS
      - title: DB Machine
        const: VMW-DB
      - title: Ubentu Machine
        const: VMW-Ubuntu
      - title: Web Server
        const: VMW-Web
    type: string
      - VMW-Large
      - VMW-Medium
      - VMW-Small
    title: Choose the size of VM
    type: integer
    type: integer
#----------------Input End Here------------#
    type: Cloud.Machine
      name: PhotonOS
      flavor: '${input.Flavor}'
      image: '${input.image}'
      customizationSpec: Lin-Cust
        - source: '${}'
        - source: '${}'
        - network: '${}'
    type: Cloud.vSphere.Network
      name: VMW-Production
      networkType: existing
    type: Cloud.Volume
      capacityGb: '${input.Disk1Size}'
    type: Cloud.Volume
      capacityGb: '${input.Disk2Size}'

Line 27-30 , we are defining the type of input from the user which is Integer
Line 40-42 , we are mapping the Cloud.Volume object to Cloud.machine object
Line 50-57 , we are mapping the input variable to Cloud.Volume object.

Lets switch to custom form side now to see how we are passing the default value when end user chooses No for extra disk

Caution: If you try to specify the value 0 , your build will get failed with below error.
Disk size should be greater than 1024 MB

To avoid this ,I have setup the minimum and maximum constraint on my form.

2 responses to “How to utilize the Yaml and Custom form & add Multiple disks during provisioning in VRA8.X”

  1. Thank you for a great post!
    I would add information, that if you want to skip creating an additional disk, the size should be set equal to 0, then it won’t be provisioned.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at

%d bloggers like this: