After publishing my recent article on how to audit vCenter Cloud Gateway and vCenter Server registrations for the vSphere+ Cloud Service, I thought it would also be useful to share some tips on how you can easily find your existing vCenter Cloud Gateway (VCGW) deployment(s) within your environment?
You might wonder, do I not already know about my VCGW deployment(s) or for that matter any other solution that is deployed within my own infrastructure? Yes, that would ideally be the case and you should also be able to look that up in your change management database (CMDB). However, over the years in speaking to many customers and hearing about some of the requests from our field teams, I have come to learn that this nirvana state does not exist for many of our customers.
In some organizations, it has been described as the wild wild west where teams of administrators with access to their vSphere environment can deploy any number of solution without ever communicating amongst each other to organizations that provide shared infrastructure access to other small teams and/or companies with a simliar set of challenges. Net net, it is certainly possible that solutions like the VCGW gateway may have been deployed or potentially even retired but have not been removed from your environment.
In this blog post, I want to help administrators easily find and identify a VCGW deployment within your vSphere environment, which is also very relavent to my previous blog post.
If the VCGW was deploy to a vCenter Server endpoint, we can leverage the vApp (OVF) properties which are defined on the VCGW and pretty much any other VMware Virtual Appliance solution, so this trick could be used to identify other VMware 2nd party or 3rd party solutions.
To demonstrate this, I will be using the vSphere API via PowerCLI and the following snippet will find all VMs that has the value "VMware vCenter Cloud Gateway" as the Product label.
$cloudGatewayVms = Get-View -ViewType VirtualMachine -Property Name,Guest.IpAddress,Guest.HostName,Config.VAppConfig -Filter @{"Config.VAppConfig.Product[0].Name"="VMware vCenter Cloud Gateway"} $results = @() foreach ($cloudGatewayVm in $cloudGatewayVms) { $tmp = [pscustomobject] [ordered]@{ Name = ${cloudGatewayVm}.Name; Version = ${cloudGatewayVm}.Config.VAppConfig.Product[0].FullVersion; Hostname = ${cloudGatewayVm}.Guest.HostName; IPAddress = ${cloudGatewayVm}.Guest.IpAddress; } $results += $tmp } $results
As you can see from the output below, in addition to the VM name, we are also able to pull the VCGW Version/Build as that is also encoded in the FullVersion label of the OVF property and I am also extracting the VM Hostname and IP Address for quick access.
Note: As mentioned earlier, you can easily key off of other OVF property labels including things like Vendor, which would give you a more comprehensive list of solutions from a given vendor. The Version and FullVersion may not always represent the current running software version as it is typically not updated after the initial deployment, so caution should be taken if you are using this to identify a deployed version of a VA.
Thanks for the comment!