Terminate a cloud resource

A cloud admin can configure the system to generate a change request whenever a user requests the early termination of a resource. When an instance reaches the end of its lease (or its grace period), the system auto-terminates the resource and notifies the user.

Before you begin

Role required: cloud_user who owns the VM, cloud operator, or cloud_admin

About this task

Caution: Termination deletes the resource and all associated data. You cannot restart a terminated resource. Be sure to capture all needed data before terminating.

Procedure

  1. Open the list of VMs by navigating to Cloud Management > Cloud Resources and clicking the Compute tab.
  2. Click the VM name.
  3. lick Terminate VM related link.
    If the resource Used for setting is Production, then the system creates a change request that must be approved by a cloud operator or cloud admin. If approval is not required, the system immediately terminates the VM. If approval is required, there may be a delay while an admin approves the change. You receive email when the admin approves. After the admin approves, return to the VM Instance form and click the Proceed with Change related link.

    The State of the VM becomes Terminated and the VM will no longer be visible in the My Virtual Assets portal.

    Important: AWS: The system does not delete volumes for terminated resources. Use the AWS console to delete volumes.

Example

Extension point format:
// To run customer workflow, replace the following code 
// with pushing a subflow to workflow.scratchpad.after_subflows which 
// needs to have properties for wfname and inputs

var subflow = {};
subflow.wfname = 'After Deprovision WF';
subflow.inputs = { 'u_sys_id': '' + current.sys_id };
workflow.scratchpad.after_subflows.push(subflow);

Any script or logic can be invoked. You can also populate any custom workflows to execute before the termination or after the termination.

Add all workflows to the workflow.scratchpad.before_subflows or workflow.scratchpad.after_subflows variables in the appropriate extension points. A return value of successindicates if the extension point was successful or not.

The termination workflows run the custom deprovision workflows one at a time and if any of them have errors, a task is created for the operator to manually resolve, and either proceed with termination if Before Deprovision fails, or just exit the termination workflow if After Deprovision fails.