Installing a highly available Virtual Machine Manager server
This recipe provides the steps required to install VMM on a multiserver environment. This will involve creating several Windows Server Failover Clusters:
- A cluster of two servers for a SQL Server 2012 AlwaysOn Availability Group
- A cluster of two servers for VMM Management Server
- A cluster of two servers for the VMM Library Server
A multiserver installation for VMM can give you a great deal of flexibility and resiliency in the overall installation.
Getting ready
You will need three Windows Server Failover Clusters created for this recipe. You will need to create a Computer object in Active Directory for each of the following clustered roles:
- SQL Server Availability Group Listener: in this example it will be SysCtrDBS-AGL
- The name of the VMM Client Access Point; in this example, it will be VMMMS
- The name of the File Server Client Access Point; in this example, it will be VMMLibServer
Please ensure that you have created the computer account objects for SysCtrDBS-AGL, VMMMS, and VMMLibraryServer in Active Directory and granted sufficient privileges to the associated Cluster computer accounts for these objects. Additionally, please ensure that these computer account objects are disabled in Active Directory.
How to do it…
The following diagram shows you the high-level steps involved in this recipe and the tasks required to complete this recipe:
The preceding steps will result in the following VMM components being installed in the following configuration:
- The VirtualManagerDB database will be installed on a new SQL Server 2012 AlwaysOn Availability Group
- VMM 2012 R2 Management Server will be installed on two servers with the System Center Virtual Machine Manager service being a clustered role
- A clustered file server with the VMM Library share deployed
To learn how to install the following components, please visit the following links for Microsoft TechNet:
- Installation of SQL Server ready for AlwaysOn: http://technet.microsoft.com/en-us/library/bb500395(v=sql.110).aspx
- Configuration of the Windows Firewall to permit the required network traffic: http://technet.microsoft.com/en-gb/library/cc753558.aspx
- Creating Computer Accounts in Active Directory: http://technet.microsoft.com/en-us/library/cc781364(v=ws.10).aspx
SQL Server
The first step is to create the SQL Server 2012 AlwaysOn Availability Group (this is a feature of SQL Server Enterprise Edition) for VMM to be installed against. It is assumed that you have installed SQL Server 2012 SP1 on both of your cluster nodes, but have not created the AlwaysOn Availability Group and the associated Listener. Now, you need to perform the following steps:
- On the first SQL node, for this example DEMO-SQL01, open the SQL Server Configuration Manager application, right-click on the SQL Server Service instance under SQL Server Services and click on Properties. On the AlwaysOn High Availability tab, check the Enable AlwaysOn Availability Groups checkbox. Then, restart the SQL Server service after enabling this checkbox.
- Perform the same task on the second SQL Server node.
- On the first SQL node, open SQL Server Management Studio and create a database called
TmpVMMDB
. A database is required to create the AlwaysOn Availability Group against. Once VMM has been installed, the database can be removed. - Ensure the Recovery Model dropdown of the database is set to Full. Perform a full backup of the TmpVMMDB database. If you do not do this, you will not be able to create the Availability Group.
- On the first SQL node, open SQL Server Management Studio, expand the AlwaysOn High Availability folder, right-click on Availability Groups, and select New Availability Group Wizard, as shown in the following screenshot:
- Read the introduction screen and click on Next.
- Provide a name of the Availability Group; in this example, it will be
SysCtrDBs
. Click on Next. - Select the TmpVMMDB database to be added to the Availability Group. Click on Next.
- On the Specify Replicas page, click on Add Replica and enter the name of the other SQL node. Click on Connect.
- Once the server has been added, set the options as shown in the following screenshot:
- Click on the Listener tab and select the option to Create an availability group listener. In this example, it will be called
SysCtrDBs-AGL
. It will listen on port1433
and have a static IP address. Once configured, click on Next. - On the Select Initial Data Synchronization page, enter a file share that the account the SQL Server Agent service is running under has Full control over. Click on Next.
- The next screen will validate the settings you have entered to ensure the Availability Group can be created. Click on Next.
- After the Availability Group is created, you will have a DNS entry for SysCtrDBs-AGL and under Failover Cluster Manager, you will see Role.
You can then install VMM using the AlwaysOn Availability Group listener name as the name of the SQL Server.
VMM Management Server
When you install VMM, the installation process can detect if it is running on a Windows Server Failover Cluster and will install itself as a clustered role. There is very little difference in the installation process from installing VMM on a standalone server. However, it must be noted that the System Center Virtual Machine Manager service must run under a domain account and that the Distributed Key Management container must be created in Active Directory and configured for use during installation. The svc_VMMSrvc account must be a member of the Local Administrators group on the server.
As an alternative to precreating the database as we did in the previous recipe, you could make sure the Install_VMM account has sysadmin privileges on the SQL Server instance.
Installing of the first cluster node
As seen in the following screenshot, the cluster has been created; however, there are no roles on the cluster:
The installation process of VMM is very similar to installing VMM on a single server; however, there are few differences. The steps for installation are as follows:
- When installing VMM management server role, the VMM installation will ask you if you want to make it highly available. Click on Yes.
- When selecting the SQL Server to use for the installation of VirtualManagerDB, you must select SQL Server AlwaysOn High Availability Group Listener.
- You will be prompted to enter the name of the Client Access Point for the VMM instance and the IP address you want to assign, which is
VMMMS
in this case. - When installing VMM on a failover cluster, you will not be able to create a library share on the server.
- After the installation is complete, the VMMMS role can be seen in Failover Cluster Manager, as shown in the following screenshot:
- If you examine the VMMMS role, you can see that only one node can possibly own the role at the moment.
SQL Server tasks
Once the first VMM installation is complete, there are a number of SQL Server tasks that need to be performed:
- Add the SVC_VMMSrvc SQL Login to the other SQL Server node.
- Alter the recovery model of the VirtualManagerDB database to Full.
- Create a full backup of VirtualManagerDB.
- Add VirtualManagerDB to the AlwaysOn High Availability Group.
- Remove TmpVMMDB from the AlwaysOn High Availability Group.
Adding SVC_VMMSrvc SQL Login to the other SQL Server node
The SQL Server Logins that have been created by the VMM installation process must be created in every other node of the SQL Server AlwaysOn High Availability Group. Failure to complete this will result in VMM inability to access the database should it failover. This is because unlike Failover Clustering, which protects the entire SQL Server instance, SQL Server AlwaysOn High Availability Groups only protect databases.
- As shown in the following screenshot, the SVC_VMMSrvc Login is not present on the second SQL Server node in the AlwaysOn High Availability Group, DEMO-SQL02:
- Add the SQL Login for the SVC_VMMSrvc account by executing the following T-SQL in SQL Server Management Studio:
CREATE LOGIN [DEMO\SVC_VMMSrvc] FROM WINDOWS GO
Altering the recovery model of the VirtualManagerDB database to Full
All databases that are to be included in a SQL Server AlwaysOn High Availability Group must use the Full recovery model.
To alter the recovery model, open the first SQL Server node in SQL Server Management Studio, right-click on the database, and click on Properties. In the Select a page section, click on Options and change the Recovery model to Full, as shown in the following screenshot:
Creating a full backup of VirtualManagerDB
In SQL Server Management Studio, perform a full backup of the VirtualManagerDB database.
Adding VirtualManagerDB to AlwaysOn High Availability Group
To add VirtualManagerDB to the AlwaysOn High Availability Group, perform the following steps:
- Open SQL Server Management Studio, navigate to AlwaysOn High Availability | SysCtrDBs (Primary), right-click on Availability Databases, and click on Add Database. This is shown in the following screenshot:
- Read the introduction screen and click on Next.
- Select VirtualManagerDB, ensure the database has "Meets requirements". If not, ensure you have changed the Recovery model option to Full and created a full backup. Click on Next.
- On the Select Initial Data Synchronization page, the share that was previously used will be shown. Change this share if necessary. Click on Next.
- You will then be prompted to connect to the second node of the AlwaysOn High Availability Group. Click on Connect. Then, click on Connect again. Click on Next.
- Ensure the validation checks are all passed; if not, rectify the failures. Click on Next.
- On the Summary page, click on Finish.
The VirtualManagerDB database will then be added to the AlwaysOn High Availability Group.
Removing TmpVMMDB from AlwaysOn High Availability Group
Now that the VirtualManagerDB database has been added to the AlwaysOn High Availability Group, the TmpVMMDB database can be removed from the SysCtrDBs AlwaysOn High Availability Group. To do this, perform the following steps:
- Open SQL Server Management Studio, navigate to AlwaysOn High Availability | SysCtrDBs (Primary) | Availability Databases, right-click on TmpVMMDB, and click on Remove Database from Availability Group. This is shown in the following screenshot:
- In the Remove Database from Availability Group 'SysCtrDBs' screen, click on OK.
- The copies of TmpVMMDB can then be deleted from each of the SQL Servers.
Installing the second node
The SVC_VMMSrvc account must be a member of the Local Administrators group on the server. You need to perform the following steps for this:
- When selecting to install the VMM Management Server role, the VMM installation will ask you to add this server to the already highly available installation. Click on Yes.
- During the installation of VMM, there are few decisions to be made. When prompted to choose the SQL Server, all the options are grayed out as shown in the following screenshot:
- On the next screen, the options are grayed out as these are controlled by the cluster and the Distributed Key Management information has already been populated. However, you must enter the password for the service account as shown in the following screenshot:
- After the installation completes, if you investigate the VMMMS role, you can see that both nodes are now possible owners of the role.
VMM Library Server
The VMM Library Server can use a Clustered File Server that has been created as File Server for general use rather than Scale-Out File Server for application data. To do so, perform the following steps:
- Open Failover Cluster Manager on one of the cluster nodes that will host the VMM Library Server.
- Right-click on the cluster and click on Configure Role.
- Click on Next.
- Click on File Server.
- Click on Next.
- Select File Server for general use.
- Click on Next.
- Enter the name of the Client Access Point for the File Server; in this case,
VMMLibServer
. Then, enter an IP address and click on Next. - Select the available storage to be assigned to the File Server. Click on Next.
- Click on Next.
- Click on Finish.
- The VMMLibServer role can be seen in Failover Cluster Manager.
- To add a share to the File Server, right-click on the VMMLibServer role and click on Add File Share.
- In the File share profile, select SMB Share – Quick. Click on Next.
- Select the appropriate volume. Click on Next.
- Enter a name in the Share name field, in this case
Library
. Enter a description for the share, as shown in the following screenshot: - Click on Next.
- Uncheck the Allow caching of share checkbox. Click on Next.
- The minimum permissions required for a VMM Library share is for the SYSTEM account to have full access in Share Permissions and NTFS Permission. However, as users may need to contribute content to the share, ensure the appropriate users and/or security groups have the appropriate permissions. Click on Next.
- Click on Create. This share is ready for use by VMM as a Library Share. You must ensure that the svc_VMMAgntRA account has administrative rights on both nodes of the file server cluster.
Adding a VMM Run As account for the SVC_VMMAgntRA account
Before the Library Server can be added to the VMM, you must create a Run As Account in VMM. This determines the credentials that VMM uses to manage remote systems. Perform the following steps:
- Open the VMM Console on one of the VMM servers. Remember to connect to
VMMMS:8100
as shown in the following screenshot: - Navigate to the Settings section and click on Security. You can see the default Run As Accounts created by the VMM installation.
- Click on Create Run As Account on the ribbon bar, enter the details as appropriate, and click on OK.
Adding Cluster to VMM
You also need to add Cluster to VMM. For this you need to perform the following steps:
- Open the VMM console on one of the VMM servers. Remember to connect to
VMMMS:8100
as shown in the following screenshot: - Navigate to the Fabric workspace, expand the Infrastructure option, right-click on Library Servers, and then click on Add Library Server.
- Select the VMM Agent Run As account, as shown in the following screenshot, and click on Next.
- Enter
VMMLibServer
in the Computer name field and click on Add. VMM can then see the clustered role and all the servers that form that role. Click on Next. - Select the Library share created previously and check the checkbox under Add Default Resources. Click on Next.
- Review the summary and click on Add Library Servers.
- Once the VMM job is complete, you will see the two nodes of the File Server cluster and the Client Access Point listed in the Library Servers section, as shown in the following screenshot:
How it works…
While installation of VMM in a highly available configuration can be time consuming, it can help reduce, if not eliminate, the number of single points of failure for the installation.
Through the use of failover clusters (including SQL Server AlwaysOn High Availability Groups), each component can be made highly available. Each role can move from one server in the cluster to another. This allows the VMM service and its required components to remain online while underlying aspects are maintained such as the Windows Server installations.
Tip
As domain user service accounts are used for all services, ensure these accounts are allowed the Log on as a service privilege.