Skip to main content

Bob Fox's SharePoint Blog

Go Search
Home
Bob Fox's Sharepoint Blog
  

Bob Fox, Microsoft SharePoint MVP > Bob Fox's SharePoint Blog > Posts > Setting Up a Virtual Lab with Hyper-V
Setting Up a Virtual Lab with Hyper-V

My Introduction to Hyper-V

So i was feeling a bit behind the times with everyone chanting the virtues of Hyper-V. After reading Andrew Connell's posts about his new home rig and how he is now running Hype-V in place of VMware (which for a long time he swore by) I started feeling … wait a sec… Connell is one of those Dev types… and he has this up and running…. why don’t I? So Andrew my old friend…. Thank you for the kick in the butt.

I was looking at Connells set up and was pretty impressed …. not only with the hardware but also with how he got clearance to purchase all the toys with his wife (who we will simply refer to as M for now). So I have been planning on reacquiring some hardware and attempt a proper build for myself… mainly to test farms with than one image running SharePoint (with my current laptop having more than one image run would just be painful) and to be honest… in the field how many one server instances do you really find out there…. Ok i have run into a few but I always preach the high availability sermon to them. Really though allot of my clients are mid to large implementations so having this type of lab allows me the ability to recreate issues that pop up in environments to provide fixes, properly test Kerberos (cause having Kerberos run on a single image is just silly right?) also let’s not forget that the 014 bits are going to start making their way out sometime this year (hopefully) so what better playground than my brand new rig.

I call it a Rig. I can lie and tell you that i have a similar set up to Andrews and I would be doing this simply to make him want to go out and buy more toys (and possibly get in trouble with “M”) but hey what are friends for. But it would be a lie. Let me fill you in on a little secret. Although labs such as this are very desirable.. You can get away with something similar with a simple desktop that you can get from Circuit City (who are going out of business so get shopping) That’s what i did.. I have a HP Pavilion that came with allot of really neat and “not so productive” applications on its own cheesy little Vista Build but more importantly it had almost 800GB of Disk space and 8 GB or RAM.

So home i go with my brand new shiny desktop and proceed to format the drives and then load Windows Server 2008.. Sure i could have gone with the new craze and loaded Windows 7 but TBH its the same kernel as we have now with Vista and a somewhat prettier interface. I can wait till this goes to RTM. I want stability and I want HYPER-V I want to know what all the talk is about this. I want to know what caused Connell to make that switch.

SO the journey begins....

Define the purpose of your lab

When I build out my labs I generally have a purpose in mind for what I want to use it for. In my case I may have a bunch of individual labs sitting inactive. Some of the purposes for building out labs are to

· Demonstrate a farm that has multiple servers which will simulate a normal true to life environment.

· Demonstrate authentication methods such as Kerberos which cannot be truly tested on one single server (AD, SQL, MOSS etc)

· Test failover using NLB within a farm. (Do it here and not in your production environment)

· Test solution deployments

· Test Service Packs and Security rollups.

· Many more purposes (add yours here)

Define your topology

One of the benefits or working with Hyper-V or VMware of this is that you can spin up as many servers as your host can hold. Memory and space are the only limitations.

So for the main set up I kept the host running in its own Workgroup. I could have run DCPROMO and set up a domain to run all my images off of but I felt that would just cause trouble down the line. Having the ability to build multiple virtual farms each having its own Active Directory and SQL Servers makes more sense when i am giving a presentation to a client and trying to impress them by displaying that companies domain name and mimicking there set up as much as possible.

Server Topology

For one of my personal environments I have the following:

DC1 - This is exactly what it is named for. This box is my domain controller for FUBAR.com This server is running Windows Server 2008 and I am also running SQL Server 2008. I set this up in this manner simply to consolidate services. Would I recommend this in a real world environment? NO, and during the SQL install it will alert you that this is not recommended but it works in a lab environment You could however take this setup further and add a SQL server or even two in a clustered setup. Like I mentioned it all depends on what your environment can handle

MOSS1 - This box is the WFE for the farm.

MOSS2 - This box would function as the second WFE and if i want to test NLB I will join this server to the farm but for most of my testing this isn’t a requirement so why waste resources :) but its there and very simple to add to the farm if i need to.

MOSS3 - This is the Application Tier Server and its running Indexing and all the fun stuff.. Again going back to MOSS2 i can simply add that box into the mix and move my indexing to simulate what I would do in most circumstances.

WS1 - Simple Vista Workstation running Office and some diagnostic tools such as Fiddler and Netmon which i use when I’m validating Kerberos authentication. Remember if you want to test Kerberos you won’t do it on the actual Farm Servers... do it from the client side.

WS2 - Windows 7 workstation.

image

For those interested in Kerberos I have started doing talks on the circuit with my buddy Spence Harbar so I am planning on doing a Kerberos screencast in the near future.

Invoking the SysPrep Tool (to make life easier)

Make it easier on yourself. Build an image and load all the necessities on it. So in this case were talking about building SharePoint servers so it makes sense to load the Required fun stuff.

What i load on my reusable image is the following:

IIS

PowerShell

I also load the SharePoint bits and these days I have already slipstreamed the October Updates so its a pretty up to date image when i build it. I do NOT run the Configuration Wizard on this box. If you are unfamiliar with the process of slipstreaming you can refer to this screencast that I did last year.

I will also install the latest Windows Updates onto the box.

Once this exercise is complete i run sysprep. For those not in the know sysprep has been around for years. What it does is allow me to reuse an image over and over and when i create a new image i simply point to that Imaged Virtual Hard Disk when i am doing the build. Let me explain this a bit more

When you run SysPrep the default settings are generally all you need to keep. The only one to change is the area where it says to reboot machine when complete or Shut down the box. You want to make sure you shut down the box. Once this is complete i will name the SysPrep'd drive GOLD or something that will remind you not to use this. When you want to spin up new boxes simply make a copy of the "GOLD" disk and then give that copied file a proper name. I tend to make it easy and call it the same name as the server I am about to spin up.

For a better idea of the end result have a look at this Demo <<Click for DEMO>>

Issues found with Hyper-V

In the very beginning of my testing Hyper-V I was a bit disappointed in a couple things which in the end really didn’t amount to much of a problem

1. Server Builds via RDP – I found it a bit of a nuisance that I was unable to perform fresh image builds via RDP session. To explain this better the Host machine (the desktop) in a perfect scenario runs headless and I can remote in to do all the work. For some reason Hyper-V did not like this. More to the point it would not allow Mouse interaction via RDP which unfortunately is needed unless your scripting your server builds. There is a Hyper-V MMC that can be used but it requires you to be connecting into a Domain. My host is not part of any domain nor is my laptop so this was useless…. If your using Hyper-V within your company this is pretty sharp though. All in all it wasn’t a big deal and for the occasional build I can live with this.

2. Networking can be problematic. Like VMware and VPC you have option to add hardware. If you want to network your system make sure you add the Legacy Network Adaptor as shown below.

Shot6

Conclusion

Hyper-V doesn’t suck. Virtual PC (Sucked) Virtual Server was a bit better but just a little bit. Ok im being harsh here but in reality it all came down to you got what you paid for. These being free blah blah blah. A lot of us turned to VMware and I will probably continue to use it and VPC (on occasion when I have to) for presentations but for now I’m liking what I am getting out of Hyper-V. Give it a try.

Technorati Tags: ,,

Comments

Rick

Great blog post. Do you use the trial software or is there an economical way to purchase the server software for testing and learning? I want to setup similar setup as you for learning and testing on my own and thinking the trial software might be my best option? Thanks!
at 2/22/2009 5:40 PM

Isaac

Bob, Have you thought about taking it one step further and adding an ISA06 Server to the mix? And maybe an external moss server where you could test content publishing, security, and other goodies. You could even theoretically set up a farm in a box, the possibilities are endless Isaac
at 2/23/2009 4:00 AM

Bob

Issac:
Yeah thats all in the future mix.  Along with seperate boxes for testing DPM and Icronis Backup Solutions and also SQL Clustering.  This post was just a quicky beginner entry into the possibilites
 
Rick:
I am lucky enough to have a MSDN Subscription so I have the keys that keep it going for my testing.  Without this your kinda stuck using the trial wear 90 or 120 day expires.
Bob Fox at 2/23/2009 1:36 PM