Virtual Exchange Servers

Comments 0

Share to social media

Virtualization is a hot topic these days. Microsoft has released Windows Server 2008 Hyper-V just before the summer and Hyper-V is Microsoft’s answer to the supremacy of VMware ESX Server. Customers have been running applications like Microsoft Exchange Server on VMware for years now, despite the formal support statement from Microsoft that this wasn’t supported. Okay, there was a “commercially reasonable effort” support, but that was basically it.

Hyper-V is Microsoft’s
answer to the supremacy
of VMware ESX Server

This has changed since Hyper-V was released. All server virtualization products that are validated in the SVVP (Server Virtualization Validation Program) are now fully supported by Microsoft. Needless to say that all major virtualization vendors have signed up in this program, so all recommendations regarding virtualization are not only valid for Hyper-V but for all vendors in the SVVP program.

Microsoft has a list of all Microsoft applications that are supported in a Virtual Machine, this list is published via kb article 957006 (kb article 957006). There are some remarks in this document, and one of them is for running Exchange Server in a virtualized environment. And that’s exactly what I want to talk about.

Note. The official Support Policies and Recommendations for running a virtualized Exchange server can be found here

Windows Server 2008 Hyper-V

Hyper-V is a hypervisor product. A Hypervisor is a very small software layer that’s situated between the Operating System and the hardware. In terms of “small”, Hyper-V is less than 1 MB in size.

Install Windows Server 2008 (X64 only!) on “Designed for Windows” hardware. Make sure that this hardware supports hardware virtualization and have a correct BIOS version (including the Execute Bit Disabled option). All Class-A servers should be capable for Hyper-V, but be careful with the low-end servers. I have seen budget servers with Pentium IV processors that are not capable of running Hyper-V! But I have also seen laptops with for example an Intel Core2Duo processor that are capable of running Hyper-V (don’t expect a real-world performance though). The server should have enough internal memory and disk space to facilitate the use of Virtual Machines.

After installing Windows Server 2008 you have to install Hyper-V. Hyper-V is a server role and can be installed using the Server Manager. The Hypervisor slides between the Operating System and the hardware, and after a reboot the system is ready. Note that the original Operating System has now become a Virtual Machine as well! This Virtual Machine is called the root or parent partition. This is a special partition since it controls all other Virtual Machines on this host. These VM’s are called child partitions. Special care should be taken for the parent partition, and no applications should be installed on it. The best solution for the parent partition is to use Windows Server 2008 Server Core which only has a command line interface. There are a few graphical tools like timedate.cpl for setting the timezone and time/date information, and there’s also Notepad for creating batch files. But the general interface in the command line. Windows Server 2008 Server Core has low overhead, it has a small memory footprint and it has a small attack surface. It is more difficult to manage though, especially for the average Windows administrator.

There are some additions to the host Operating System when Hyper-V is installed. A VSP (Virtual Service Provider) is installed. This is a piece of software that gives a Virtual Machine access to hardware resources. The VSP is connected to the VMBus, an in-memory bus used for communications between parent and child partitions. Every child partition has its own VMBus for safety reasons.

Also VMWorker processes are installed on the parent partition. These are used for non-native Hyper-V Virtual Machines, they cannot use the VMBus or VSP interfaces. Hardware resources are emulated on the host in the VMWorker processes for these types of Virtual Machines.

Native Hyper-V Virtual Machines offer the best performance, whenever possible try to use native Virtual Machines. Supported server operating systems running as a native Virtual Machines are:

  • Windows Server 2008;
  • Windows Server 2003 SP2 and higher;
  • Windows Server 2000 SP4;
  • SUSE Linux 10d.

To integrate the native Virtual Machine with Hyper-V special drivers need to be installed in these Virtual Machine. These drivers let the Virtual Machine use the new VMBus structure as can be seen in  REF _Ref212978047 \h Figure 1. These drivers are called Synthetic Drivers and are part of the “Integration Components” of Hyper-V.

Other operating system run very well in Hyper-V as well, but they use the hardware emulation instead of the new VMBus structure.

607-image002.jpg

Figure 1. Windows Hypervisor structure with multiple VM’s. Note the Emulation part in the 3rd VM

So, the original Windows Server 2008 image becomes a Virtual Machine as well, but this one should not be used for production purposes. For running Exchange Server in a virtual environment we need to install a new “native Virtual Machine” that’s capable of using the new VMBus structure. Never install Exchange Server in the parent partition.

Virtual Exchange Servers

That being said, we want to create a fully supported virtualized Exchange Server environment. As stated before, the official support policies can be found on the Microsoft website:

The first thing is that the only version supported on Hyper-V is Exchange Server 2007 SP1 in combination with Windows Server 2008 as the Child Operating System. This is mainly because Windows Server 2008 performs better than Windows Server 2003 using multiple virtual processors. The Exchange product team didn’t want to spend any time on testing Exchange Server 2003 running on Hyper-V, so the official standpoint didn’t change here. I’ll refer to that later in this article.

Virtualizing Exchange Server is like designing a bare metal Exchange Server environment, it’s all about performance. All design guides available for designing bare metal Exchange Server 2007 environments should be used for virtual Exchange Server 2007 environments as well. This goes for all Exchange 2007 roles, except the Unified Messaging role. This role is not supported running under Hyper-V due to the real-time speech recognition in the Unified Messaging role.

An Exchange Server 2007 running under Hyper-V can look something like this:

607-image004.jpg

Figure  2. Exchange Server 2007 SP1 runs on its own disks

Before installing Windows Server 2008 as the child partition, a Virtual Hard Disk must be created. This can be fixed size Virtual Hard Disk (.VHD file), remember that dynamic .VHD files are not supported for Exchange Server 2007 SP1. A better solution is to use a dedicated or pass-through disk. This is a dedicated disk that can only be used by the Virtual Machine. Tests have shown that a dedicated disk under Hyper-V has a similar performance characteristic as a native disk in a non-virtualized Exchange Server.

Our server has two physical disks. Disk one is used for the Parent Partition which is of course running Windows Server 2008. The second disk will be dedicated for our Windows Server 2008 Child Partition where we install Exchange Server 2007 SP1.

First bring the 2nd physical disk offline, you can do this in the Disk Management option under Storage in Server Manager. By placing it offline it is not available anymore for other operating systems.

607-image006.jpg

Figure 3. Bring the disk in offline mode in Server Manager

  • Now create a new Virtual Machine:
  • Open the Hyper-V Manager in the Administrative Tools menu;
    • In the tasks pane click New and select “Virtual Machine”. The New Virtual Machine wizard starts and after the welcome screen you have to enter all kinds of information regarding the new Virtual Machine:
    • specify a name and location to store the Virtual Machine;
    • assign it a certain amount of memory, for example 4 GB;
    • bind it to a publically available network;
    • At the “Connect Virtual Hard Disk” windows select the “Attach a virtual hard disk later” option;
    • Specify the ISO that will be used to install Windows Server 2008 x64;
  • After reviewing the summary screen click Finish

Do not start the Virtual Machine at this point.

When finished open the properties of the Virtual Machine and go to the IDE Controller 0. This is the controller where the boot disk should be attached to.  Check the “Physical Hard disk” option and select the physical disk we’ve put offline earlier. Click OK to save the configuration.

Unfortunately it is not possible to add a SCSI controller and the disk to this SCSI controller. The Hyper-V SCSI controller is part of the Integration Components and thus runs against the VMBus structure. A very flexible solution, but only available when the Virtual Machine is up-and-running.

607-image008.jpg

Figure 4. Add the physical drive to the IDE Controller 0

The new Virtual Machine is now ready to be installed, just power it on and install Windows Server 2008.

After installing and configuring the server the server needs to be updated. The RTM version of Windows Server 2008 comes with a beta version of Hyper-V and this needs to be updated as soon as possible. When updating the Virtual Machine make sure that you install Microsoft hotfix kb950500, this hotfix brings the Virtual Machine to the RTM level of Hyper-V and thus includes the latest version of the Integration Components.

Installing the Integration Components in a new Virtual Machine can be challenging. Before the Integration Components are installed there’s no network available, and without a network it’s impossible to copy drivers and updates to the Virtual Machine. It is a good idea to create an ISO image with the most important updates, including the Hyper-V RTM hotfix and install this on the host server. This way you can always mount the ISO images and install the latest Integration Components

After the Installation Components are installed and the server is brought up-to-date we have a fully functional Windows Server 2008 server. Assuming that you already have an Active Directory available on your network you can continue installing Exchange Server 2007 SP1.

Exchange database and Log Files

An Exchange server running on a server virtualization platform doesn’t differ from a bare metal Exchange server and as such you need to place the Exchange database and the log files on separate spindles. This is both from a performance perspective as well as a disaster recovery perspective.

There are three ways to configure the database and the log files:

         Use a fixed Virtual Hard Disk – This is a pre configured .VHD file with a fixed size placed on a separate disk;

         Use a dedicated or pass through disk – this is identical as the disk we just installed Windows Server 2008 on. However, since we already have a running Windows Server 2008 Virtual Machine we can add a SCSI controller to the Virtual Machine and attach the pass through disk to the SCSI Controller. This is the preferred and recommended solution;

         Use iSCSI LUN’s – using the Windows Server built-in iSCSI initiator we can access LUN’s on a storage device and place the database and log files on separate LUNs. Although using iSCSI within the Virtual Machine is a fully supported configuration the performance is less than exposing an iSCSI LUN from the parent partition as a dedicated disk. This is due to the networking overhead within the child partition.

Again, there’s no difference between designing a bare metal Exchange server and a virtual Exchange server. Always design your Exchange server with the best performance in mind!

It is not yet possible to use a fiber channel solution with Virtual Machines natively. The HBA’s (Host Based Adapter) are not yet available for use with the VMBus structure. HBA vendors are working on this however, but it is unknown yet (as of October 2008) when this will be available. It is possible however to use a fiber channel solution on the host system and expose LUN’s on a SAN as disks that can be used using the pass through mechanism.

Backup and Restore

As explained in earlier articles on http://simple-talk.com backup and restore is very important on Exchange servers. Running Exchange servers on Hyper-V make backups look very easy, just create a backup of your Virtual Hard Disk and that’s it. Microsoft Server 2008 even supports VSS (Volume Shadow Copy Service) backups of the Virtual Hard Disk files.

Although this is true you still have to be very careful with backing up your Exchange Server under Hyper-V. Not only do you have to backup your data, also the Exchange server’s database needs to be checked for consistency and the Exchange server’s log files need to be purged.

The Hyper-V VSS writer that’s part of Windows Server 2008 is communicating through the Integration Components with the Exchange writer in the Virtual Machine. Windows Server 2008 Backup (installed as a separate feature) can create VSS backups of the Virtual Machine running Exchange Server 2007 SP1. When checking the Exchange Server after a Hyper-V VSS backup is created the Exchange database header show backup information and also the log files are purged.

607-image010.jpg

Figure  5. Creating a Hyper-V VSS backup does interact with the Exchange server running in the Virtual Machine

Although it is fully-functional, it is not a very user friendly solution. Microsoft is also offering a complete backup solution, Microsoft System Center Data Protection Manager (DPM) 2007. With the upcoming service pack 1 release of DPM Microsoft is going to support VSS backups of Virtual Machines. The expected release of DPM 2007 service pack 1 is in the first quarter of 2009. 3rd party vendors like Symantec offer VSS backups of both Hyper-V as well as VMware Virtual Machines in BackupExec 12.5 which was released early October 2008.

At this moment (November 2008) the recommended way to backing up your virtualized Exchange Server 2007 environment is within the Virtual Machine itself. Install a DPM or other 3rd party backup agent in the Virtual Machine and back it up from there.

Snapshots

A snapshot is a point-in-time copy of your system, in this case the Virtual Machine. After creating a snapshot of our Virtual Machine it is always possible to return to the state of this Virtual Machine at the moment of creation of the snapshot.

The following takes place during a snapshot:

  • A copy of the configuration file is created;
  • The Virtual Machine’s memory is flushed to disk;
  • A differencing disk is created and the original disk is set to read-only;
  • The Virtual Machine resumes operation.

While this is a great technology to return to a known state at a certain point in time it is not supported for running Exchange Server 2007 SP1 in a production environment.

Exchange Server 2003

According to the earlier referenced Microsoft article, the only Exchange version officially supported under Hyper-V is Exchange Server 2007 SP1. If you want to virtualize Exchange Server 2003 the only official supported way to achieve this is to run it on Virtual Server 2005 R2 SP1.

Although not officially supported, Exchange Server 2003 runs great in a Virtual Machine under Hyper-V.

Conclusion

Microsoft now supports running Exchange Server 2007 in server virtualization environments. This is not only Hyper-V, but all vendors that have their solution validated in the Server Virtualization Validation Program (SVVP) are fully supported.

Important to remember is that all design guidelines that are valid for a bare metal Exchange environment need to be used for a virtualized environment as well. Use disks that are capable of handling the expected IO load, it is very likely that dynamic disks will not meet these requirements. Therefore the use of dynamic disks is not officially supported by Microsoft when running Exchange Server 2007 SP1 under Hyper-V.

One should always take the business requirements into account, why do you want to virtualize and what are the project goals against which costs? I have seen customers returning from the virtualization twilight zone being very frustrated and ending up in a bare metal environment. For larger environments I have seen a lot of large implementations where the Exchange Server 2007 Client Access Servers and Hub Transport Servers were running under VMware, but where the mailbox servers were running on bare metal. I have to admit though that these environment were larger than 4000 mailboxes. For these environments virtualizing the mailbox servers is questionable, but this might change in the future and this is something that is hard to foresee.

About the author

Jaap Wesselius

See Profile

Jaap Wesselius is an independent consultant from The Netherlands focusing on (Microsoft) Business Productivity solutions with Microsoft Exchange, Lync and Office 365. Prior to becoming an independent consultant in 2006, Jaap worked for 8 years for Microsoft Services in The Netherlands, specializing in Exchange Server. Jaap has a Bsc in Applied Physics & Computer Science, is an MCSE, MCITP and MCT, and has consistently been awarded the Microsoft MVP Award (Exchange Server, eighth year now) for his contributions to the (Dutch) Exchange community. For his blog posts, you can visit http://www.jaapwesselius.com. If you'd like to get in touch, you can reach Jaap via email at Simple-Talk@jaapwesselius.nl, or follow him on twitter as @jaapwess.

Jaap Wesselius's contributions