VMware Aria Automation Tools

 View Only
  • 1.  Resize VM boot disk during the compute provision phase

    Posted Oct 24, 2024 11:38 AM

    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,



  • 2.  RE: Resize VM boot disk during the compute provision phase

    Posted Oct 25, 2024 10:18 AM

    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



  • 3.  RE: Resize VM boot disk during the compute provision phase

    Posted Oct 25, 2024 01:39 PM

    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]

    properties:

       cloudConfig: |
            #cloud-config
            runcmd:
              - 'dir C:\Temp\'

    Then call powershell script to 'initialize & format raw disks' & resize disks.



    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------



  • 4.  RE: Resize VM boot disk during the compute provision phase

    Posted Oct 28, 2024 02:42 AM

    The error you get when executing the Day2 action that you've creating is because another action (VM creation) is already in progress on the VM and by default, vRA doesn't allow multiple actions running at the same time on the same resource. This is why all Day2 actions are greyed out in the Web UI when another one is currently running.