vRealize Automation Windows Blueprint Administrator password set (via gugent)

Here is a very simple way (i.e. non Orchestrator workflow route) for allowing your users to define their own passwords for a Windows VM when they request it via the catalogue.  This method uses the vRA Guest Agent.

An excellent walk through on vCAC 6.2 of how to do this for Linux VMs (and the main inspiration for this post) can be found here:-

http://www.virtualvcp.com/vmware-vrealize-automation-vcac/207-vrealize-automation-6-2-specifying-a-new-root-password-using-custom-properties

A good post on how to prepare your Linux and Windows Templates for the vRA Guest Agent (gugent) operations can be found here:-

vRA7 – Gugent on Linux

vRA7 – Gugent on Windows

So assuming you have all the pre-reqs in place you then need to create a small batch file on your Windows template in say c:\scripts.

My .bat file is:-

…. and the contents of the script (where %1 is the argument you pass from the Blueprint Request form):-

You now need to create the Property Group, in vRA 7 this is in Administration > Property Dictionary > Property Groups.

Create a new group with the following script actions:-

[table]
Name,Value,Encrypted,Overridable,Show in Request
VMware.VirtualCenter.OperatingSystem,windows7Server64Guest,No,Yes,No
VirtualMachine.Customize.WaitComplete,true,No,Yes,No
VirtualMachine.Software0.Name,Generate new root password,No,Yes,No
InitialRootPassword,,No,Yes,No
VirtualMachine.Admin.UseGuestAgent,true,No,Yes,No
VirtualMachine.Software0.ScriptPath,c:\scripts\vCACSetAdministratorPassword.bat {InitialRootPassword},No,Yes,No
[/table]

When you’re done it should look like this:-

vra7_windows_gugentNow add your new Property Group to the Blueprint:-

vra7_windows_gugent_1

Once you have saved the Blueprint, try a deploy and see if it works.  If you are having problems then the first place to look is the gugent log files which by default are in:-