This content is part of the Essential Guide: Guide to SQL Server virtualization best practices

How to create SQL Server virtual appliances for Hyper-V

Creating a private SQL Server VAP will reduce the time it takes to deploy additional SQL Server machines in your environment.

The ability to work with virtual appliances (VAP) or virtual machines (VM) that are pre-configured to run specific applications is one of the most impressive aspects of virtual infrastructures.

To deploy an application -- like SQL Server -- into your network, all you need to do is generate a new VM from the source machine or appliance.

There are two types of VAPs --commercial and private. Commercial VAPs are generated by software manufacturers and can be downloaded from the manufacturer's website, while private VAPs are built in-house and are used for the organizations current applications.

More virtualization with Microsoft SQL Server

Protect virtual databases through SQL Server database mirroring

Maintaining high availability of SQL Server virtual machines

Creating fault-tolerant SQL Server installations

Commercial VAPs based on open source code are readily available from a variety of sources including the VMware VAP Marketplace. These VAPs come in Open Virtualization Format (OVF) and as a result, can be converted to almost any hypervisor environment. For example, you can use either Citrix' Project Kensho or Sun's xVM VirtualBox to convert a commercial VAP into Hyper-V format.

On the other hand, when you need to work with operating systems that are not based on open source code, or when you want to work with a VAP for an application you already own, then you need to create private VAPs.

This is the case for appliances based on Microsoft Windows Server, like SQL Server VAP.

To deploy additional SQL Server VMs in your environment, you should create a private SQL Server VAP. This will reduce the time it takes to launch these machines.

Start with a base VM, which ideally will be running Windows Server 2008 or Windows Server 2008 R2. These operating systems are enlightened guests in a Hyper-V environment. Also, consider using the Enterprise Edition because it supports the ability to create failover clusters and can scale more easily than the Standard Edition.

The base VM should include the operating system, any required updates like Service Pack 2 for Windows Server 2008, and any required utility including management agents and/or anti-malware engines.

Configure the base operating system according to your organization's standards. You may want to copy the VM since it can be used to create appliances running a multitude of other Microsoft Server applications like Internet Information Server, SharePoint Services or Office SharePoint Server, Commerce Server and more.

Since the base virtual machine will be used for SQL Server, consider adding two additional disks to the VM. A larger disk can be used as the data disk while a smaller disk can be used as the disk storing the transaction logs.

Once the base VM is ready, install SQL Server -- ideally version 2008 or 2008 R2. First install all of the prerequisites for SQL Server, and then install SQL Server itself.

Next, configure SQL Server to store data on the data disk — usually the D: drive — and the transaction logs on the log disk — usually the E: drive. Also perform any configuration modifications you need based on your organizational standards.

Lastly, install any required updates for the SQL Server version.

Your VM is now ready to turn into a VAP.


 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


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 [email protected].

Dig Deeper on Microsoft SQL Server Consolidation and Virtualization