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

Comments

  1. Doe sthis power the vm off still or do you need to add a separate vco workflow to do that now?

  2. Please, please, please update this information to include the fact that the Proxy Agent service(s) need to be restarted as indicated by VMware:

    http://pubs.vmware.com/vra-62/topic/com.vmware.vra.install.doc/GUID-0D0FDCFE-DF26-4168-A8DD-E29D058C066C.html

Trackbacks

  1. […] this post!!!! Thanks in part to Tom over at dailyhypervisor! The commands are the same but the locations have changed since his […]

Leave a comment

%d bloggers like this: