VMware Cloud Community
Rahul418282
Contributor
Contributor

VM with additional disk in vRA 8.1 cloud assembly

Hi Guys, 

Is  there any way to allow end user to request for additional disks during provisioning phase?

If I go with following approach and don't provide disk 2 size in request form , deployment fails with 1024 disk size error

attachedDisks:
- source: '${resource.Cloud_vSphere_Disk_1.id}'
- source: '${resource.Cloud_vSphere_Disk_2.id}'

If I go with following approach, disks are not attached to guest OS in correct order. Disk 2 becomes disk 1 and disk 1 becomes disk 2 in GuestOS

attachedDisks: '${map_to_object(resource.Cloud_vSphere_Disk_1.id+resource.Cloud_vSphere_Disk_2.id, "source"}'

Has anyone achieved consistency in deployment of extra disks along with OS disk?

 

 

Labels (1)
0 Kudos
4 Replies
jimmyvandermast
Hot Shot
Hot Shot

I haven't had this issue yet, because I am not yet in that stage.
But I did save this in my bookmarks because I know I will need it later.

https://code.vmware.com/samples/7490/provisioning-additional-disks-with-vra8-with-ordered-mountpoint...

This is probably what you need.

0 Kudos
Rahul418282
Contributor
Contributor

@jimmyvandermast  Thanks for revert. I had gone through this link already. Have not tested it though as did not want to use vRO workflows for formatting the disk. 

Problem with following syntax is, disks don't get attached to GuestOS in same order as they were requested.

attachedDisks: '${map_to_object(resource.Cloud_vSphere_Disk_1[*].id+resource.Cloud_vSphere_Disk_2[*].id+resource.Cloud_vSphere_Disk_3[*].id+resource.Cloud_vSphere_Disk_4[*].id+resource.Cloud_vSphere_Disk_5[*].id,"source")}'

Interestingly, there is also no way to deploy VM with OS disk( size value hardcoded in image/template ) and one additional disk of size 12 GB without providing 12 GB in request form. 

Tags (1)
0 Kudos
jimmyvandermast
Hot Shot
Hot Shot

The chalenge that you describe is exacly what the article is about, which says: " vRA does not guarantee  that the  order of disk requests  matches the  order of the disks attached to the VM".

I'm not very happy with the fact that so much steps and additional config is needed for something that should be easy.
However if for you it's just that you don't want vRO to init/format the disk, you can simply remove the few lines that do that part.

0 Kudos
Ikester111
Contributor
Contributor

You can try to set the SCSIController ID and unitNumber.  This should always make the Hard Disk number consistent.

Code will look like this:

Cloud_Volume_1:

    type: Cloud.Volume

    properties:

      SCSIController: SCSI_Controller_1

      provisioningType: thick

      capacityGb: 5

      unitNumber: 1 

Then the VM will be Hard Disk 1, using SCSI controller 1, ID =1  (ie SCSI 1:1)

With Additional disks, you can use the same code but different scsi ID and the Hard Disk number will be the Hard Disk 2.

 

 

0 Kudos