Monday, June 10, 2013

Hyper-V on Windows 8

I recently got a fairly high end laptop so that I could take my software development work with me wherever I go. My goal is to be able to get work done and score wife/family points by going to those various family functions too. "Go to your family reunion? Sure, just let me pack my laptop here". "Take the kids to their curling match up in Canada? Sure can Dear, I've got everything I need right here in my laptop bag". It has a quad core I7 with 16GB ram and a 1TB hard drive, which I replaced with a 1TB Seagate SSD/HD hybrid drive. It also came with Windows 8 Home, which I upgraded to Windows 8 Pro.
I had started to install Oracle's Virtual Box when I couldn't get Virtual Box to recognize the hardware virtualization that I had enabled in the BIOS configuration. That was when I discovered Windows 8 had Hyper-V. The thing about Hyper-V, is that it takes over the hardware virtualization feature and leaves other VM software (such as Virtual Box) out in the cold. I could have disabled Hyper-V and been on my way, but I chose to check out the new Windows 8 Hyper-V technology. I have had nothing but fun with it. It perfect for some of the work that I do. I really love the "Dynamic Memory" feature that allows you to efficiently use memory amongst your various VMs. Here is a snapshot of my VMs that I currently have on my laptop.
One of my jobs is to maintain and develop software that is built vertically on Microsoft's System Center Operations Manager. This software has some very large customers with large networks that they operate this software on. With Hyper-V, I am able to set up a complete virtual network, albeit on a much smaller scale, all on my laptop. As you can see, I can have several Windows Servers running with various services installed and still have plenty of memory left over for my host system, thanks to Dynamic Memory. You can see the server running SQL Server has allocated more memory because of the way SQL Server pre-allocates memory for fast queries.
I also like the Hyper-V concept of Virtual Switches. This really helps in setting up a virtual domain. As you can see, I have one server working as a Domain Controller. The other servers, except for the NAT server (and of course Kubuntu) are part of the domain. I have two virtual switches set up, one is external and the other is private.
The NAT server connects to both switches and serves as the default gateway for the other Windows VMs. The Domain Controller also serves as DHCP and DNS for the private network on the private switch. And yes, I do know that the name of my private switch has "SCOM 2007" in it. I was going to have two separate switches from my SCOM 2007 and SCOM 2012 setups, but later I discovered that I really didn't need to. So, I'm just living with the name I currently have.
This all seems to work great. There is just a minor issue a run into when, say I need to run out the door, and I close my laptop (where it sleeps or hibernates) and change locations. The servers still seem to run OK, however they seem to sometimes lose connectivity. I find that I may need to run "ipconfig /renew" on the NAT server. One time I had to do this on my other servers as well. One particularly peculiar thing was that a server had the gateway correct, but it's default DNS was pointed at the NAT server, even though the DHCP on the Domain Controller specifies the Domain Controller for the DNS. I think this has to do with a virtual network timing issue when my laptop wakes up again after sleeping. It's just a minor annoyance however.
Why Kubuntu you might ask? Well, I have that for Ruby on Rails development. On a previous contract I was on at Amazon, I was developing Ruby on Rails in the Red Hat Linux environment. For my personal Ruby development, I decided to set up an environment on a Kubuntu VM in Hyper-V. I'll probably write more on that later.

No comments:

Post a Comment