It’s been a while since we’ve had a hardcore Geek Sheet installment, and I promise that this one will be a real winner.
Some of you may be aware that the updated Hyper-V bare-metal hypervisor virtualization layer in Microsoft’s upcoming Windows Server 2008 R2 (Which is due to be released August 14th to MSDN and Technet customers) now has support for SUSE Linux Enterprise Server 11 (SLES) and Red Hat Enterprise Linux 5.3 (RHEL). Additionally, Linux support and performance has greatly improved over the initial Hyper-V release. Microsoft also recently released it’s Hyper-V Linux Integration Components (LinuxIC) under the GPLv2 Open Source License.
The LinuxICs for Hyper-V, which are in Release Candidate status and are available for download from Microsoft’s Connect site, provide synthetic device drivers that enhance I/O and networking performance when Linux OSes are virtualized under Hyper-V. The source code for the LinuxIC’s were accepted into the Linux Driver Project and should become part of the Linux Kernel within two subsequent releases and code merges — 2.6.32 is expected to be when they will be integrated, and all Linux distributions using that kernel code base going forward should be Hyper-V enabled out of the box. Yes, you heard that correctly, Microsoft is now an official Linux Kernel contributor.
Download: Windows Server 2008 R2 with Hyper-V Release Candidate
Download: Hyper-V Server 2008 R2 Release Candidate
Podcast: Frugal Friday with Jeff Woolsey, Product Manager for Microsoft Virtualization
However, until that code merge occurs, only Red Hat Enterprise and SUSE Linux Enterprise Linux distributions are officially supported by Microsoft as Hyper-V for Server 2008 R2 ready. Both RHEL and SLES are commercial Linux distributions and cost money for updates and maintenance. However, that does not mean that free Linux distributions will not work fully optimized with synthetic driver support in Hyper-V now. They most certainly do, and you can definitely take advantage of VMs running on free Linux distributions on Hyper-V right away.
Over the last week or so, I’ve been putting the release code of Windows Server 2008 R2 as well as the free Hyper-V Server 2008 R2 release candidate through their paces and running a combination of both Windows and Linux virtual machines on them. The free Linux distributions I have had most success with running the Hyper-V LinuxICs on are CentOS 5.3, Scientific Linux 5.3, and OpenSUSE 11.1. In my limited testing, I only used 64-bit versions, because Windows Server 2008 R2 is 64-Bit only and I wanted to fully take advantage of the processing capability and native 64-bit virtualization of Hyper-V. However, the LinuxIC’s should also install fine on the 32-bit versions of these systems.
CentOS 5.3 (foreground) and Scientific Linux (background) running fully paravirtualized in Hyper-V in Windows Server 2008 R2.
CentOS 5.3 and Scientific Linux 5.3 are both source code clones of Red Hat Enterprise Linux, so there are only minor differences in how the LinuxIC’s are installed on them compared to how it is done in RHEL. OpenSUSE 11.1’s installation procedure is also very similar to SLES, but like the other two there are some minor changes. However, these small differences were learned through a good number of hours of troubleshooting, so as long as you follow these steps, you won’t run into the pitfalls I ran into.
Building your Linux VM in Hyper-V
First you’ll want to build your VM. Using the Hyper-V Manager, select New > Virtual Machine from the “Actions” menu on the right. You’ll be presented with this initial dialog wizard:
Here you’ll specify the name of your Virtual Machine and where you’d like it stored on your server. I created a new volume specifically for storing my virtual machines and my ISO files, the V: drive.
After clicking “Next” you’ll be asked for the amount of memory to assign. For a basic Linux server VM, 512-768MB of RAM is certainly plenty, but if you’re going to use the GUI features, 1GB or more is recommended. On the following screen, you’ll be asked to configure networking and to pick a network interface to bridge to. During the setup of the Hyper-V role, at least one network adapter should be bridged to the LAN for the virtual network switch.
Following the Network screen, you’ll be asked how large your virtual hard disk (VHD file) should be. For CentOS, Scientifc Linux and openSUSE server use, I’d recommend 8GB-20GB of space for the VHD depending on the usage role (Apache/MySQL/PhP, Java, Ruby on Rails applications, etc.)
On the final configuration screen you’ll be asked to point to your install media. You can either install from a physical CD or DVD, or from an ISO file. Once you’ve chosen your desired install media, click on Finish to create the VM.