Multiple Disks in vRA8 Blueprint

For MS Windows deployments I’m adding a multiple disks to a VM. This way I hope to be able to add second day operation for disk expiation directly on a device, which should improve user experience. The question is how to create disks input and then how to translate this in to multiple devices of different sizes connected to a VM?

Lets start with disk form input. This is what we are looking for:

Disk Input data

YAML code below should build this input for you.

I need only size and disk letter (mount point) but you can add storage type based on tag or disk label if you wish. Just be aware that some of those options will require additional automation on OS level. I force users to add at least one additional disk and allow to add max ten. For more sophisticated validation you will have to use vRO action and custom form validation option.

    type: array
    title: Additional Disks
    description: Additional data disks.
    maxItems: 10
    minItems: 1
      type: object
          type: string
          title: Mount Point
          type: integer
          title: Size (GB)
          minSize: 1
          maxSize: 1000
      - mountPoint: 'd:'
        size: 8

Now how to change this input in to disk devices? Add Cloud.vSphere.Disk in to your design canvas connect toy your VM and set count and capacityGb properties like this:

    type: Cloud.vSphere.Disk
    allocatePerInstance: true
      capacityGb: '${input.disks[count.index].diskSize}'
      mountPoint: '${input.disks[count.index].diskMount}'
      count: '${length(input.disks)}'
      provisioningType: thin

Now on your vSphere machine map the disks like this:

    type: Cloud.vSphere.Machine
      attachedDisks: '${map_to_object(resource.Disks[*].id, "source")}'

This will not format and mount the disk for you on OS level. You still have to do it via Cloudbase-Init or via tools scripting. But it will create right sized devices and connect it to your VM

vRA deployment view:

VM Deployment – Disks objects

vSphere VM configuration: