Recently, my Exchange 2007 server failed catastrophically. Rather than replacing the server hardware, I opted to virtualize it. Because the process went so smoothly, I decided to virtualize my production Exchange Server 2003 box as well. I want to share a few lessons that I learned about virtualizing Exchange Server 2003.
Microsoft's Hyper-V technology has a feature that allows you to create a virtual hard drive based on the contents of a physical hard drive. Previously, I used the backup and restore method to virtualize my Exchange Server 2007 box. This time I tried to create a virtual hard drive from my Exchange server's physical hard drive. This proved to be an eye-opening experience.
NOTE: Microsoft does not currently support Exchange Server 2003 on Hyper-V in production environments. Review Microsoft's support guidelines and recommendations for Exchange Server in a virtualized environment at its website.
First, I found a gizmo on the Internet that allows you to connect IDE and SATA drives to a USB port. I then shut down my Exchange 2003 server and connected this device to the server's boot drive.
While this process sounds simple, there were a few things that went wrong. For starters, the drive contained some disk errors that I did not know about. After 14 hours, the drive copy process crashed as a result of these errors. I ran the CHKDSK utility with the /F parameter to correct any drive errors. Once these errors were fixed, I tried the drive copy process again.
This time the process succeeded. I created a new virtual machine and configured it to boot from the virtual hard drive that I had just created. However, halfway through the boot process I received the Blue Screen of Death (BSoD). After doing some digging, I discovered that the drive copy process is not suitable for copying the boot drive. Essentially, I learned three lessons from this experiment:
- Even if you don't think any errors are present, always run CHKDSK against a drive before copying it. Remember, I was 14 hours into the copy process before the disk error caused the crash. Taking the time to run CHKDSK can save hours of work later.
- You can't create a direct copy of the server's boot drive and expect it to work on a virtual machine (VM). You can, however, create virtual instances of any other hard disk in the system.
- Creating a virtual hard disk based on the contents of a physical hard disk takes a long time. In my case, it took 16 hours to copy a 250 GB hard drive. The amount of data on the drive doesn't affect the amount of time it takes to copy the drive. For example, I created a virtual hard drive from an empty hard drive and the process still took quite a few hours to complete.
Because copying the drive did not successfully virtualize my Exchange 2003 server, I decided to try another method. First, I shut down all Exchange-related services to prevent the server from receiving any more mail. Once those services were shut down, I verified that the machine was running Windows Server 2003 SP2 (this is extremely important) and performed a full system state backup.
While my Exchange server was being backed up, I created a new virtual machine and installed Windows Server 2003 SP2 on it. It is critically important to use the same edition of Windows and the same service pack level as what is currently installed on the server you are virtualizing. Finally, I restored the backup to the new virtual server.
I have virtualized quite a few non-Exchange servers in the past. Normally when I virtualize a server, Windows tells me that I have three days to reactivate the server. I never activate Windows until I have a couple of days to test the new virtual server to make sure that it is working properly.
When I booted the virtual server this time, though, I noticed that it did not give me the option of logging onto my domain. I decided to log on anyway. When I logged on, I was forced to activate Windows immediately. Once Windows was activated, I realized that I had accidentally skipped the option to restore the server's system state.
Restoring the system state at that point wasn't a big deal, but once the restore finished, I received another message telling me that I had three days to activate Windows. I basically wasted time performing a Windows activation because I had not restored the server correctly the first time. The lesson here is that if you restore Exchange Server to a virtual machine and Windows does not give you the option to log onto your domain, then you're best bet is to start instead of wasting an activation.
Once my restore operation completed the second time, I was able to log onto my domain, and Exchange Server was functional. Further testing revealed that Exchange was working flawlessly. Contrary to some reports, Exchange Server 2003 runs well in a virtual environment.
About the author: Brien M. Posey, MCSE, is a five-time recipient of Microsoft's Most Valuable Professional award for his work with Exchange Server, Windows Server, Internet Information Services (IIS), and File Systems and Storage. He has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal website at www.brienposey.com.
Do you have comments on this tip? Let us know.
Please let others know how useful this tip was via the rating scale below. Do you know a helpful Exchange Server, Microsoft Outlook or SharePoint tip, timesaver or workaround? Email the editors to talk about writing for SearchExchange.com.