Home Lab - Part I: Server

Home Lab - Part I: Server

In the last few months I expanded my home lab with a new server (and a new router but that’ll be in another post). I purchased a used enterprise server and started migrating my already hosted services over to it (for example this website) and adding services and experimenting with things to learn and grow and have fun.

If you are a little lost, a home lab is the installation and/or configuration of enterprise hardware/software in the home. People do this for fun, to brush up on job related skills, or experimenting with new technologies. It can be as small as a virtual machine on your computer where you mess around with CentOS or as large as multiple full racks that eat up more power than the rest of the neighborhood. This post will serve as an intro to my home lab and what it does.

Physical Server

It’s easiest to start at the tangible things, which in this case is an actual physical server. Technically a server can be anything that serves data, in my case I bought a used Dell R710, which was top of the line enterprise server hardware back in 2012 and fits my needs nicely, especially budget wise.

When I first got the server, things were a bit messy.

That large grey thing is the server:

Plenty of wires running everywhere.

Then I at least put cleaned up the cables a little bit:

That’s the server on the bottom with networking equipment on the top:

And here is a picture with a refurb computer on the desk. You can also see the UPS battery backup in the lower left with the white light on it:

The battery backup unit, which contrary to popular belief isn’t so I can have my server on when the power is out, is responsible for protecting against corruption of data during a power outage. If a computer is in the middle of writing data when the power fails all the data on the disk can become corrupted. On a server this is Very Bad News. To mitigate this risk a battery backup will keep the computer running for 5-10mins after the power goes out to finish writing data and then power down when it is safe. (there is an added benefit during a brown out where power is only out for a minute or power flashes, the server wont shut down - which can take 5mins to boot back up).

The specs:

Component Spec Notes
CPU 2x Intel Xeon X5660 Hex Core 2.8GHz 24 Cores
RAM 128GB DDR3 RAM  
HDD 6x3TB Drives RAID5 (13TB useable)
HDD 1x8TB USB Drive For Backups
Network 4x1000/100/10 Ports  
Network 1x100/10 iDrac Remote Management

This machine is a beast. It would be wildly overspecced for a typical home user and even a typical small/medium business would not need this much computing power so why do I have it? Virtual Machines.

Virtual Machines

Now you might be asking what the heck is a virtual machine? And why would that require a lot of computing power?

Well, the simple answer is a virtual machine is an emulation of a computer system. It provides the full functionality of a real computer system inside of another one. You assign your virtual machine resources (say 2xCPU cores, 8GB RAM and 50GB Hard drive space) and now you can use that virtual machine as a computer. If you have a particualary beefy physical host machine you can deploy many virtual machines. Inside these virtual machines you can install operating systems, different programs and they will act like a physical computers with the allocated resources (and maybe a slight 5-10% performance hit from being a virtual machine).

So now we have a bunch of virtual machines, but why? I basically described setting up a slower computer inside your computer. Which doesn’t make a whole lot of sense at first, but think about the virtual machine more like a file and you can start to see the possibilities.

I can save this file and load it up on another host machine - making backups or dynamic scaling very easy. Imagine a website that gets very popular at certain times of the year, for example a website that has information on daylight savings time. For most of the year I only need one server, but for the week before and after the clocks change my one server becomes overloaded with everyone looking up information on daylight savings time. With virtual machines I can copy my virtual machine that serves the information onto other machines as needed. I don’t need to buy another physical server that will sit idle most of the year, I can rent a server in the cloud and use my virtual machine on it when needed.

There are many other advantages of virtual machines including security, hardware utilization, image based snapshots/backups, and more. Breifly, security wise, rather than installing multiple services on a single machine (potentially allowing security holes in one service to compromise the other services) you can install services on multiple virtual machines and they are now separate and if one service is compromised the others are unaffected. Hardware utilization also benefits from virtual machines, allocating virtual resrouces as needed is much easier than installing or removing physical hardware - and often times can be done without even turning off the virtual machine. A good hypervisor (virtual machine host) will also incorporate snapshots, which are images of the state of a virtual machine - before upgrading a major service on a virtual machine you can make a snapshot - if the upgrade breaks something or doesn’t work correctly you can roll back to the snapshot.

For me the main advantage is flexibility and cost/space/power savings. I can have 20 virtual servers hosted on one physical server, rather than having 20 physical machines which would require more space, cost more and consume more power. The next biggest advantage for me is the ability to run different operating systems, my linux based host machine can have windows guest virtual machines.

If I read about a new technology I want to test out, for example an image hosting service, or a caching server, or a new web server technology, I can spin up a new virtual machine to test it out. This new virtual machine won’t change or affect my current virtual machines, so it won’t interfere with my webserver for this blog. And if I don’t like it, I can just delete it.

Example Virtual Machines

Currently I have about 30 virtual machines is various states of testing and production. I even have one for monitoring them all.

Below is a screen shot of proxmox (a hypervisor, basically a manager for the virtual machines). On the left is a list of some of my virtual machines and on the right is an overview of the load on the host machine (my server):

To keep a better eye on all these virtual machines and their resource usage I have set up a monitor server (also a virtual machine) to collect and format the data, here is a monitor screen from my home lab showing CPU usage and RAM usage:

Everything starting with VM or CT is a virtual machine (or container, which is like a virtual machine but shares more resources with the host). At a glance I can quickly see average usage on each machine. Something like this would not be out of place in a production Network Operations Center or Data Center to monitor health and status of servers relied upon by people for their online services.

Here is a table of some services I am currently running in virtual machines and an explaination of what they do:

Main Service Virtual Machine Name Notes
DNS forwarding CT-DNS01 Ad blocking on DNS level.
Apt Cache CT-APTCACHE Apt is an update package system in linux, this server caches updates locally and serves them to other virtual machine, saving internet bandwidth - in the last 2 months alone it has saved close to 3GB in updates downloads.
Reverse Proxy CT-RPROXY A reverse proxy is a target for external requests to be forwarded to internal locations, rather than have each external service have ports open to the internet everything is pointed to the reverse proxy first. Advantageous for security and caching.
Local Web CT-LOCALWEB Local web services including network documentation, link page for internal network services.
Netbox CT-NETBOX Inventory/IP tracking and management.
External Public Web Server CT-SERVLIVE-PUB web server for public services like this website.
External Private Web Server CT-SERVLIVE-PRIV web server for “private” services I still want to access on the internet, for example password manager, inventory manager, file sync, kanboard project tracking.
Network Boot Image Server VM-FOG network booting and OS image server for network boot and installing OS for refurb computers.
Steam Cache VM-STEAMCACHE Caching for steam games.
Media Server VM-Media Media server for serving media.
Ansible Test Server VM-ANSIBLE Ansible is a configuration management tool, I have created a server to test it.
VPN Server VM-VPN VPN for accepting remote connections to access local network resources.
Monitor VM-MONITOR monitoring with zabbix and grafana (the dashboard above showing CPU and RAM usage).
IPA VM-IPA Currently testing IPA as an authentication server.
GNS3 VM-GNS3 Network emulation tool, also uses virtual machines to emulate network devices like routers and switches for learning network configuration.
Domain Controller VM-WIN2016-DC01 Windows Domain controller.
Windows Refurb Image WIN10REFURB Virtual machine of refurb image install.
Windows Test machines various about 5 windows test machines for various windows testing scenarios.

Below are some examples of the services:

This is part of the link page to internal services, generally each button is hosted on a different virtual machine and provides a different service:

An example of the Pi-Hole DNS ad blocking service:

A screen shot of downloading a game from the local steam cache server I set up, note the download speed of 113MB/s. This is about Gigabit speed, if I was downloading from the internet I would be seeing only about 7MB/s:

And below is a screen shot of my desktop with a number of virtual machines open, I outlined the important things to note in green:

The top left window is from a virtual machine running Windows Server 2016 with 8GB of RAM, below that is a Windows 10 virtual machine with 4GB of RAM, to the left of that is a Linux Distribution I was testing out which I allocated 16GB of RAM. Above that are two terminal windows showing the usage of the server (left) and the desktop I am using (right).

Conclusion

As you can see there are lots of things to do with a home server as part of a home lab. On the other side of the home lab is the networking equipment, and virtual LANs which I will save for a later post.

I am very happy with my server, although I would like to get a dedicated NAS (network attached storage) to experiment with more robust backup solutions and faster data storage speeds. And I am already getting close to maxing out my RAM usage… I also want to experiment more with data center level virtualization with multiple hypervisors and remote data centers and high availability containers…

Back to Top ↑