As a tenant administrator, you want to create a snapshot of each virtual machine after it is created. You configure a workflow subscription based on the machine provisioning event topic, and publish it to make it active.

Before you begin

  • Log in to the vRealize Automation console as a tenant administrator.

  • Configure a vCenter Server plug-in as a vRealize Orchestrator endpoint. See Configuring vRealize Automation.

  • Verify that you have a vSphere virtual machine blueprint.

  • Verify that you have a vRealize Orchestrator workflow that creates a snapshot of a virtual machine. You cannot use the Create a snapshot workflow provided by the vRealize Automation plug-in. The provided snapshot workflow is specific to XaaS integration. See Configuring vRealize Orchestrator Workflows for Provisioning and Life Cycle Workflows.

About this task

You configure the workflow subscription to run a create snapshot workflow when a virtual machine is provisioned and the detected event message is in the activated state.

Procedure

  1. Select Administration > Events > Subscriptions
  2. Click the New icon (Add).
  3. Select Machine provisioning.
  4. Click Next.
  5. On the Conditions tab, configure the triggering conditions.
    1. Select Run based on conditions.
    2. From the Clause drop-down menu, select All of the following.
    3. Configure the following conditions:

      Property

      Operator

      Value

      Data > Machine > Machine type

      Equals

      Constant > Virtual Machine

      Data > Lifecycle state > Lifecycle state name

      Equals

      Constant > VMPSMasterWorkflow32.MachineActivated

      Data > Lifecycle state > State phase

      Equals

      Constant > POST

    4. Click Next.
  6. On the Workflow tab, browse the Orchestrator tree and select your Automation Post-Provisioning Snapshot workflow.
  7. Click Next.
  8. On the Details tab, enter the Name and Description.

    In this scenario, enter Post-Provisioning Virtual Machine Snapshot as the name and Create a snapshot when new virtual machine is provisioned and activated as the description.

  9. Click Finish.
  10. Select the Post-Provisioning Virtual Machine Snapshot row and click Publish.

Results

The workflow subscription is active and will trigger your snapshot workflow when an event message indicates that a requested virtual machine is provisioned and activated.

What to do next

To test the workflow subscription, request a virtual machine in the service catalog. After the request indicates successful provisioning, verify that the snapshot was created.