This chapter is taken from book "Introducing Microsoft SQL Server 2008 R2" by Ross Mistry and Stacia Misner published for Microsoft Press.
Microsoft SQL Server 2008 R2 delivers several enhancements in the areas of high
availability and virtualization. Many of the enhancements are affiliated with
the Windows Server 2008 R2 operating system and the Hyper-V platform. Windows
Server 2008 R2 builds on the successes and foundation of Windows Server 2008 by
expanding on the existing high availability technologies, while adding new
features that allow for maximum availability and reliability for SQL Server 2008
R2 implementations. This chapter discusses the enhancements to high availability
that significantly contribute to the capabilities of SQL Server 2008 R2 in both
physical and virtual environments.
Enhancements to High Availability with Windows
Server 2008 R2
In the following list are a few of the
improvements that will appeal to SQL Server and Windows Server professionals
looking to gain maximum high availability within their database infrastructures.
- Hot add CPU and memory When using SQL
Server 2008 R2 in conjunction with Windows Server 2008 R2, database
administrators can upgrade hardware online by dynamically adding processors
and memory to a system that supports dynamic hardware partitioning. This is
a very convenient feature for organizations that cannot endure downtime for
SQL Server systems running in mission-critical environments.
- Failover clustering Greater high
availability is achievable for SQL Server R2 with failover clustering on
Windows Server 2008 R2. Windows Server 2008 R2 enhances the failover cluster
installation experience by increasing the number of validation tests within
the Cluster Validation Wizard. Moreover, Windows Server 2008 R2 introduces a
Best Practices Analyzer tool to help database administrators reduce best
practice violations. Similar to its predecessor, Windows Server 2008 R2
continues to supports up to 16 nodes within a failover cluster and
organizations can also protect their applications from site failures with
SQL Server multi-site failover cluster support by using stretched VLANs
built on Windows Server support for multi-site clusters.
- Windows Server 2008 R2 Hyper-V The Hyper-V
virtualization technology improvements in Windows Server 2008 R2 were the
most sought-after and anticipated enhancements for Windows Server 2008 R2.
It is now possible to virtualize heavy SQL Server workloads because Windows
Server 2008 R2 scales far beyond its predecessors. In addition, database
administrators can achieve increased virtualization availability by
leveraging new technologies, such as Clustered Shared Volumes (CSV) and Live
Migration, both of which are included in Windows Server 2008 R2. Guest
clustering with SQL Server 2008 R2 in Windows Server 2008 R2 Hyper-V is also
supported.
- Live Migration and Hyper-V By leveraging
Live Migration and CSV-two new technologies included with Hyper-V and
failover clustering on Windows Server 2008 R2-it is possible to move virtual
machines between Hyper-V hosts within a failover cluster without downtime.
It is worth noting that CSV and Live Migration are independent technologies;
CSV is not required for Live Migration.
- Cluster Shared Volumes (CSV) CSV enables
multiple Windows servers running Hyper-V to access Storage Area Network
(SAN) storage using a single consistent namespace for all volumes on all
hosts. This provides the foundation for Live Migration and allows for the
movement of virtual machines between Hyper-V hosts.
- Dynamic virtual machine (VM) storage It is
possible to add or remove virtual hard disk (VHD) files and pass-through
disks while a VM is running. Support for hot plugging and hot removal of
storage is based on Hyper-V. This is very handy when you are working with
dynamic SQL Server 2008 R2 storage workloads, which are continuously
evolving.
- Second Level Address Translation (SLAT)
Enhanced processor support and memory management can be achieved with SLAT,
which is a new feature supported with Hyper-V in Windows Server 2008 R2.
SLAT leverages Intel Virtualization Technology (VT) Extended Page Tables (EPT)
and AMD-V Rapid Virtualization Indexing (RVI) technology in an effort to
reduce the overhead incurred during mapping of a guest virtual address to a
physical address for virtual machines. This significantly reduces hypervisor
CPU time and saves memory for each VM, allowing the physical computer to do
more work while utilizing fewer system resources.
Failover Clustering with Windows Server 2008 R2
If you're unfamiliar with failover clustering,
don't stop reading to run out and purchase a book on the topic-this section
begins with an overview of failover clustering. It may surprise some readers to
know that SQL Server failover clustering has been available since Microsoft SQL
Server 7.0. Back in those days, failover clustering proved to be quite a
challenge to set up. It was necessary to install multiple Microsoft products to
form the Microsoft cluster environment, including Internet Information Services
(IIS), Cluster Server, SQL Server 7.0 Enterprise Edition, Microsoft Distributed
Transaction Coordinator (MSDTC) 2.0, and sometimes the Windows NT 4.0 Option
Pack. Moreover, the hardware support, driver support, and documentation were not
as forthcoming as they are today. Many IT organizations came to believe that
failover clustering was a difficult technology to install and maintain. That has
all changed, thanks to the efforts of the SQL Server and Failover Clustering
product groups at Microsoft. Today, forming a cluster with SQL Server 2008 R2 on
Windows Server 2008 R2 is very easy. In addition, the two technologies combined
provide maximum availability compared to previous versions, especially for
database administrators who want to virtualize their SQL Server workloads.
Now that you know some of the history behind
failover clustering, it's time to take a closer look into what failover
clustering is all about and what it means for organizations and database
administrators. A SQL Server failover cluster is built on the foundation of a
Windows failover cluster, while providing high availability and protecting the
whole instance of SQL Server in the event of a server failure. Failover
clustering allows organizations to meet their high availability uptime
requirements through redundancy in their SQL Server infrastructure by
eliminating single points of failure for the clustered application. The server
that is used to form a cluster can be either physical or virtual. The next
section introduces the different types of failover clusters that can be achieved
with these two products (SQL Server 2008 R2 and Windows Server 2008 R2), which
work very well with one another.
Traditional Failover Clustering
The traditional SQL Server failover cluster has
been around for years. With a traditional failover cluster, there are two or
more nodes (servers) connected to shared storage. A quorum is formed between all
nodes in the failover cluster, and this quorum determines the health and number
of failures the failover cluster can sustain. Communication between cluster
nodes is required for cluster operations and is achieved by using two or more
independent networks that connect the nodes of a cluster to avoid a single point of failure. SQL
Server 2008 R2 is installed on all nodes within a failover cluster. If a node in
the cluster fails, the SQL Server instance automatically fails over to a
surviving node within the failover cluster. Note that the failover is seamless
from an end-user or application perspective. Like its predecessor, SQL Server
2008 R2 delivers single-instance and multiple-instance failover cluster
configurations. In addition, SQL Server 2008 R2 on Windows Server 2008 R2
supports up to 16 nodes and a maximum of 23 instances within a failover cluster
due to the drive letter limitation.
IMPORTANT When you are configuring a cluster,
make sure to connect the nodes by more than one network; otherwise Microsoft
Product Support Services does not support the implementation. In addition, it is
a best practice to always use more than one network.
Figure 4-1 illustrates a two-node
single-instance failover cluster running SQL Server on Windows Server 2008 R2.
FIGURE 4-1 A two-node single-instance failover
cluster
Figure 4-2 illustrates a multiple-instance
failover cluster running SQL Server on Windows Server 2008 R2.
FIGURE 4-2 A two-node multiple-instance
failover cluster
Guest Failover Clustering
In the past, physical servers were usually
affiliated with the nodes in a failover cluster. Today, virtualization
technologies make it possible to form a cluster with each node being a guest
operating system on virtual servers. This is known as guest failover clustering.
To achieve a guest failover cluster, you must have a quorum, a public network, a
private network, and shared storage; however, instead of using physical servers
for each node in the SQL Server failover cluster, each node is virtualized
through Hyper-V. Organizations taking advantage of guest failover clustering
with SQL Server 2008 R2 must have the physical host running Hyper-V on Windows
Server 2008 R2, and the configurations must be certified through the Server
Virtualization Validation Program (SVVP). Likewise, the guest operating system
must be Windows Server 2008 R2, and the virtualization environment must meet the
requirements of Windows Server 2008 R2 failover clustering, including passing
the Validate a Configuration tests.
NOTE When implementing failover clusters, you
can combine both physical and virtual nodes in a single failover cluster
solution.
Figure 4-3 illustrates a multiple-instance
guest failover cluster running SQL Server 2008 R2 on Windows Server 2008 R2.
SQLNode1 is a virtual machine running on the server called Hyper-V01, which is a
Hyper-V host, and SQLNode2 is a virtual machine running on the Hyper-V02 Hyper-V
host.
FIGURE 4-3 A two-node guest failover cluster
NOTE Guest clustering is also supported when
Hyper-V is on Windows Server 2008. However, Windows Server 2008 R2
provides Live Migration for moving virtual machines between physical hosts. This
is much more beneficial for a virtualized environment running SQL Server 2008
R2.
|
REAL WORLD |
|
When you use guest failover clustering, make
sure that the virtualized guest operating systems used for the nodes in the
guest failover cluster are not
on the same physical Hyper-V host. If this situation exists, you have a physical
host running Hyper-V, which means that you have created a single point of
failure. For example, if a single physical host running all of the guest
operating systems suddenly failed, all the nodes associated with the guest
failover cluster would no longer be available, ultimately causing the whole SQL
Server failover cluster instance to fail. This could be catastrophic in a
mission-critical production environment. This problem can be avoided, however,
if you use multiple Hyper-V hosts and Live Migration, and ensure that each guest
operating system is running on a separate Hyper-V host. |
Enhancements to the Validate A Configuration
Wizard
As mentioned earlier in this chapter,
organizations in the past found it difficult to implement a SQL Server failover
cluster. One thing that clearly stood out was the need for an intuitive tool
that could verify whether or not an organization's configuration met the
failover clustering prerequisites. This issue was addressed with the
introduction of Windows Server 2008, which offered for the first time a tool
called the Validate A Configuration Wizard.
Database administrators and Windows
administrators used this tool to conduct validation tests to determine whether
servers, settings, networks, and storage affiliated with a failover cluster were
set up correctly. This tool was also used to verify whether or not prerequisite
tasks were met and to confirm that the hardware supported a successful cluster
implementation.
The Validate A Configuration Wizard tool
included with Windows Server 2008 R2 still delivers inventory, network, storage,
and system configuration tests. In addition, the Failover Clustering product
team made enhancements to the Validate A Configuration Wizard tool that further
improve the testing ability of this tool. Some of the enrichments include the
following options:
- Cluster Configuration
- List Cluster Core Groups
- List Cluster Network Information
- List Cluster Resources
- List Cluster Volumes
- List Cluster Services And Applications
- Validate Quorum Configuration
- Validate Resource Status
- Validate Service Principal Name
- Validate Volume Consistency
- Network
- List Network Binding Order
- Validate Multiple Subnet Properties
- System Configuration
- Validate Cluster Service And Driver Settings
- Validate Memory Dump Settings
- Validate System Drive Variable
NOTE The wizard tests configurations and also
lists information. See "Failover Cluster
Step-by-Step Guide: Validating Hardware for a Failover Cluster," a Knowledge
Base
article that describes each test in detail, at
http://technet.microsoft.com/en-us/library/cc732035(WS.10).aspx.
Running the Validate A Configuration Wizard
Prior to installing a failover cluster for SQL Server 2008 R2 on Windows Server
2008 R2, administrators
should run the Validate A Configuration Wizard tool by following these steps:
- Ensure that the failover clustering feature is installed on all the nodes
associated with
the new cluster being validated.
- On one of the nodes of the cluster, open the Failover Cluster Management
snap-in.
- Review the information on the Before You Begin page, and then click Next. You
can
select the option to hide this page when using the wizard in the future.
- On the Select Servers Or A Cluster page, in the Enter Name field, type either
the host
name or the fully qualified domain name (FQDN) of a node in the cluster.
Alternatively,
you can click the Browse button and select one or more nodes in the cluster.
Click Next
to continue.
- On the Testing Options page, select Run All Tests or Run Only Test I Select,
and then
click Next. It is recommended that you choose Run All Tests when using the
wizard for
the first time. The tests are organized into Inventory, Network, Storage, and
System
Configuration categories.
- On the Confirmation page, review the details for each test, and then click
Next to
begin the validation process. While the validation process is running, status
information
is continually displayed on the Validating page until all tests are complete.
After all
tests are complete, the Summary page is displayed, as shown in Figure 4-4. It
includes
the results of the validation tests and numerous details about the information
collected
during each test. Any errors or warnings listed in the validation results should
be looked into and rectified as soon as possible. It is also possible to proceed
without
fixing errors; however, the failover cluster will not be supported by Microsoft.
FIGURE 4-4 The Failover Cluster Validation Report
- Click View Report to observe the report in the default Web browser. The
report is displayed
in Web archive (.mht) format. Click Finish to close the wizard.
NOTE The Validate A Configuration Wizard is quite useful for troubleshooting a
failover
cluster. Administrators who run tests relating to the specific issues they are
experiencing
are likely to yield valuable information and answers on how to address their
issues. For example,
if you are experiencing issues with Multipath I/O (MPIO), a specific driver, or
shared
storage after a successful implementation of a failover cluster, the wizard
would identify
the problem for quick resolution.
The Windows Server 2008 R2 Best Practices
Analyzer
Another tool available in Windows Server 2008 R2 is a server management tool
referred to
as the Best Practices Analyzer (BPA). The BPA determines how compliant a server
role is by
comparing it against best practices in eight categories: security, performance,
configuration,
policy, operation, pre-deployment, post-deployment, and BPA prerequisites. In
each category,
the effectiveness, trustworthiness, and reliability of a role is taken into
consideration. Each
role measured by the BPA will be assigned one of the following three severity
levels: Noncompliant,
Compliant, or Warning. A server role not in agreement with best practice
guidelines
is labeled as Noncompliant, and a role in agreement with best practice
guidelines is
labeled as Compliant. Server roles inherit the Warning severity level when a BPA
scan detects
compliance but also a risk that the server role will fall out of compliance.
Database administrators find this tool instrumental in achieving success with
their failover
cluster setup. First, the Windows Server 2008 R2 BPA can help database
administrators reduce
best-practice violations by scanning one or more roles installed on a server
running Windows
Server 2008 R2. On completion, the BPA creates a report that itemizes every
best-practice
violation, from the most severe to the least severe. It is also possible to
customize a BPA
report. For example, database administrators can omit results they deem
unnecessary or
unimportant. Last, administrators can also perform BPA tasks by using either the
Server Manager
GUI or Windows PowerShell cmdlets.
Running the Best Practices Analyzer
The BPA is installed by default on all editions of Windows Server 2008 R2 except
the Server
Core installation option. If BPA is installed on your edition, run it in Server
Manager. Follow
these steps:
- Click Start, click Administrative Tools, and then select Server Manager.
- Open Roles from the navigation pane. Next, select the role to be scanned with BPA.
- Open the Summary section in the details pane. Next, open the Best Practices
Analyzer
area.
- Click Scan This Role to initiate the scan.
- When the scan is complete, review the results in the Best Practices Analyzer
results
window.
SQL Server 2008 R2 Virtualization and Hyper-V
Virtualization is one of the hottest topics of discussion in almost every SQL
Server architecture
design session or executive briefing session, mainly because organizations are
beginning to
understand the immediate and long-term benefits virtualization can offer them.
SQL Server
virtualization not only promises to be very positive and rewarding from an
environmental
perspective-reducing power and thermal costs which translate to green IT-it also
promises
to help organizations achieve strategic business objectives and consolidation
goals, including
lower hardware costs, smaller data centers, and less management associated with
SQL Server.
As a result, increasing numbers of organizations are showing interest in
virtualizing their
SQL Server workloads, including their test, staging, and even production
environments. This
trend toward virtualization has undoubtedly become stronger with the release of
Windows
Server 2008 R2, which includes Live Migration and Cluster Shared Volumes (CSV).
By leveraging
Live Migration and CSV, organizations can achieve high availability for SQL
Server virtual machines (VMs). In addition, it is possible to move virtualized SQL Server 2008
R2 guest operating
systems between physical Hyper-V hosts without any perceived downtime.
Live Migration Support Through CSV
Live Migration is a new Hyper-V feature in Windows Server 2008 R2 that is used
to increase
high availability of SQL Server VMs. By leveraging the new Live Migration
feature, organizations
can transparently move SQL Server 2008 R2 VMs from one Hyper-V physical host to
another Hyper-V physical host within the same cluster, without disrupting the
services of the
guest operating system or SQL Server application running on the VM. This is
achieved via an intricate process. First, all VM memory pages are transferred from the source
Hyper-V physical
host to the destination Hyper-V physical host. Second, any VM modifications to
the VMs
memory pages on the source Hyper-V physical host are tracked. These tracked and
modified
pages are transferred to the physical Hyper-V target computer. Third, the
storage handles for
the VMs' VHD files are moved to the Hyper-V target computer. Finally, the
destination VM is
brought online.
The Live Migration feature is supported only when Hyper-V is run on Windows
Server
2008 R2. Live Migration can take advantage of the new CSV feature within
failover clustering
in Windows Server 2008 R2. The CSVs let multiple nodes in the same failover
cluster concurrently
access the same logical unit number (LUN). Equally important, because a Hyper-V
cluster must be formed as a prerequisite task, Live Migration requires the
failover clustering
feature to be added and configured on all of the servers running Hyper-V. In
addition, the
Hyper-V cluster hosts require shared storage for the cluster nodes. This can be
achieved by
either an iSCSI, Serial Attached SCSI (SAS) or Fibre Channel Storage Area
Network (SAN).
Figure 4-5 illustrates a four-node Hyper-V failover cluster with two CSVs and
eight SQL
Server guest operating systems. With Live Migration, running SQL Server VMs can
be seamlessly
moved between Hyper-V hosts.
FIGURE 4-5 A Hyper-V cluster and Live Migration
Windows Server 2008 R2 Hyper-V System Requirements
Table 4-1 below outlines the minimum requirements, along with the recommended
system
configuration, for using Hyper-V on Windows Server 2008 R2.
TABLE 4-1 Hyper-V System Requirements
|
MINIMUM |
RECOMMENDED |
Processor |
x64-compatible processor with
Intel VT or AMD-V technology
enabled |
- |
CPU speed |
1.4 GHz |
2.0 GHz or faster-additional CPUs
are required for each guest operating
system |
RAM |
1 GB-additional RAM is required
for each guest operating system |
2 GB or higher-additional RAM is
required for each guest operating
system |
Disk space |
8 GB-additional disk space is
needed for each guest operating
system |
20 GB or higher-additional disk
space is needed for each guest
operating system |
NOTE System requirements vary based on an
organization's virtualization requirements.
Organizations should size their workloads to ensure that the Hyper-V hosts can
successfully
accommodate all of the virtual servers and associated workloads from a CPU,
memory, and
disk perspective.
Practical Uses for Hyper-V and SQL Server 2008 R2
Hyper-V on Windows Server 2008 R2 is capable of accomplishing almost the same
successes
as dedicated servers, including the same kinds of peak load handling and
security. Knowing
this, you might wonder when Hyper-V on Windows Server 2008 R2 should be employed
from
a SQL Server 2008 R2 perspective. Hyper-V on Windows Server 2008 R2 can be
utilized for
- Consolidating SQL Server databases or instances on a single physical server.
- Virtualizing SQL Server infrastructure workloads with low utilization.
- Achieving high availability for SQL Server VMs by using Live Migration or
guest clustering.
- Maintaining different versions of SQL Server and the operating system on the
same physical server.
- Virtualizing test and development environments to reduce total cost of
ownership.
- Reducing licensing, power, and thermal costs.
- Extending physical space when the data center lacks it.
- Repurposing and extending the life of old SQL Server hardware by conducting a physical-to-virtual (P2V) migration.
- Migrating legacy SQL Server editions off hardware that is old and that has
expired warranties.
- Generating self-contained SQL Server environments, also known as sandboxes.
- Taking advantage of the rapid deployment capabilities of SQL Server VMs by
using Microsoft System Center Virtual Machine Manager (VMM) 2008 R2.
- Storing and managing SQL Server VMs in VMM libraries.
By using virtual servers, organizations can take advantage of powerful features
such as
multi-core technology, and they can achieve better handling of disk access and
greater memory
support. In addition, Hyper-V improves scalability and performance for a SQL
Server VM.
NOTE The Microsoft Assessment and Planning
Toolkit can be used to identify whether or
not an organization's SQL Server systems are good candidates for virtualization.
The toolkit
also includes tools for SQL Server inventory, assessments, and intuitive
reporting. A download
of the Microsoft Assessment and Planning Toolkit is available on the Microsoft
Download
Center at
http://www.microsoft.com/downloads/details.aspx?FamilyID=67240b76-3148-4e49-943d-4d9ea7f77730&displaylang=en.
Implementing Live Migration for SQL Server 2008 R2
Follow these steps to take advantage of Live Migration for SQL Server 2008 R2
VMs:
- Ensure that the hardware, software, drivers, and components are supported by
Microsoft and Windows Server 2008 R2.
- Set up the hardware, shared storage, and networks as recommended in the
failover
cluster deployment guides.
NOTE "Hyper-V: Using Hyper-V and Failover Clustering," the TechNet article at
the
following link, includes step-by-step instructions on how to implement Hyper-V
and
failover clustering:
http://technet.microsoft.com/en-us/library/cc732181(WS.10).aspx.
In addition to step-by-step instructions on how to implement Hyper-V and
failover
clustering, this page also gives information on the requirements for using
Hyper-V and
failover clustering, which might be helpful because, the steps in the following
sections
assume that a Hyper-V cluster is already in place.
- For all nodes that you are including in the failover cluster, install Windows
Server 2008 R2(full installation or Server Core installation).
- Enable the Hyper-V role on each node of the failover cluster.
- Install the Failover Clustering feature on each node of the failover cluster.
- Validate the cluster configuration by using the Validate A Configuration
Wizard tool
located in Failover Cluster Manager.
- Configure CSV.
- Create a SQL Server VM with Hyper-V.
- Set up a SQL Server VM for Live Migration.
- Configure cluster networks for Live Migration.
Enabling CSV
Assuming that the Hyper-V cluster has already been built, the next step is
enabling CSV in
Failover Cluster Manager. Follow the steps in this section to enable CSV on a
Hyper-V failover
cluster running on Windows Server 2008 R2.
- On a server in the Hyper-V failover cluster, click Start, click Administrator
Tools, and
then click Failover Cluster Manager.
- In the Failover Cluster Manager snap-in, verify that CSV is present for the
cluster that is
being enabled. If it is not in the console tree, right-click Failover Cluster
Manager, click
Manage A Cluster, and then select or specify the cluster to be configured.
- Right-click the failover cluster, and then choose Enable Cluster Shared
Volumes.
- The Enable Cluster Shared Volumes dialog box opens. Read and accept the terms
and
restrictions associated with CSV. Then click OK.
- In this step, you add storage to the CSV. You can do this either by
right-clicking Cluster
Shared Volumes and selecting Add Storage or by selecting Add Storage under
Actions.
- In the Add Storage dialog box, select from the list of available disks, and
then click OK.
- After the disk or disks selected have been added, they appear in the Results
pane for
Cluster Shared Volumes.
NOTE SystemDrive\ClusterStorage is the CSV storage location for each node
associated
with the failover cluster. Folders for each volume added to the CSV are stored
in this
location. Administrators needing to view the list of volumes can do so in
Failover Cluster
Manager.
Creating a SQL Server VM with Hyper-V
Before leveraging Live Migration, organizations must follow the instructions in
this section to
create a SQL Server VM with Hyper-V in Windows Server 2008 R2.
- Ensure that the Hyper-V role is installed on the server that you use to
create the SQL
Server 2008 R2 VM.
- Click Start, click Administrative Tools, and then click Hyper-V Manager.
- In the Action pane, click New, and then click Virtual Machine. The New
Virtual Machine
Wizard starts.
- Read the information on the Before You Begin page, and then click Next. You
can
select the option to hide this page on all future uses of the wizard.
- On the Specify Name And Location page, enter the name of the SQL Server VM
and
specify where it will be stored. For example, the name SQLServer2008R2-VM01 and
the
VM can be stored on Cluster Shared Volume 1, as displayed in Figure 4-6.
FIGURE 4-6 The Specify Name And Location Screen when a new virtual machine is
being created
NOTE If a folder is not selected, the SQL Server VM is stored in the default
folder configured
for the Hyper-V server.
- On the Memory page, enter the amount of memory to be allocated to the SQL
Server's
VM guest operating system. Click Next.
NOTE With SQL Server 2008 R2, it is recommended that you have 2.048 GB or more
of
RAM, whereas with Windows Server 2008 R2 a minimum of 512 MB of RAM is
recommended.
Remember to ensure that SQL Server workloads are sized accordingly, and
remember to take into consideration the amount of RAM required for each SQL
Server
VM. Also, remember that it is possible to shut down the guest operating system
and
add more RAM to the virtual machine if necessary.
- On the Networking page, connect the network adapter to an existing virtual
network
by selecting the appropriate network adapter from the menu. Click Next to
continue.
- On the Connect Virtual Hard Disk page, as shown in Figure 4-7, specify the
name, location,
and size to create a virtual hard disk so that you can install an operating
system.
Click Next to continue.
FIGURE 4-7 The Connect Virtual Hard Disk page when a new virtual machine is
being created
- On the Installation Options page, choose a method to install the operating
system. The
options include
- Installing an operating system from a boot CD/DVD-ROM.
- Installing an operating system from a boot floppy disk.
- Installing an operating system from a network-based installation server.
- Installing an operating system at a later time.
After choosing the method, click Next to continue.
- Review the selections in the Completing The New Virtual Machine Wizard, and
then
click Finish.
The new VM is created; however, it is in an offline state.
- From the Virtual Machines section of the results pane in Hyper-V Manager, right click
the name of the SQL Server VM you just created, and click Connect. The Virtual
Machine Connection tool opens.
- In the Action menu in the Virtual Machine Connection window, click Start.
- Follow the prompts to install the Windows Server 2008 R2 operating system.
- When the operating system installation is complete, install SQL Server 2008
R2.
|
REAL WORLD |
|
After an operating system is set up, best practice guidelines recommend the
installation of the Hyper-V Integration Services tools for every VM that was
created. The Hyper-V Integration Services tool provides virtual server client (VSC)
code, which ultimately increases Hyper-V performance of the VM from an I/O,
memory management, and network performance perspective. Hyper-V Integration
Services is installed by connecting to the VM and selecting Insert The
Integration
Services Setup Disk from the Action Menu of the Virtual Machine Connection
window.
Click Install in the AutoPlay dialog box to install the tools. |
Configuring a SQL Server VM for Live Migration
Organizations interested in using Live Migration need to set up a VM for Live
Migration. This
is accomplished by reconfiguring the automatic start action for the VM and then
preparing
the VM for high availability by using Failover Cluster Manager. The following
steps illustrate
this series of actions in more detail:
- Create a SQL Server 2008 R2 VM based on the steps in the previous section.
Verify that
the VM is using CSV.
- In Hyper-V Manager, under Virtual Machines, highlight the VM created in the
previous
steps (SQLServer2008R2-VM01 in the example in this chapter). In the Action pane,
under the VM name, click Settings.
- In the left pane, click Automatic Start Action.
- Under Automatic Start Action, for the What Do You Want This Virtual Machine
To Do
When The Physical Computer Starts? question, select Nothing, as shown in Figure
4-8.
Then click Apply and OK.
FIGURE 4-8 Configuring the Automatic Start Action Setting screen
- Launch Failover Cluster Manager from Administrative Tools on the Start menu.
- In the Failover Cluster Manager snap-in, if the cluster that will be
configured is not displayed
in the console tree, right-click Failover Cluster Manager. Click Manage A
Cluster,
and then select or specify the cluster.
- If the console tree is collapsed, expand the tree under the cluster you want.
- Click Services And Applications.
- In the Action pane, click Configure A Service Or Application.
- If the Before You Begin page of the High Availability Wizard appears, click
Next.
- On the Select Service Or Application page, shown in Figure 4-9, click
Virtual Machine,
and then click Next.
FIGURE 4-9 Selecting the service and application for high availability
- On the Select Virtual Machine page, shown in Figure 4-10, confirm the name
of the VM
you plan to make highly available. In this example, SQLServer2008R2-VM01 is
used.
Click Next.
FIGURE 4-10 Configuring a VM for high availability
NOTE To make a VM highly available, you must ensure that it is not running. It
must
be either turned off or shut down.
- Confirm the selection, and then click Next.
- The wizard configures the VM for high availability and provides a summary.
To view
the details of the configuration, click View Report. To close the wizard, click
Finish.
- To verify that the virtual machine is now highly available, look in one of
two places in
the console tree:
- Expand Services And Applications, shown in Figure 4-11. The VM should be
listed under Services And Applications.
- Expand Nodes. Select the node on which the VM was created. The VM should be listed under Services And Applications in the Results pane.
FIGURE 4-11 Verifying that the VM is now highly available
- To bring the VM online, right-click it under Services And Applications, and
then click
Start Virtual Machine. This action brings the VM online and starts it.
Initiating a Live Migration of a SQL Server VM
After an administrator has enabled CSV, created a SQL Server 2008 R2 VM,
configured the
automatic start option, and made the VM highly available, it is time to initiate
a live migration.
Perform the following steps to initiate Live Migration:
- In the Failover Cluster Manager snap-in, if the cluster to be configured is
not displayed
in the console tree, right-click Failover Cluster Manager.
- Click Manage A Cluster, and then select or specify the cluster. Expand Nodes.
- In the console tree located on the left side, select the node to which Live
Migration will
move the clustered VM.
- Right-click the VM resource that is displayed in the center pane, and then
click Live
Migrate Virtual Machine To Another Node.
- Select the node that the VM will be moved to in the migration, as shown in
Figure 4-12.
After the migration is complete, the VM should be running on the node selected.
FIGURE 4-12 Initiating Live Migration for a SQL Server VM.
- Verify that the VM successfully migrated to the node selected. The VM should
be listed
under the new node in Current Owner.