Unlike the Linux installer, the Windows one does not give you a pretty wizard to install the agent. But it really is straight forward.
First, download the proper agent installer from your vRA appliance
- https://<FQDN vRA Appliance>:5480/installer/
Under Provisioning Utilities ensure you download the right architecture (64 or 32 Bit)
The downloaded file is a ZIP archive GuestAgentInstaller_x64.exe – save it to your C-Drive and execute it.
This will extract the files into the folder VRMGuestAgent
Using a command prompt, navigate to the folder
Run the following command, making sure you specify your Manager Service.
Here I only have a single IaaS server which includes the Manager Service
winservice -i -h Manager_Service_Hostname_fdqn:portnumber -p ssl
Verify that the service has been installed and is set to Automatic
There is no need to start it at this stage as we will shutting the server down anyway shortly.
Next thing we need to do is downloading the certificate from our IaaS Manager Server and copy it to the agent’s folder.
If not – you likely end up with errors when trying to use the Gugent
If you do not have the IaaS certificate in PEM format, then you will need to convert it, a good guide can be found HERE
Here you can see that I renamed the ‘original’ certificate and uploaded my own one
I then created a script to simply look up the current date and put it in a text file
- c:\date.cmd
Now shut down the server.
Before creating a Blueprint, ensure that the data collection is up to date. Either wait for the schedule or run a collection manually
Now create the Blueprint.
You can find my article how to create a Blueprint HERE. Here you can see that I created a bunch of Gugent related Custom Properties
You can find an explanation what each property does HERE but essentially you can see the most important one
- VirtualMachine.Sofware0.ScriptPath
You can see that the script I want to run after provisioning is called
- c:\date.cmd
All it does is getting the current date and copies it into a file called
- c:\date.txt
Now deploy a VM from this template. Once finished, you should be able to see above script output (or whatever you have configured)
You can also confirm a successful Gugent execution by checking the log in c:\VRMGuestAgent\GuestAgent.txt
That’s it – Happy scripting 🙂