Or use 'Cloudbase-init' agent to bass configuration & call script in specific path on Windows OS to 'initialize & format raw disks' & resize disks [including boot disk size as well]
Original Message:
Sent: Oct 25, 2024 10:17 AM
From: Jinhoe
Subject: Resize VM boot disk during the compute provision phase
Hi, you can define boot disk size in Cloud Template
Cloud_vSphere_Machine_1: type: Cloud.vSphere.Machine allocatePerInstance: true properties: image: Ubuntu flavor: Small storage: bootDiskCapacityInGB: 20
Original Message:
Sent: Oct 24, 2024 11:37 AM
From: DizzyMurloc
Subject: Resize VM boot disk during the compute provision phase
Hi all,
I'm trying to resize the boot disk of a VM during its creation. The disk size is defined in the template I used to clone from, but I want to modify this value based on the input provided by the user in the service catalog form.
Here's how I'm attempting to achieve this:
- I've created a workflow that executes the Day 2 operation "Resize Boot Disk" via API.
- This workflow is triggered by a compute post-provision event subscription.
The problem I'm encountering is that if I enable the "block execution of events in topic" option, the workflow fails and returns the following error from the API request:
error{"message":"Another conflicting request is already in progress.","statusCode":409,"errorCode":20009}
With this option disabled, the resize works fine, but I need to confirm that the resize completes successfully before marking the deployment as complete.
Why am I getting this error? When the compute post-provision event is triggered, isn't the VM fully created yet?
On the other hand, is there another way to achieve this? I'm sure that executing a Day 2 operation isn't the best practice for resizing the VM boot disk, there must be a better way.
I hope someone can help me.
Regards,