We’ve been talking about virtualization on the podcast, but how can you really give this a try? Over the next few articles I’ll try to lay out how you can take several free virtualization tools available and turn them into exciting platforms for WHS and other systems. In these write-ups I’ll go through how to set up host based virtualization for both VMWare Server and Virtual PC on a pre-existing Windows 7 installation, as well as show you how to create bootable USB drives containing bare metal hypervisors for Hyper-V Server 2008 R2 and ESXi 4.0. Below is a brief overview of what each can offer:
- VMWare Server 2 and Virtual PC 2007 (XP Mode)– These virtualization software packages are installed on top of an existing host OS, and can allow you to easily create and manage virtual machines. They do not require any dedicated hardware, and you can turn on and off the systems easily, as well as configure them from only 1 PC. This is the easiest way to get virtualization up and running for a simple test system without any additional computers needed. An example for how this could be used is that you have a mediasmart WHS already, and want to test some add-ins before you put them on your “production” box. You could setup a test VM with the free WHS trial, and see how the add-in performs before you decide if it’s ready for prime time or not.
- Hyper-V Server 2008 R2 and ESXi 4.0 – These baremetal virtualization platforms are installed and run directly on the PC’s hardware. They are the boot drive for the PC they are connected to, and require that the attached PC is dedicated to running virtualization systems when in use. A second PC is used to manage and interact with the virtual machines running on the main virtualization PC. These systems are designed to run headless, meaning no monitor/keyboard attached after initial configuration and all management is performed from a separate PC. This is a more advanced setup for virtualization, is designed for an always on virtualization environment, and is more efficient when running multiple virtualized systems at one time. Some examples for how this could be used is you have an OEM license for WHS and you create your production WHS in a VM. You can also have running on the same machine any other system you would like such as a Windows 7 install running Media Center, a Ubuntu Linux OS for testing, an old XP installation, or even a router or security appliance. On one of my main VM systems I have WHS, Server 2008, PFSense router, Untangle UTM, jeOS Ubuntu webserver, and a pound reverse web proxy all running. It can be as advanced or basic as you like!
Different listeners and readers will want to take advantage of host based, baremetal based, or both of the types of virtualization as they give you different features and advantages. In the first write-up, I’ll go through how to set up a USB based Hyper-V Server 2008 R2 system. For the more cautious of our readers out there, don’t fear if this seems too much and you’re only looking for a simple host-based platform for virtualization. A write-up for that is coming soon!
Alright, let’s set up Microsoft’s Hyper-V Server R2, and we’re going to do it on a USB drive. This is Microsoft’s bare metal type 1 hypervisor from MS’s Server 2008 R2 platform. The hypervisor can be installed by itself (for free), or as a role with a purchased Server 2008 R2 installation. This is a very powerful virtualization platform on top of which you can run/develop/design anything from simple to very complex virtualization environments. For the enthusiast market, we lucked out that MS is letting us use this for free because we can take the virtualization capabilities that the big enterprises use and put them to work for our own benefit. Once we create our Hyper-V USB drive it can be used to turn your computer into a virtualization server that can run any virtualized system you like.
You might be wondering why a USB drive? Well, they’re cheap, (about $20 for the 8gb one used in this demo), they don’t use much power, the hypervisor isn’t competing for any of our hard drive space and I/O, and also they’re easy to remove! That way you can try this out on a computer, boot off of your USB, and then change back to your normal system if you like. In fact, most enterprise systems (read big business virtualization) are implementing their hypervisors on flash memory going forward as well. What we’re putting together today can be used permanently (i.e. you always have this computer running hyper-v and your VM’s on top of it), or just to try it out and see if this is something you’d like to do going forward and maybe make your next hardware purchase to support some type of virtualization.
So what ingredients will we need to make this happen?
- 2 computers you can access, one w/ Windows 7 used to set up the flash drive (Vista doesn’t support VHD’s which this process uses)
- 1 to use as your virtualization system w/ the USB drive, and another to setup for the management. The virtualization system’s CPU needs to support virtualization (either VT-x for Intel, or AMD-V for you guessed it, AMD.)
- 1 USB drive, at least 8GB size
- Note, if your USB drive comes with some embedded software it can be a problem as the computer detects a USB drive, and a CD drive sometimes. In one of my installs, I used a SanDisk USB drive that had U3 software on it causing problems. A format of the drive doesn’t get rid of it, you need to download the removal tool from their website if the removal tool isn’t included with the USB drive.
- 3 free downloads
Once you have downloaded all 3 of those files, our first step is to install the Window AIK. Find the KB3AIK_EN.iso file and either burn it to a DVD and install, or extract/mount the ISO and install it. We’re going to want the Windows AIK Setup from the screen below. You can change the install location, and if you do you’ll see an additional prompt later on but it’s not a problem.
Now, fire up the BootFromUSB-HVSR2 executable. (This requires MS .NET 3.5 if you get an error)
Once you hit OK, if you either ran this before installing the AIK or you installed the AIK in a different location than the default you’ll see the below screen. No worries, the tool will give you the option to browse to the new directory for AIK in step 0. Select OK if you see it, and you’ll be caught up with the rest of us.
You’re now at the main screen of the tool. Since we installed AIK already, step 0 is done. In step 1, select the disk number from the drop-down list we want to install Hyper-V on. Make sure your USB drive is in your computer and select it from the drop-down list. A word of warning, whichever disk you select will get formatted, so double check you have the right one, or even go into Disk Management and confirm your disk selection is the right one! It won’t show up as a full 8GB, mine was 7664 mb when formatted.
With the USB disk selected, it’s on to step 2 where the tool will build the blank Virtual Hard Drive (VHD) that it will then install Hyper-V on. Click the Create Blank VHD button, and select where you want the blank VHD to be created on your computer prior to the tool copying it over to the USB drive. It can be deleted once we’re all done.
The last step before we’re done is step 3, selecting the install.wim file from the Hyper-V installation. We need to either burn the GRMHVxFRE1_DVD.iso Hyper-V download to a DVD or extract/mount it so we can select the install.wim file that’s currently in the ISO. I extracted it, and you need to browse to the Sources folder in the ISO and select the INSTALL.WIM file.
That should just about do it, your screen should look similar to the one below. Now click start, sit back, and watch. You’ll see a few screens pop up while the tool is working its magic.
And we’re off!
Applying the Hyper-V install to the VHD
Copying the VHD from your HDD to the USB drive
And we’re done!
A quick look in the USB drive and sure enough, there’s the VHD and the files to make the USB drive bootable.
At this point we’ve created our bootable USB drive with Hyper-V Server on it, congratulations! Look for part 2 to show how to configure the Hyper-V server, the management console from your 2nd computer, and how to set up our test WHS VM.
by: Tom Sydow(wodysweb)