Chapter 6. Retirement
6.1. Retiring Virtual Machines
6.1.1. Retiring Virtual Machines and Instances
When a virtual machine or instance is no longer required, it can be retired. Once a virtual machine or instance reaches its retirement date, it is immediately shut down and not allowed to restart. If an attempt to restart is made, Red Hat CloudForms will shut down the virtual machine or instance.
There are three built-in policies involved with retirement:
- If the virtual machine or instance reaches its retirement date, it will be stopped even if it is running.
- If a retired virtual machine or instance is requested to start through Red Hat CloudForms, the virtual machine or instance will not be allowed to start.
- If a provider starts a retired virtual machine or instance outside of Red Hat CloudForms, the virtual machine or instance will be stopped.
Red Hat CloudForms provides a number of ways to retire a virtual machine or instance:
- By using the allocated buttons in the Red Hat CloudForms console.
- When creating a provision request, a retirement date can be set up.
6.1.2. Using the Console to Retire
Through the Red Hat CloudForms console, you can retire a virtual machine on a specific date or immediately.
6.1.3. Retiring a Virtual Machine Immediately
- Navigate to → .
- Select the virtual machine or instance that you want to retire.
-
Click
(Lifecycle), then
(Retire this VM/Instance).
The virtual machine or instance is immediately stopped, and will be shut down if an attempt is made to restart it.
6.1.4. Setting a Retirement Date for a Virtual Machine or Instance
- Navigate to → .
- Select the virtual machine that you want to set a retirement date for.
-
Click
(Lifecycle), then
(Set Retirement Date).
- Select a date using the calendar control.
- Click Save.
The retirement date is set, and displays in the virtual machine or instance summary screen.
6.1.5. Removing a Retirement Date for a Virtual Machine or Instance
- Navigate to → .
- Select the virtual machine or instance that you want to remove the retirement date from.
-
Click
(Lifecycle), then click
(Set Retirement Date).
-
Click
to remove the retirement date.
6.2. Setting Retirement in a Provision Request
If you are using Red Hat CloudForms to provision, you can set when you want retirement in the provision request. To see how to create a request, see Chapter 2, Provisioning Requests. A warning email will be sent to the owner before the retirement.
6.2.1. Scheduling Retirement in a Provision Request
When provisioning a cloud instance or virtual machine, a multi-tabbed screen appears where you can set up your provision requests.
- Click the Schedule tab to set when to provision your request and the lifespan of the virtual machine or instance.
- In Lifespan, you can choose to power on the virtual machines or instances after creation and set the Time until Retirement. If you select the time until retirement, you will select Retirement Warning accordingly.
Click Submit.
6.3. Extending Retirement Dates
Red Hat CloudForms Automate includes a method to extend the retirement of a virtual machine or instance by 14 days. This section describes how to create a button that invokes this method and how to edit the method to change the number of days.
6.3.1. Creating a Custom Button to Extend Retirement
- Navigate to → .
- Click the Buttons accordion.
- From the Object Types tree, select VM and Instance.
- Navigate to the button group to which you want to add this button. (If you do not have a button group, add one and then create the button.)
-
Click
(Configuration), then
(Add a new Button).
- Type in a button text and button hover text, and select the image you want to use.
-
In Object Details, select Request from the /System/Process/ dropdown. By default, the message is
create. Do not change it. -
In Request, type
vm_retire_extend. - Click Add.
6.3.2. Changing the Number of Days to Extend Retirement
- Navigate to → .
Click → → → → → .
NoteDOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.
This example uses the Cloud Namespace, but you can also use the Infrastructure namespace.
-
Click
(Configuration), then
(Edit this Instance).
- In the Value field, change the vm_retire_extend_days attribute to the new value.
-
Click Save.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.