Thanks to virtualization and cheap, powerful hardware, there are a lot of cost effective options available today for setting up a learning environment on your own. Early in my career, these options didn’t exist. In fact, back then you were lucky if your employer had test hardware available for you to “play” with. All too often, many of us learned in production.
If you’re an IT Pro, this is an important investment in your career. In this blog post I will make suggestions on how you can cheaply build yourself an IT Playground. I’ll also talk about some mistakes I made along the way to hopefully save you from a few strands of grey hair.
1. You need some hardware
Depending on your current rig, you can often build a small virtual lab on it or buy some dedicated hardware. My job requires a lot of travel and learning, so I have upgraded my laptop to better accommodate Virtualization as well as purchased a dedicated full sized desktop for learning/lab work. Especially if using your current day to day laptop, I recommend adding at least a 256 GB+ SSD. Prices are dropping on the 500ish GB SSD so they are worth a look. Also ensure that you have at least 8 GB of RAM, though 16 GB would be better. The amount of disk space and RAM you have is going to dictate how many virtual machines you can run simultaneously. It’s very rare that I run out of processing power with an i5 processor, but I do run out of RAM, and my desktop (which has a conventional Sata drive) is definitely IO bound.
If you spend a little time planning and researching, you can build a great learning environment without a large investment.
Using your regular laptop has advantages:
- It’s cheap to upgrade.
- If you upgrade it, your regular work rig is nicer to use for day to day tasks because it’s faster!
- It’s highly portable (assuming you have a laptop) – you can easily take your lab on the road with you.
But it also has disadvantages:
- You may find yourself always running out of disk space.
- If you run enough VMs, using it for anything else (at the same time) can get annoying.
- Your employer may not allow you to upgrade their laptop.
Using a dedicated desktop also has advantages:
- Your daily rig isn’t affected.
- Though the performance gap between desktops and laptops has been rapidly closing, powerful desktop hardware is still cheaper and faster than most laptops.
… and also has disadvantages:
- Depending on what you buy, desktops are often louder than laptops.
- Unless you set up a VPN, you will lose access to your lab if you go on a 2 week business trip.
- More hardware = more management.
- I’ts more expensive than upgrading your laptop.
If you’re just starting out and have a decent laptop, I recommend that you start by upgrading it. You can always add dedicated hardware later.
If you go the laptop/SSD route, I also recommend you purchase fast, external storage that either has USB 3.0, eSata, or Thunderbolt ports. I also have a 2 TB NAS device on my gigabit network, which is a great place to store ISOs, and commonly used utilities. These are cheap and easy to own/manage.
2. You need a router
I almost didn’t mention this because most people these days have a wireless router, and technically if you run all VMs locally, you don’t need one. The right router can be key if you travel and go the dedicated desktop route. I use the Asus RT-N66U because it has excellent wireless range, a fast internal processor, Gigabit ports, and the ability to set up a VPN without flashing the firmware to a home built version like Tomato. The VPN setup is invaluable to me because whenever I am on the road, I can hit my desktop/lab.
3. Pick a virtualization platform
There are lots of great choices. You could go with a copy of VMWare. VMWare has a lot of automation built in when you’re building guest Operating Systems, but it’s not free. You could go with Hyper-V, but you need to choose a host operating system that has this feature. I’ve had a hard time finding regular drivers for my desktop and Laptop for server operating systems, so I’ve never gone this route. Fortunately, Windows 8 has Hyper-V. However I have not had any luck RDP’ing to a Windows 8 host machine despite reading the manual, blogs, etc.
I use and recommend Oracle VirtualBox. Why?
- It’s free and I’m
- It allows you to tune the size of your VMs (Ram, Network cards, Processors, etc.).
- It’s cross platform, it works on Windows, Macs, Linux, etc., and I love playing with operating systems
One word of caution with VirtualBox: It has “guest additions”, which is a series of drivers you install on your VMs. On Windows, this allows you to easily re-size the screen, move your mouse pointer out of the VM without hitting the host key, and map drives to your host operating system. The drivers are not signed, and the guest additions don’t work well with Windows Server 2012 (yet). If you’re building, Windows clusters can cause issues during the cluster setup phase. Not to worry! As long as you are not installing Windows Server 2012, you can just install them after your cluster config is done.
4. You need an OS
Decision time! This might be a little weird for me to say as a guy who’s built his career on Microsoft products, but I love using Linux. I find that Linux is a great host OS for virtual machines; however, I don’t like the graphical remote connectivity options (VNC variations) when compared to RDP. Ideally, I’d run Windows Server 2008 R2 or Windows Server 2012, but my desktop manufacturer doesn’t make all the drivers available for my desktop. I like Windows 8, but I can’t seem to get RDP working. Since my desktop is not hooked up to a monitor or keyboard, RDP is critical so I’ve opted for Windows 7 x64. It works well for my purposes, but I’m not using Hyper-V.
5. You need software
Assuming you’re going to explore Microsoft’s offerings, you need a legal, easily accessible source of software. Microsoft offers Express editions of SQL Server and a great product named “Technet”, which will work nicely. There are different levels of subscription available, and the price is very reasonable. Check it out here. You can gain full access to most of Microsoft’s Operating Systems and server packages.
If you need some sample data, you can always build your own or download the AdventureWorks database(s).
If you don’t want to stop learning with Microsoft and want to beef up skills in, say, MySQL, Oracle, or DB2, or maybe want to practice making the different technologies work together, many vendors offer “Express” editions of their software for free.
6. What’s next?
A subscription to an online reference library can help boost your learning. Check out Books 24×7 or Safari Books Online. Though I’m sure there are other similar services, I’m most familiar with these two. Both offer short trial memberships.
Next, spend some time reading blogs. Many DBA bloggers offer examples with code that allow you to see the problem/issue “first hand”.
A few tips and pitfalls
Building a Domain Controller (DC) on Windows is a great way to save yourself some time creating users and managing security on your VMs. It’s a great way to learn Active Directory and a DC is also required if you are going to play with Clustering or Always On Availability groups.
When setting up network cards in VirtualBox, the default setting is NAT. I recommend using “Internal Network.” The reason for this is that your router will not assign IPs to your Virtual Machines in this configuration. When you build a lot of VMs with static IPs, you can fill in your IP range at home pretty fast. Note that DHCP is not available in this setting and that you will need to specify an IP address for each network card added to the VMs.
If you have a Domain Controller and want to put your VM on your domain, you need to set your DC as your DNS server so that your VM will see the domain and other VMs.
The only downfall of this is if you want to access your VMs from “outside” your internal network. I think it may be possible to bridge your “Internal Network” with your wider network, though I have not explored this yet.
If you’re using a separate piece of hardware, make sure to give it a Static IP or set a DHCP reservation on your router.
You can add Internet connectivity by adding a second network card with either NAT or Bridged setting for Windows Updates and Activation.
If you are going to build a cluster, you will probably need shared storage. There are lots of free options available. My absolute favorite is FreeNas. I find FreeNas a little challenging to work with, but there are lots of great guides available on the web to help you create your first Shared Storage array.
My second favorite is the free version of StartWind iSCSI free edition. Note that there are connection limitations on the Free StarWind product, but it is very easy to use and the paid offering has some pretty cool features. There are other players out there; I’m just mentioning my free favorites.
When you build and run several continuous VMs for simulating environments, such as a 3 node cluster (Requires at least 5 VMs), and only have one hard drive, you will likely run into IO issues. Putting your host OS on an SSD and adding another, fast (7200 RPM) Sata 3 drive and then spreading the VMs across your drives will help a lot.
My desktop has a newer Intel i7 processor, and I rarely come close to using all of my processing power. The bottleneck I face is with IO. In retrospect, wish I’d saved a few dollars and went with a i5 and additional hard drives.
You can build VM templates and make your life a bit easier. If you are doing this with Microsoft OS products, Sysprep is your friend. More here.
Lastly, a word of warning – once you get started it can be addictive!
Share this article
15 Responses to “Setting Up a Home Learning Lab”
Leave a Reply