Windows 8 recently hit RTM and became generally available to MSDN and TechNet subscribers in the last couple of weeks. If you run Windows 8 Enterprise, one new feature you gain is the ability to use Hyper-V. I personally was excited to try out this new feature since I have had issues with pretty much every other virtualization platform out there. I’m no virtualization expert by any means, but hopefully these tips will be useful for you if you want to try out SharePoint on Hyper-V.
If you are like me, you probably have a number of virtual machines already created that you don’t care to give up. In my case, I had a number of virtual machines from both VMWare and VirtualBox. I figured there had to be a way to convert them, but I have had bad luck with conversion tools in the past. However, Milton Goh (@miltongoh) pointed me to the Starwind Coverter. The tool is simple to use. Give it the path to your source file and tell it the output type (.vhd in this case), wait a while and you will have a new image that is ready to be mounted in Hyper-V. It leaves your old image in tact so you can continue to use it if necessary.
Once you are ready to take the Hyper-V plunge, you need to install that feature. Do this by going to Control Panel –> Programs –> Turn Windows features on or off. Check the box for Hyper-V and continue. After installation, you will be prompted for reboot.
One thing to note is that once you enable Hyper-V, VMWare Workstation will no longer function. When you attempt to start a VM in VMWare, it will display an error message stating that it cannot run with the Hyper-V feature added. Should you need to revert to VMware, you will need to remove the role and reboot.
Now we are ready to start configuring Hyper-V. First you need to start it. The easiest way to do that is to go to the start menu and type in the word “Hyper”.
Launch the application and you’ll see a screen like this one. In my case, I have already created a few virtual machines.
At this point, I recommend setting the default location for Virtual Hard Disk and Virtual Machines. Otherwise, it buries it in your personal user folder. You can do this by clicking on the Hyper-V Settings Action on the right. You can also change the default Mouse Release Key here (Ctrl+Alt+Left Arrow by default).
In order for your virtual machines to communicate with the outside world, you need to create a few Virtual Switches. To do this click on the Virtual Switch Manager Action. You will then see a screen like the one below. I have already created a couple and I will explain them shortly.
Depending on your configuration, you will probably need a few of these. There are three types. External switches allow your VM to communicate with the outside world using one of your computer’s network cards. Internal switches allow the host machine and guest machines to communicate with each other. Lastly, Private switches are used to allow virtual machines to communicate with each other (i.e.: with a domain controller running on another VM). At the minimum, I recommend an external and an internal to get you started. Let’s look at the settings for an external switch. Give it a descriptive name and then choose which network adapter it will use. If you have multiple network adapters (i.e.: wireless and Ethernet), you may want to create multiple external switches. Here is what the settings look like.
After you have created your switches, you are ready to begin creating a new virtual machine. Click on New –> Virtual Machine in the Actions pane to begin the process. Next, give your VM a name and you may also want to pick a different location to store the machine.
On the next screen, you can assign how much memory to allocate at startup. You can also opt to use Dynamic Memory which allows Hyper-V to allocate more memory as desired. We’ll look at this setting more once the machine is created.
You will then be prompted to configure networking. Here you can set the option for the first network adapter. However, after the machine is configured you will need to add more. In my case, I set the external network first.
Lastly, you specify the location of your newly converted virtual hard disk.
You can now finish and create your virtual machine. However, you still have more settings to change. Click on the virtual machine and then click on Settings Action. The first thing you need to do is add another Network Adapter for any of the other switches you created.
You’ll then want to adjust the dynamic memory range allocated to the virtual machine. Adjust this based upon your needs and hardware.
Lastly, I usually adjust the number of virtual processors. Typically I go with four. There is probably some official guidance on how to set this somewhere, but that’s what I run with.
Save your settings and you’re now ready to start your virtual machine. Click on your virtual machine and then click the Start action. If all goes well, your virtual machine will start. You can view what’s going on in the virtual machine by using the Connect action. This will show you the console of the virtual machine that you can work with. Once the machine boots, it will restart hardware detection since all of the virtual hardware is different. Once it boots up, you will want to install Integration Services. This makes your mouse work and does a bunch of things inside the guest so that Hyper-V knows what is going on. You can run the setup by clicking on Action –> Insert Integration Services Setup Disk in the console window. Run the installer and then reboot. Your virtual machine should now be able to connect to the network and mouse capture will work properly now.
As far as SharePoint goes, I have migrated both a SharePoint 2010 and SharePoint 2013 Preview image over and have had no issues. Once I did all of the hardware setup and rebooting, everything worked fine. I find that it runs quite fast though and “seems” to run better than VirtualBox and VMWare. However, that is completely subjective and I have no numbers to back it up. The machines seem to be find with the host operating system going to sleep and work just fine when resuming.
Compared to other virtualization platforms, Hyper-V does have a few small annoyances. The console window is quite limited. It only supports a few resolutions and copy / paste with it are quite painful. To get around that, I just use Remote Desktop for interacting with the virtual machine instead. To do that, you will need to set up that Internal network switch. There also isn’t a built-in host file system mount like in other virtualization platforms so you have to rely on network connections to transfer any files. Also, I have found that when switching physical networks, I have to release my IP address and renew it on the virtual machine. This applies mainly when going between work and home.
All in all, I am pretty happy with it. The resume / suspend times are quite good. I have had numerous issues in the past where sometimes it would take 30 minutes to resume a virtual machine on other platforms. This makes me quite happy that I haven’t experience that. Are you using Windows 8 Hyper-V with SharePoint yet? What are your experiences? Did I miss anything? Please, share your tips in the comments below.
Follow me on twitter @coreyroth