Yesterday I decided it was time to patch my VMware vCenter 5.5 hosts to the recently released Update 3. As I make use of properly configured SSL certificates, each component (SSO, Web Client, Inventory and vCenter Server) has to be installed separately. However when I came to install the last one, I ran into an issue.
After recently moving my SQL databases to a new cluster, it appears I forgot to configure the SQL Server Agent. My existing vCenter Server (Update 2b) obviously didn’t mind, but when it came to a new installation it complained.
Time to fix that.
On cluster node owning the SQL group, run PowerShell:
Create the cluster resource type:
Add-ClusterResourceType "SQL Server Agent" C:\Windows\System32\SQAGTRES.DLL
Create a new resource from the new type you just added:
Add-ClusterResource -Name "SQL Server Agent" -ResourceType "SQL Server Agent" -Group "SQL Server (MSSQLSERVER)"
Configure the resource with the virtual server name:
Get-ClusterResource "SQL Server Agent" | Set-ClusterParameter VirtualServerName CLUSTER-SQL
Repeat the above command, this time configuring the SQL instance name. If you have configured only one instance, it will likely be the default name:
Get-ClusterResource "SQL Server Agent" | Set-ClusterParameter InstanceName MSSQLSERVER
Add the SQL installation as a dependency of the SQL Server Agent:
Add-ClusterResourceDependency "SQL Server Agent" "SQL Server"
Finally, bring the SQL Server Agent online:
Start-ClusterResource "SQL Server Agent"
The agent will now start.
It’s also worth adding that when installing vCenter 5.5, the account you use to connect to the SQL Server needs the sysadmin server role. However once the installation has completed, it can be removed.