vCloud Automation Center – vCAC 5.1 – Preventing vCAC from Deleting Destroyed Virtual Machines

The default behavior in vCAC when destroying a vSphere virtual machine is to delete it completely and permanently.  In some environments and use cases, this may not be desired.  Luckily, vCAC allows you to change this behavior.  Instead of deleting them when they are destroyed, you can configure vCAC to power off virtual machines and move them to a folder called VRMDeleted in the vSphere Datacenter root (if this folder doesn’t exist, vCAC will create it on first use).  This can be especially helpful if you are troubleshooting post-provisioning or guest customization problems, as you will be able to investigate inside the guest operating system after the failure.

This setting is changed on the vSphere Proxy Agent for each vCenter you would like to affect.  To “turn off doDeletes”, perform the following steps:

  1. Login to the vSphere Proxy Agent system, open a command prompt, and change directories into the program folder for the appropriate vSphere Proxy Agent (%SystemDrive%\Program Files (x86)\DynamicOps\DCAC Agents\agentName by default).
  2. Run this command:
    DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config set doDeletes false
  3. Restart the proxy agent service
  4. To check your setting, execute the following:
    DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config get

    Your output should look something like this:

    endpoint: http://vCenterServerHostname/sdk
    doDeletes: False
    username: serviceAccountDomain\serviceAccountUsername

If you ever want to turn doDeletes back on, follow these steps:

  1. Login to the vSphere Proxy Agent system, open a command prompt, and change directories into the program folder for the appropriate vSphere Proxy Agent (%SystemDrive%\Program Files (x86)\DynamicOps\DCAC Agents\agentName by default).
  2. Run this command:
    DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config set doDeletes true
  3. To check your setting, execute the following:
    DynamicOps.Vrm.VRMencrypt.exe VRMAgent.exe.config get

    Your output should look something like this:

    endpoint: http://vCenterServerHostname/sdk
    doDeletes: True
    username: serviceAccountDomain\serviceAccountUsername

4 Replies to “vCloud Automation Center – vCAC 5.1 – Preventing vCAC from Deleting Destroyed Virtual Machines”

Leave a Reply