Good morning guys !
First of all, please excuse my English !
I'm using Additional Disks object on my Cloud Template for which dimension (number of disk, size, and unitnumber) varies from a Array/properties input.
Here is the DIsk YAML part as described in my Cloud Template
AdditionalDisk:
type: Cloud.vSphere.Disk
ignoreChanges: true
allocatePerInstance: true
properties:
capacityGb: ${input.diskComputed[count.index].diskSize}
SCSIController: SCSI_Controller_0
customUnitNumber: ${input.diskComputed[count.index].diskScsiBus}
count: ${length(input.diskComputed)}
vmAssociationId: ${input.diskComputed[count.index].vmId}
It works great, and so users can choose not to add additionals disks or to add 1 to X disks.
But when I try to update the deployment to add a new disk, the disk is well created in vRA and attached to the VM (full custom code that calls an Update operation on the deployment) but is always created on a new folder at Datastore root level. This is very annoying, especially for backup etc...
Did I miss something ?
hi guys,
So I finally managed to set disks in the folder of the VM on which they're attached to.
To do that, 2 properties are injected through a workflow executed when Disk Allocation event is triggered (just as every other property in every step).
These 2 properties are not described in documentation, but are used during a "normal" disk creation (with the native Day2 action).
customProperties = new Properties()
customProperties.vmFolderPath = vmFolderPath //FOR EXEMPLE "[DATASTORE] VMName01"
customProperties.useVmFolderForCreate = "true" //NOT A BOOLEAN
Good morning guys,
It seems that there is no options for now to manage the disk datastore path with a property.
However I found that the Event Topic "Disk Attach" can update 3 properties on a disk before to Attach : diskFullPaths, diskParentDirs and diskNames. I've tried to update these 2 values but nothing change. It's like vRA do nothing.
Does anybody have more information about this particular topic ?
Thanks.
why don't you use add a disk Day 2 task instead of update deployment
Add a disk allows you to choose the VM folder
Hi ! Thanks for your message.
Because the vRA 8 TF engine doesn't allow to scale-out deployment with Additional Disks (or whatever the object type is) not specified in the YAML CT !
If I do that, an then try to Scale-Out de deployment, the additional disks will be destroyed...
But anyway, I think I've found the solution ! I'll be back soon to share it.
hi guys,
So I finally managed to set disks in the folder of the VM on which they're attached to.
To do that, 2 properties are injected through a workflow executed when Disk Allocation event is triggered (just as every other property in every step).
These 2 properties are not described in documentation, but are used during a "normal" disk creation (with the native Day2 action).
customProperties = new Properties()
customProperties.vmFolderPath = vmFolderPath //FOR EXEMPLE "[DATASTORE] VMName01"
customProperties.useVmFolderForCreate = "true" //NOT A BOOLEAN