Configure vRealize Automation not to delete virtual machines
During the POC we did a demo of the default vRealize Automation lease/archive/delete-process which I discussed yesterday. After seeing this the customer is worried that virtual machines with or without an archive period configured get deleted during holiday periods. So their question is, ‘is it possible to keep vRealize Automation from deleting the virtual machines altogether or can we keep the virtual machines in vSphere’.
A colleague had a similar question. His customer wants to prevent deletion of virtual machines to perform debugging after the guest customization fails. The default behavior of vRealize Automation is to delete the virtual machines when for whatever reason the deployment fails.
We can achieve this by modifying the vRealize Automation Agent Service. By changing the ‘doDeletes‘ setting to FALSE, vRealize Automation removes the virtual machines from its management and move the virtual machines to the VRMDeleted folder. The result is that these virtual machines no longer show up in the vRealize Automation portal as a managed item but in vSphere you can find the in the VRMDeleted folder.
To do this, go to the server on which you installed the Agent service, often this is the vRealize Automation IaaS Server, and modify the vRealize Automation Agent Service setting in the service’s executable configuration-file.
How to configure move to VRMDeleted folder
Follow these steps to modify the deletion policy for virtualization platforms:
- Log on to the server with the Agent service installed (vRealize Automation IaaS Server) with Administrator rights;
- Open a Windows command console as Administrator;
- Go to the installation directory (C:\Program Files (x86)\VMware\vCAC\Agents\);
- Go to the folder where the name of the agent is equal to the name of the folder that contains the agent;
In my case this is ‘vSphereAgent‘
- Check the current configuration settings by running the following command.
‘ .\DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config get‘
The output looks like this:
- To change the doDeletes property, we use the set command as shown below:
‘ .\DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config set doDeletes FALSE‘
If the syntax is right there should be no output.
- Now restart the vRealize Automation Agent Service (although it still has its old name).
In my case the service is named ‘VMware vCloud Automation Center Agent – vSphereAgent‘.
- If you want to change the configuration back to its default setting (TRUE), use this command:
‘ .\DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config set doDeletes TRUE‘
If the syntax is right there should be no output.
NOTE: When we used this in combination with NSX, the archival of a multi-tier application with NSX logical switches, edge and load balancers to the VRMDeleted folder, prevented the deletion of the logical switches. This was due to the fact that the virtual wires to the logical switches were still in use due to the archival of the virtual machines instead of a deletion.
Other articles in the series vRealize Automation:
- Infoblox & vRealize Automation, Setup IPAM endpoint
- Infoblox & vRealize Automation, Install Infoblox IPAM plugin
- Setup provisioning of vCloud Air workloads
- Setup a vCloud Air Endpoint in vRealize Automation
- Setup Postgres database high availability for vRealize Automation
- Setup vRealize Automation Cost profiles & currency
- Speed up vRealize Automation life cycle updates
- Configure vRealize Automation not to delete virtual machines
- Track infrastructure changes with vRealize Automation Data Collection
- MS SQL high availability support for vRealize Automation
- Setup the vRealize Automation prerequisites for IaaS
- vRealize Automation: How to …
- Downgrade the vRealize Automation license
- vRealize Automation 7 – New Architecture & Installation
- vRealize Automation 7 – Improved Authentication
- vRealize Automation 7 – Converged Blueprints
- vRealize Automation 7 – LifeCycle Extensibility
- How to transfer vRealize Automation payload to Orchestrator
- Automation is not difficult with vRealize Automation 7
- vRA custom host name using Orchestrator and Event Broker
- How to deliver Database-as-a-Service with vRealize Automation
- Prepare Windows for vRA software deployment
- Missing endpoints after upgrading to vRealize Automation 7.3
- How to run Containers as a Service – Part 1
- How to run Containers as a Service – Part 2
- Infoblox & vRealize Automation, IP Address Management (IPAM) made easy
- How to run Containers as a Service – Secure Docker communications
- Create a new database user using vRealize Automation XaaS
- Infoblox & vRealize Automation, Infoblox NIOS setup
- Infoblox & vRealize Automation, vRA setup
- vRealize Automation failed requests monitoring
- vRealize Automation 7.2 released
- How to specify a deployment target when using vRealize Automation
- vRealize Suite just became a lot easier with Lifecycle Manager
- LAMP Stacks made easy with VMware and Puppet
- How to: Deploy vRealize Automation 8