In many cases, especially when Embotics® vCommander™ is managing a lab environment, administrators need not approve all actions because the users are experienced in managing their needs. Once such scenario is using vCommander to provide self-service for a testing group that regularly decommissions their own virtual machines.


This article shows how to provide automatic decommissioning to particular users. In the examples below, this ability has been provided to users in the QA Active Directory group.

 

Using a Service Change Request Form


Using a service change request form is the most common option used, because it requires more commitment from a user, and thus cuts down on accidental decommissioning. In this example, a new form, approval workflow and completion workflow are used, named specifically for the group using them, but you can also use any existing objects as relevant.

First, create the form.

  1. Under the Configuration menu, choose Service Request Configuration.
  2. Switch to the Form Designer tab.
  3. Click Add.
  4. Enter QA Decomissioning as the Form Name.
  5. Choose Change Request Form as the Form Type.
  6. Choose Publish – Specific organizations, users and groups and Add the users or groups you want to have access to this request.​
  7. Click OK.
 

Next, create an approval workflow to use with the form.

  1. Switch to the Approval Workflow tab.
  2. Click Add.
  3. Enter QA Decommissioning as the Name.
  4. Choose to apply this workflow when a change request is created. Check both options under Automation options for change requests. Click Next.

  5. On the Assignment page, choose Allow these specific users/groups to access this workflow and add the same users or groups you specified for the form. Click Next.
  6. Add any Steps required as part of your workflow. To not send any notifications, but have the requests automatically approved, click Next without adding any steps.
  7. Set the Automation Options by checking QA Decommissioning  and choosing the appropriate fulfillment behavior. If you choose Automatic / Scheduled or Manual, check Immediately fulfill changes not requiring power down, as relevant. Click Next.


  8. Review your choices and click Finish.
 

Lastly, create a completion workflow and assign it to the form.

  1. Switch to the Completion Workflow tab.
  2.  Click Add.
  3. Enter QA Decommissioning as the Name. Click Next.
  4. On the Steps page, click Add Perform Power Action. Choose Shutdown Guest OS & Stop VM as the action.
  5. Click Add Perform Remove Action. Choose Delete From Disk. Click Next.
  6. Choose Apply this workflow to the selected forms and choose the form created in the first procedure above.


  7. Click Next.
  8. Review your choices and click Finish.
 

Now, portal users with roles which have permission to request service changes will be able to automatically delete their VMs.

Using a Command Workflow


Using a command workflow to automatically decommission a VM is less commonly used because there are fewer controls available around taking the action. However, it does offer the same function with less configuration if your users will be responsible.

First, create the Command Workflow.

  1. Under the Configuration menu, choose Command Workflows.
  2. Click Add.
  3. Enter Decommission as the Name and VM as the Type. Click Next.
  4. On the Steps page, click Add Perform Power Action. Choose Shutdown Guest OS & Stop VM as the action.
  5. Click Add Perform Remove Action. Choose Delete From Disk. Click Next.
  6. Choose Allow these specific users/groups to access this workflow and select appropriate users, groups and organizations. Click Next.


  7. Check Display in Service Portal and Prompt for Confirmation, providing a confirmation message such as “Running this command will permanently delete your virtual machine. Do you want to proceed?“. Click Next.
  8. Review your choices and click Finish.

The command workflow is now available for users with permission in the service portal.