Virtual Lab – Design and Setup

This is part of a series where I set up a virtual lab for testing and misc work. The other parts in the series are here: Building a Virtual Lab with Hyper-V.

I haven’t had a good lab set up since I moved from VMWare to Hyper-V on my systems. Since then I’ve had a number of random VMs set up, but none connected in any meaningful way as a domain. They were all standalones, but that needs to change.

I wanted to do some additional testing with a few Windows and SQL features that needed a domain. So I decided to set one up with Hyper-V.

I googled around and found a few references:

I decided to try to do some of this myself, using these as guides, but also incorporating some of my new Powershell knowledge along the way. I won’t claim this is the best way to build a virtual lab, but this is the way I did it by cobbling together various piece of information.

With that in mind, here’s what I’m looking to do. I want to create a domain with a few servers and a client for testing. I plan on making this setup on a separate network, using the 10.10.10.x address space as I don’t expect to run into networks with that one at home, or work.

The machines I’m looking for are as follows. The role, OS, and then names are listed below:

  • DC (WS2K12 R2 Core) – DenverDC
  • SQL Server instances (WS2K12 R2 Core and Standard) – Broncos, Nuggets, and Rockies
  • File Server (WS2K12 R2 Standard) – Avalanche
  • Client (Win 8) – Keystone

I’ll be running through the process and trying to document this for myself, and others.

First Steps

The first steps here are easy. I have Hyper-V setup, but if you don’t, it’s an easy confg item you can see at the beginning of this article.

Next, download software. I didn’t have Windows Server on this machine, so I accessed MSDN and downloaded Windows Server 2012 R2. I have an MSDN license, so I get a few licenses. As this was downloading, I made not of the product keys.

I’ve had a space on my machine setup. Since I used to use VMWare and Hyper-V, I have a space on my spare drive where I separate Hyper-V and VMWare. Inside the Hyper-V folder are my VMs for quick copying to my external drives and laptop as backups. In this case, I’m setting up a “WS2K12 Lab” folder.

virtlab_g

The Parent

This is a standard setup I’ve seen in all the tutorials. Create a VM, create a new hard disk (I used defaults), install Windows Server, and run “sysprep” on the VM. I did this with both Core and Standard Server. This gave me two hard disks that had images of the server systems on them.

virtlab_h

I first set these disks to “read only” and then deleted the parent VMs. This gets me the base systems on which I will build things. I’ll deal with the Win 8 client later.

That’s all I’m talking about here. I’ll move into the rest of the steps in future posts.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , , , . Bookmark the permalink.

11 Responses to Virtual Lab – Design and Setup

  1. Glad to see I’m not the only one using hyper-v for this šŸ™‚ Sadly my laptop is tapping out when I run more than 4 vms at once šŸ˜¦

    Are you using internal or external storage for vhds?

    http://sql4gnt.blogspot.com/2014/01/virtualize-everything.html

    Like

  2. way0utwest says:

    I’m using internal storage. I have a large hybrid drive on my desktop and then an SSD on my laptop where I copy these VMs. So far on the desktop (24GB, quad core) it seems to run OK.

    Like

  3. Tim, I have the same issue with my system because I have 9GB. In my post that Steve referred to (SQL Server Virtual Lab), I use Windows Core for my AD server and for my iSCSI server (used for shared storage). They only require 512MB of RAM (and you can get away with less) so I was able to put together a 2 node cluster that is quite fast. If you have more than one HD, you could also save your VMs on different drives. You should have SATA II (3.0 Mbps) or faster drives. I’ve tried with the original SATA I drive and it was too slow. Since you have a laptop, I would recommend going with eSATA or USB 3 drives. Like Steve, I’m using internal storage but HDD not SSD and I’m using a Quad core Intel i7 920. Unlike Steve my system is maxed at 9GB of Triple Channel RAM which is just enough to work it; 24GB sounds like a better idea šŸ™‚ I’m looking forward to seeing the next posts and learning more about using PowerShell with the virtual lab setup.

    Like

    • Tim M. Hidalgo says:

      Thanks Ayman.

      I was more asking to see if anyone was having the problem where Hyper-V will report a critical state on the vhds, usually after the laptop comes out of sleep or reboots. I discovered last week if I just take the time to stop the Hyper-V service before putting the laptop to sleep helps.

      For my specs – I’m using an external usb 3.0 drive for vhd storage, an i5 and 16GB of RAM. Normally I’m running a core dc, build server (for testing SSC, Git, Deployment Manager and jenkins), linux caching server, then a couple sql or oracle servers depending on what is happening. I like your clustering test bed, I was thinking about testing that out using openfiler.

      Like

    • Got you. I’ve had that same issue when one of my HDs failed. I was able to pull the VHDs off, and I had to inspect and fix the disks afterward. Seems like when your computer sleeps it “loses” where the drives are and gets a little agitated.

      I had issues with openfiler and got impatient with it. That’s why I opted for iSCSI server using Windows Core, which was a little tricky to setup as well. If you have a good tutorial for openfiler please share, I’d like to get it to work since I’ve heard it is a powerful tool for creating virtual SANs. Also on a side note differencing disks can affect performance if you build too many VMs over them. And another side note, SATA is in Gbps not Mbps as I posted above, sorry if I confused anyone!

      You sound like a computer geek like me and you’ve got some interesting things going on. I have yet to test out Oracle, my next nerdy thing is to try out a Hortonworks Sandbox for Hadoop and MySQL. Oracle reminds me of my college days, maybe I should revisit!

      Like

    • way0utwest says:

      To be clear, I’ve been doing this on my desktop, which doesn’t usually shut down. Ever.

      I do copy the VMs to an external that I can use on my laptop, and I verified I could bring them all up there. Since that worked, I’ll have a portable lab, but also a copy at home in case I do have suspend/hiberate issues.

      Like

  4. In this instance 6J stands for the width of the wheel
    in inches (6″), with 15H2 the diameter of the wheel also in inches (15″).
    NUMBER #3: THE ELDER SCROLLS V: SKYRIM (RELEASED NOVEMBER 11, 2011).
    After having a about three thirty days prolonged study, Appears capable of
    end that telecharger gta 5 computer system does not negatively result the
    planet whatsoever.

    Like

  5. Perry Whittle says:

    use Virtualbox or VMWare, HyperV sucks big time

    Like

    • To each is his own. I wouldn’t knock something wholeheartedly like that. It has it’s pros and cons and it’s usages.

      Like

    • way0utwest says:

      While I do agree with you, Perry, at least for someone that just wants VMs to work and connect, I don’t have a choice. I can’t run Hyper-V and VMWare and the standard for my company is Hyper-V. I also found Virtual Box problematic for me early on, so I haven’t bothered to mess with it.

      I’ll also note that a few friends that manage larger infrastructures love it. They prefer it to ESX (VMWare) and say it is much easier to manage. I suspect they’ve learned how to do it well, as the Hyper-V toolset and setup isn’t very friendly (unlike VMWare) and they aren’t on laptops.

      Like

  6. And Hyper-V has better grammar than I do early in the morning.

    Like

Comments are closed.