Software component provisioning fails with "Error writing to appd.properties" when using vRealize Automation 7.4
search cancel

Software component provisioning fails with "Error writing to appd.properties" when using vRealize Automation 7.4

book

Article ID: 317116

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
When attempting to provision a Windows guest operating system using a blueprint from vRealize Automation 7.4 with a Software component, failures and symptoms include:
  • The provisioning request appears stuck within the "MachineProvisioned" lifecycle located under: Infrastructure > Monitoring > Audit Log
  • Similar messages are seen in the GuestAgent.logWait for completion of '10_installsoftware.bat'
  • Provisioning request fails with: Error writing properties to C:\opt\vmware-appdirector\agent\appd.properties_<datetime>
Example: appd.properties_6/-01-_ 830_18,59
  • The following component requests failed:
<componentname>. Request failed: Machine <machinename>: InstallSoftwareWorkflow. Install software work item timeout.


Environment

VMware vRealize Automation 7.6.x
VMware vRealize Automation 7.4.x
VMware vRealize Automation 7.5.x

Cause

A race condition exists requiring a uniquely named appd.properties that occurs when:

  • Writing of the appd.properties file
  • The file being detected and read by agent bootstrap service.
To prevent this, a unique appd.properties file is created using the date/time stamp.  Post creation, it is renamed to appd.properties.  The uniquely named appd.properties file is generated based upon date/time and local settings of the guest operating system as seen here: 

set APPD_PROPERTIES_INPUT=%APPD_AGENT_DIRECTORY%\appd.properties_%date:~4,2%-%date:~7,2%-%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,5%

Resolution

This issue is resolved in vRealize Automation versions 7.2 and later.

Workaround:
To work around this issue you can follow these instructions:

Modify the Date/Time stamp generation logic within vcac-appd-gc.bat

Isolate the problematic template within vCenter:
  • Power on the template virtual machine after converting to virtual machine or power on the virtual machine snapshot:
    • Edit the file c:/opt/vmware-appdirector/agent-bootstrap/vcac-appd-gc.bat in a file editor of your choice:
      • Identify the following line:
set APPD_PROPERTIES_INPUT=%APPD_AGENT_DIRECTORY%\appd.properties_%date:~4,2%-%date:~7,2%-%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,5%
  • Replace the above line with the following logic:
    • set APPD_PROPERTIES_INPUT=%APPD_AGENT_DIRECTORY%\appd.properties_%random%
    • Save the file and close.
  • Power off the template and convert it, or power off the VM and take a snapshot.