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.
Tags In
Related Posts
Leave a Reply Cancel reply
You must be logged in to post a comment.