Setting Up a Hyper-V Lab

tech graphs, numbers ad chats blurred and overlapping

Mar 10, 2016 by Brent Earls

hyper-v labSo, VMware workstation is dying… Or at least it appears that way. Apparently, VMware (conspiracy theories say VMware, under pressure from EMC, under pressure from Dell) basically killed the whole dev staff. So what do you do for your lab environment now?

For me, personally, nothing changes. About three years ago I switched my lab over to Hyper-V on my laptop, which gives a few really nice improvements over the implementation I had with workstation, but it also fell short on a few categories.

The Good

Resource Utilization

Having a real type 1 hypervisor in my laptop vs a type 2 REALLY improved my resource utilization. Running dual-CPU VMs goes much more smoothly thanks to the way Hyper-V handles CPU, allocation compared to workstation’s more antiquated style. Additionally, since we got dynamic memory, my lab uses WAY less memory to run the same types of configurations as before. Need a DC? Start it with 512 MB RAM. If you aren’t logging into it or hitting it hard, it’ll probably only use 6-700 MB on its own, but can expand if necessary, which keeps performance while freeing resources. Dynamic Memory is HUGE for lab environments.

The Integration

It’s right there, it’s part of the OS and it’s an easy to use UI, and most of the same things you would do on Hyper-V on a server work the same for your laptop. That means you can do PowerShell scripting, and other things to treat it like a normal server. Not to say that it was hard to use workstation (it wasn’t) but sometimes you would run into quirks where you just had to wonder if it was something unique to your implementation, a conflict, etc. because it was sitting on top of the OS, rather than under it.

Then there’s generic support for other operating systems. Microsoft focused on the 99 percent with its hypervisor. Windows 2003 (SP2) and up work fine, although Microsoft only officially supports 2008 and up. RHEL/CentOS 5.5-7.2, Debian 7.0-8.2, SUSE 11 SP2-12 SP1, Oracle Unbreakable Linux UEK R3 QU1-3, Ubuntu 12.04-15.10, FreeBSD 8.4-10.2 are all actually supported by Microsoft, which means they work well. Here’s the full list. Other versions can almost certainly be made to work if needed, but this is what’s been tested and it covers a vast majority of use cases (though, of course, there are others). If you go look at the VMware Workstation supported OS list, it has been declining a lot lately, and Microsoft actually officially supports more OSes. That being said, there are a lot of appliances you can deploy on Workstation you can’t on Hyper-V.

The Bad

No Real Cloning Option

To make a new VM, you create a differencing disk off your golden master and then attach it to a new VM as you create it.  It’s not that it’s hard, but there are a couple more steps than I would prefer to have. Even in full-blown Hyper-V, this is a SCVMM function. A quick script can take care of all of this for you, though.

Networking

Specifically, a NATed network hasn’t been something very straightforward in Hyper-V. I always built an RRAS VM for NAT, but it was a bit clunky. Now that Hyper-V has containers though, we have NAT as a function. You do have to do the initial setup through PowerShell. This makes it really easy to throw up a semi-fenced environment for your test lab and not have to worry about building your own routers and such (unless you want to, of course).

Nesting Virtualization

In previous versions of Hyper-V you couldn’t nest hypervisors. That means if you wanted to run a Hyper-V cluster, you had to have physical hardware. Now you can, but with a big caveat: it can only be a Windows 2016 hypervisor, it won’t work with VMware or older versions of Hyper-V.

In short, it’s worth taking a look at Hyper-V for your labs one way or another. Even if the devs are all gone for VMware workstation, it’ll be around for a few more years, but you may have reason to upgrade, regardless. My laptop only has a dual-core CPU and 16gb of RAM and I was able to run a domain controller, file server, two Hyper-V servers, and a VM inside the Hyper-V servers while still having 6GB of RAM free for my parent partition. And it actually ran pretty well — live migrations of the nested VM and everything.

There are very few excuses for not labbing in the modern environment. Stay tuned for a couple walkthroughs on how to set up some more complicated labs on a single laptop.

If you have questions about VMware, Hyper-V or setting up a lab environment, give us a call at 502-240-0404 or email us!

Press enter to search