Guide to SQL Server virtualization best practices
A comprehensive collection of articles, videos and more, hand-picked by our editors
Since the release of Hyper-V, Microsoft has continued its commitment to server virtualization by releasing new software products that are optimized for just that. This is the case for SQL Server 2008 among other Microsoft products.
When previously discussing fault-tolerant virtual installations, the Microsoft SQL Server support team has published specific strategies for virtualizing SQL Server installations. These strategies include different guidelines for SQL Server virtualization, but the most interesting being those used to achieve fault tolerance.
The SQL Server support team does not support the creation of a cluster at the virtual machine level. This means you cannot create a fault-tolerant virtual machine by creating a SQL Server cluster. You can, however, create a fault-tolerant VM by creating a cluster at the host server level.
It basically works like this. Since each host server in a server virtualization resource pool will run several virtual machines at once, most organizations will create fault-tolerant host server configurations to protect these VMs. Then once the hosts are made redundant through a host cluster, each and every one of the virtual machines running on these hosts will become a protected application and thus gain a certain level of fault tolerance. In the event of a host failure, the VMs running on this host will also fail, but will automatically be restarted on another host in the cluster.
This is one strategy that can be used to create SQL Server virtual machines and ensure highly availability. The process is simple:
- Prepare the physical server nodes as well as the shared storage component they require to join a cluster.
- Install the hypervisor. For example, with Windows Server 2008, you must first install the operating system and then enable the Hyper-V role.
- Create a host cluster. This means installing the Failover Clustering feature on both nodes in Windows Server 2008. In Hyper-V, you need to perform two additional actions:
a. Create a virtual network. This is performed in the Hyper-V Manager through the Virtual Network Manager. You must add a new external network adapter linked to a physical adapter, and this action must be performed on all nodes of the cluster. In addition, the name of the new virtual adapter must be identical on each cluster node in order for VM failover to work.
b. Validate the cluster configuration and create the cluster. This will ensure that all of the components required for cluster operation are in place before you actually create the cluster.
- Once the cluster is created, you can then create a VM that will host SQL Server and set it up for high availability. First create or copy the VM to the cluster, then use the Failover Clustering Management console to make the VM highly available.
You will then have a fault-tolerant SQL Server virtual machine. When and if the host node running the SQL Server VM fails, the VM will automatically be restarted on another node of the cluster. While this does not make SQL Server aware of the failover, it does ensure that the virtual machine is always running (see Figure 1).
SQL SERVER AND MICROSOFT HYPER-V
Part 1: Creating fault tolerant installations
Part 2: Maintaining high availability
Part 3: Protecting virtual databases
Part 4: Creating virtual appliances
Part 5: Deploying virtual appliances
ABOUT THE AUTHORS
Danielle Ruest and Nelson Ruest are technology futurists focused on datacenter optimization and continuous service availability. They are authors of multiple books, notably "Training Kit 70-652: Configuring Windows Server Virtualization with Hyper-V" published by Microsoft Press and "Virtualization, A Beginner's Guide" published by McGraw-Hill Osborne. For more tips, write to them at firstname.lastname@example.org.