You can update machine properties or deployments by using the available extensibility topics during the deployment life cycle.
To update the deployment payload, you can create new subscriptions using available extensibility topics such as Provisioning Request
and Disk Allocation
that call vRealize Orchestrator workflows or extensibility actions.
Prerequisites
Verify that you have access to the extensibility code samples package.
Procedure
- To customize machine CPU or memory properties, create a new extensibility subscription.
- Enter a subscription name. For example, Customize CPU/Memory.
- In Event Topic, select Provisioning request.
- Next to Action/workflow, set an output of type String called flavor.
Note: You cannot change the machine CPU and memory properties directly if you do not set a new flavor mapping. The output property must be called flavor, and the value must be an existing flavor mapping profile.The following code snippet is taken from a sample extensibility action.
def handler(context, inputs): outputs = { "flavor": "large" } return outputs
- To customize disk allocation, create another extensibility subscription.
- Enter a subscription name. For example, you can name it Disk size.
- In Event Topic, select Disk allocation.
- Next to Action/workflow, set an output of type Array called diskSizesInGb.
The following code snippet is taken from a sample vRealize Orchestrator workflow.
// Customize the size of the first VM disk var vm_disks = inputProperties.get("diskSizesInGb"); if (isParameterReadOnly("diskSizesInGb") == false) { vm_disks[0]=30; } diskSizesInGb = vm_disks;
- Request a new virtual machine from the vRealize Automation Catalog Item.
What to do next
Once the deployment is ready, navigate to the virtual machine settings. Verify that the CPU, memory, or disk size are set to the values configured in the extensibility action or vRealize Orchestrator workflow that are used in the subscriptions you created.