While using VMware vCloud Automation Center Guest Agent or as many call it Gugent is not a mandatory requirements to use vCAC, it has its merits and use cases. In fact, many customers don’t end up deploying the vCAC Guest Agent within their Windows & Linux machines from day one, as not having the agent won’t stop vCAC from deploying a Windows or Linux VM and carry out the standard OS Customization. The interesting fact though, most of them end up installing it within their templates couple of months later, as they come up with a use case or two for it.
Let’s start by going over the vCAC Guest Agent use cases, and why should you install the Gugent within the templates you want to deploy with vCAC:
vCloud Automation Center Guest Agent Use Cases:
vRealize Automation 7 Note: Please note the below instruction are still valid for vRealize Automation 7.0, though in vRA 7.0 if you are planning to use the bootstrap agent to enable application installation features, then you will need to skip the below steps as the bootstrap agent installer will take care of most of it for you. For the instructions on installing the bootstrap agent in vRA 7.0 and higher, please check out my other post at: http://www.virtualizationteam.com/cloud/vrealize-automation-7-bootstrap-installation.html
vCAC Guest Agent Installation for Windows
1. Navigate to the vCloud Automation Center Appliance management console installation page. (Ex: https://vcac-hostname.vt.com:5480/installation, Please note download link for the Guest Agent in vRA 7.1 and higher has changed to https://vRealize_VA_Hostname_fqdn/software/index.html.)
2. Download and save the Windows guest agent files.
- Windows guest agent files (32-bit.)
- Windows guest agent files (64-bit.)
3. Right click on Gugentzip_x64.zip file, select properties, and mark them as unblock and click OK. If you don’t see the unblock button it means you either don’t have enough permissions or Windows UAC is disabled. If Windows UAC is disabled, it will even make your life easier.
4. Unpack GugentZip_version into the C drive on the template machine.
This produces the directory C:\VRMGuestAgent. Do not rename this directory.
5. Configure the guest agent to communicate with the Manager Service by running the following command in an elevated command prompt (using run as administrator):
winservice -i –h Manager_Service_Hostname_fdqn[:portnumber -p ssl].
- If you are not using load balancers in your environment, Manager_Service_Hostname_fdqn[:portnumber, is the fully qualified domain name and port number of the vCloud Automation Center Manager Service.
- If your environment uses a Manager Service load balancer, Manager_Service_Hostname_fdqn[:portnumber, is the fully qualified domain name and port number of the load balancer.
WinService.exe -i -h iaas.vt.com:443 -p ssl
Note: The name of the Windows service is VCACGuestAgentService. The installation log VCACGuestAgentService. log is in C:\VRMGuestAgent.
Note: If your certs CA does not push your root certificate to your machines, you might need to import it manually to your template.
Another ssl issue to be aware of is where the agent machine fails to get the cert.pem. This issue and its resolution is well documented at: http://vmwarevcloudvirtualization.blogspot.ca/2014/04/vcac-agent-ssl-issue.html
vCAC Guest Agent Installation for Linux
1. Navigate to the vCloud Automation Center Appliance management console installation page. (Ex: https://vcac-hostname.vt.com5480/installation.)
2. Download and save the Linux Guest Agent Packages.
3. Unpack the LinuxGuestAgentPkgs file.
4. Navigate to the LinuxGuestAgentPkgs file and locate the subdirectory that corresponds to the guest operating system that you are deploying during provisioning.
5. Install the guest agent using the RPM package. For example,
rpm -i gugent-6.0.0-2025.x86_64.rpm
6. Configure the guest agent to communicate with the Manager Service by running “installgugent.sh Manager_Service_Hostname_fdqn:portnumber ssl”
- If you are not using load balancers in your environment, Manager_Service_Hostname_fdqn:portnumber, is the fully qualified domain name and port number of the vCloud Automation Center Manager Service.
- If your environment uses a Manager Service load balancer, Manager_Service_Hostname_fdqn:portnumber, is the fully qualified domain name and port number of the load balancer.
./installgugent.sh iaas.vt.com:443 ssl
As well you probably want to follow the following KB to ensure the certs in place and trusted by your Linux VM: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2052085 or you can use the following command to import the certs to your Linux box:
echo | openssl s_client -connect manager_service_load_balancer.mycompany.com:443 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > cert.pem
As well if you don’t have a load balancer just use your first manager_service url instead. Further, make sure you run that command from /usr/share/gugent.
Beyond Guest Agent Installation:
Now that you have successfully setup your vCAC Gugent, it is time to put it to use. One of the largest use cases for the Gugent is to get it to run scripts within the Guest OS. I have written a blog post which document just that and can be found at: vCAC 6.x using gugent to run scripts