VMware Cloud Community
rcporto
Leadership
Leadership

Unable to make GuestAgent and Software Components working together

I have a Windows blueprint that I use custom properties to add the owner to the local administrators groups like described here: Adding the vRealize Automation machine owner to the local Administrator group in Windows when provis... and it works fine. But if I add a software component to just write a text to a log file, the deployment fails and if I remove the custom properties and try the deploy again, the deploy finish with success and the text is written to the log file.

Looking the VRMGuestAgent.log, looks like the custom properties that adds the owner to the local administrators groups is running more than one time (when we use in conjunction with a software component) and on the second execution, since the user is already on the Administrators groups, the execution fails and the deployment fails.

See part of the log:

2016-07-01 15:14:39 Application: [Information] vrm.software.command -> C:\VRMGuestAgent\scripts\addusertoadmin.cmd xxx@domain.local

2016-07-01 15:14:39 Application: [Information] Executing '10_installsoftware.bat' ...

2016-07-01 15:14:39 Application: [Information] Wait for completion of '10_installsoftware.bat'

2016-07-01 15:14:39 Application: [Error] Failure executing script '10_installsoftware.bat'

2016-07-01 15:14:39 Application: [Information]

2016-07-01 15:14:39 Application: [Information] c:\VRMGuestAgent\site\InstallSoftware>net localgroup Administrators /add xxx@domain.local

2016-07-01 15:14:39 Application: [Information] System error 1378 has occurred.

2016-07-01 15:14:39 Application: [Information]

2016-07-01 15:14:39 Application: [Information] The specified account name is already a member of the group.

2016-07-01 15:14:39 Application: [Information]

2016-07-01 15:14:39 Application: [Information]

2016-07-01 15:14:39 Application: [Information] <workItemResponse id="80bc522b-0a2c-4f06-b278-0bb10b20b0dc">

  <task type="InstallSoftware">

  <result succeeded="false">

  <message>Failure executing script &apos;10_installsoftware.bat&apos; - </message>

  </result>

  </task>

</workItemResponse>

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
4 Replies
td9857
Contributor
Contributor

Good morning, Seems that I am having the same issue, did you ever find a fix or a valid work around for this issue?

Reply
0 Kudos
daphnissov
Immortal
Immortal

In vRA 7, there is a custom property which can be used to add the owner to the local administrators group called "VirtualMachine.Admin.AddOwnerToAdmins". Set to 'True' to enable. This coupled with the custom property to use the guest agent should accomplish the task without any custom scripting needed. The property is documented in the 7.0 version on page 27 and on page 42 in the 7.1 documentation.

Reply
0 Kudos
rcporto
Leadership
Leadership

Hi daphnissov

I know about this custom property, but did you tested it with blueprint that use the clone provisioning? Because unless I'm missing something, this custom property cannot be used for provisioning by cloning, see:

vra.JPG

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
daphnissov
Immortal
Immortal

Hi rcporto‌, you are correct, and this is something I also discovered. I set about to find a solution that would enable this functionality since the Custom Property reference documentation is inconsistent. See this blog post for details and how you can deliver this ability with a small tweak to the guest agent.

Adding Machine Requestor to Local Administrators Group in vRA 7 | Sovereign Systems

Reply
0 Kudos