Home Lab

Building a Home Lab

A home lab is an at-home computing environment typically setup for learning but can also be setup for many other purposes; anything from learning new technologies, testing a certain configuration before deployment, or even setting up a minecraft game server. In my last article, I wrote about my home lab, which I have been using to aid me aid me in my self-study. Today, I’d like to talk about building a lab from scratch, and the options available. It’s easier and more accessible than to you might think – so let’s get started.

A quick disclaimer: this article is a high level analysis, an overview of different approaches available and the advantages of each so you can begin researching and building toward your particular needs. This is largely because everyone’s lab is at least a bit different, depending on their needs and available resources.
I will include useful links and references at the end of this article, but this is not a nitty-gritty step by step guide on building a lab from scratch.

Fit for Purpose

Before we begin building a lab, we need to have a clear purpose in mind so we know what to build toward. For example, I’m using my lab to study for a Microsoft Tech Associate exam, so I’ve built a virtual lab with a few Windows Server and Windows 10 VMs for configuration practise.
 Later this year, I’m planning to study for a Cisco CCNA exam with a friend, and our lab will comprise of physical Cisco switches and routers so we can practise configuring these devices.
At my last role, I assisted in creating an image for our unique Point of Sale hardware, so our lab was made up of these Point of Sale machines and their bespoke hardware to test our changes.

Your lab should be built to meet your objective, and there are three broad approaches to lab building. Virtual labs are flexible, cost effective and a basic lab can be likely be started on a PC you already own. Physical labs are the best option when working with certain hardware. Cloud labs are a great way to setup a hosted service very quickly, or where accessibility is of concern.
Ultimately, you should build to reach your lab objectives and this may involve building with a mix of all these approaches.
Regardless, let’s start with Virtual Labs.

Virtual Labs

Virtualbox and VMware
  • Computing is virtualised where possible.
    • Most commonly, workstations and servers are hosted as VMs on a hypervisor.
  • Hypervisors are more accessible than ever
    • Virtualbox and Proxmox are free and open source
    • Hyper-V is included with Windows 10 Pro
    • Vmware offers free ESXi licenses with some restrictions (still great for labbing)
  • Significantly reduced cost compared to physical labs, in hardware expense, power usage and time spent deploying machines.
  • Hypervisors provide additional functionality that are (nearly) impossible in physical environments, such as:
    • Pausing and resuming VM operation
    • VM Live snapshots
    • Cloning VM disk drives and states
      • Virtual Machine ‘appliances’ – a frozen instance of a configured VM which you can just download and boot up on your hypervisor
    • Virtual networking options, depending on the hypervisor you are running
  • Virtual environments are easier to scale, provided your host hardware is capable
  • Virtual labs are not suitable for every situation however:
    • Hypervisors are only as good as the hardware they are running on.
    • Some hardware cannot be virtualised or emulated accurately.

As you can see, there’s quite a lot to say about virtualisation. A virtual lab offers a lot by way of cost efficiency, scalability and utility. By and large, this should be your go-to option for lab building, departing  only if your lab objectives require it.

For an in-depth explanation of a hypervisor, check out this article.

Physical Lab

Photo by Valentine Tanasovich from Pexels
  • Computing is done on physical hardware, as opposed to virtualisation.
    • Eg, in a lab of 5 workstations and a server, you would have 6 physical PCs.
  • This is the best option with when working with special hardware, such as a tablet, printer or router.
    • While it may be possible to emulate these devices, it’s ideal to use the real hardware in case emulation isn’t accurate.
    • This is the only option for specialised hardware which cannot be emulated reliably.
  • However, physical environments are not ideal for a few reasons:
    • Significantly more costly than a virtual environment.
    • Often more time consuming to set up.
    • They miss out on virtualisation perks, such as snapshots and easy backups.
    • All electronics will fail eventually, so a greater degree of care must be taken with physical equipment.

A wholly physical lab should be thought of as a concept or niche option at most. Depending on your objectives, most labs will be at least partially physical if needing to work with certain hardware; for example, anyone who’s objective is to learn to configure networking equipment will likely include networking hardware in their lab, which qualifies as partly physical.

Cloud Lab

  • Computing is done virtually by a cloud computing provider
    • Lots of providers, with robust and competitive offerings
    • Free trials out there offer more than you might think
  • Excellent option for anyone interested in learning more about cloud computing, or who is studying for an Azure or AWS cert
  • Also a good short-term option for those without the computing power for a virtual lab
  • Easy and fast to spin up an image and get started
  • Best approach for accessibility. A cloud lab is ideal if you need to remotely access your lab, or host online services. It’s much better to do this on the cloud than to open your home network.
  • Despite their benefits, cloud environments will always be more costly than a virtual environment in the long run.
  • Cloud labs aren’t suitable for those without reliable, strong internet access

All in all, hosting or partially hosting your lab in the cloud is a utility option that can provide a great level of accessibility. It also cannot be overstated how useful they are if you are studying for an actual cloud certification, as Amazon, Google and Microsoft all offer reasonable free offerings for the purpose of study. This will provide a lot of value if it’s a requirement of your lab objectives.

In Closing

Broadly speaking, these three approaches should cover most use cases for a home lab. To re-iterate, it’s very important to first iron out exactly what you need to achieve to have lab objectives to build toward. From there, I suggest building a primarily virtual environment, with physical equipment and cloud instances as necessary to meet your objectives. Above all, don’t be afraid to take chances and break things – after all, that’s what a lab is for.

Thanks for reading! I’ve included some useful articles I’ve come across during my research below. I hope your own lab endeavours are successful.

Cloud Lab
Blog article comparing free Cloud solutions
Information about AWS free tier – Amazon offers the most flexible free offering from what I’ve seen. Great for getting your feet wet.

Virtual Lab
Getting started with VMWare’s ESXi – it’s a tad dated but this is a very digestible and in-depth explanation to starting with ESXi
Virtualbox Manual – For a first timer lab, I’d definitely recommend Virtualbox.

General Articles
7 Homelab Ideas by Benjamin Bryan – A very well written article. Ben discusses homelab development in much more certain terms than I do, and discusses details of setting up a lab to learn particular technologies. I highly recommend this article.
Home Lab Beginner’s Guide by Hayden James – This fella’s article goes into a lot of useful detail about the actual logistics and hardware of getting a lab rolling. A very good read.
Home Lab subreddit – Lots of good discussion and handy guides here! And you can check out what everyone else is running here too. This is a great place to ask questions.

Update 18-09-20: Revised Cloud Lab section to reflect cloud certs