Skip to main content

Proxmox VE - How to Home Lab Part 1

Pulblished:

Updated:

Comments: counting...

How to set up an expandable home lab for development and hosting - Part 1

In this 6 part continuous series, you will set up a basic home lab capable of hosting multiple projects on the internet using free and open source software (FOSS), and work your way up to more advanced home lab systems and networking. My intent for this series is to start by getting a simple beginner-friendly system up and running, and guide readers down the path of improving and upgrading their home lab, getting progressively more advanced over time, eventually working all the way up to advanced home networking, high availability systems (HA), storage area networks (SAN), Email servers, and more!. If you get stuck along the way, feel free to ask me for assistance.

Why Home Lab

There are plenty of reasons to run a home lab, and just as many pros and cons of doing so, here are my opinions:

Pros

  • Fun - maybe I’m just strange, but I love this stuff!
  • Learning - experience gained from a home lab in addition to being valuable in its own right, can guide you in making better design and implementation decisions on future projects
  • Saving money - only pay for hardware, domain name registration, and electricity; hosting and other services are free
  • Own your data - because the cloud is just someone else’s computer, this is especially a motivator for me when it comes to Email

Cons

  • Software updates - so many updates!
  • Reliability - it’s difficult to run a high availability system at a single location, if your power or internet goes down, your lab and servers go down with it
  • Responsibility - if something goes wrong, you better have a backup of your critical data, because nobody else will

Why not Docker

Docker is awesome, and I use it all the time, but I feel it’s easier to get started with Promox and virtual machines, and sometime things are just easier to accomplish on a virtual machine than a Docker container. Not only that, but you can put a Docker host on a Proxmox virtual machine and get the best of both worlds like I do in my own home lab. That said, I do plan on introducing Docker down the road, most likely in my next home lab series.

What is Proxmox VE

Proxmox VE is an open source virtualization environment, essentially it is a set of tools including a very nice web interface for managing virtual machines. A virtual machine is just like any other computer or server, except it doesn’t have any physical hardware, it runs on the same hardware as the virtualization host, the hardware is ‘virtualized’. You can have as many virtual machines as you want on a virtualization host, so long as the host’s hardware can handle the workload.

While it is true that there are other virtualization tools available, it’s very akin to the Mac vs Linux vs Windows arguments in that people will always have a firm preference. I use Proxmox becuase it is open source, and I like the user interface and feature set it offers, but at the end of the day I think Reddit user benyanke said it best:

“Learning the virtualization fundamentals is far more difficult than learning a specific tool.”

Requirements

For a bare essentials home lab, we really only need two major components; a virtualization host, and a network device to handle traffic routing. Any relatively modern PC should do the trick as long as the CPU supports virtualization. Maybe you have an old computer tower in the garage collecting dust? As for traffic routing, your existing modem or router should do just fine for now, better alternatives can be implemented in the future if desired.

Note: The Qotom Q255G4 seems to be low on stock for most sellers and sold out frequently, you can check the search listings here for sellers with similar units in stock. You want at the very least an Intel i5-5200U processor (because it supports both virtualization and AES-NI), and 8GiB or more of RAM.

You could as a last resort run a lab on your workstation using VMWare, Hyper-V, Parallels, or virtualbox if you were so inclined; my first server was a busted up old laptop with no display, and it did just fine for several years! At any rate, I will focus on using a separate machine that can be set up as an always-on server since that is the preferred method.

Get Proxmox

Once you’ve got a machine to use, let’s get Proxmox up and running; Proxmox is a Virtualization Environment built on Debian Linux. Go ahead and download the latest installer from their installation instructions page and follow the steps for creating a USB Installer.

Install Proxmox

WARNING: Anything on your soon to be server machine is going to be deleted, so make sure you have all the important stuff off of it before you continue!

With your soon-to-be server powered off, plug in the Proxmox installer USB. You’ll want to get into the BIOS or UEFI of the computer where we can mess with some settings, go ahead and hit the power button, and then start pressing the F2, F10, and DEL keys on the keyboard repeatedly until you hopefully end up at a settings screen. If the computer keeps booting up to the old system, you may need to search the web for “(Your computer model) BIOS menu key”.

Use the arrow keys to navigate the menu (there are usually instructions on the bottom of the screen), first look for boot settings and move your USB installer to the top of the list, then look through the advanced settings for anything that says virtualization, VT-x, VT-d, AMD-V, or IOMMU, turn on any that are available. Finally, look for a “Save and Exit” option, the system will reboot and hopefully load up the Proxmox installer.

Proxmox Installer Menu

Awesome! Hit enter to choose the option “Install Proxmox VE”.

If you are presented with the warning “No support for KVM…” as below, either your CPU does not support virtualization, or it is not enabled in the BIOS, so you’ll need to go back and check or do some more web searching to figure this out.

Virutalization Unavailable

If you see the license agreement screen as below, you shouldn’t have any problems with virtualization. Go ahead and click “I agree”

Target Hard Disk Setting

Choose a target hard disk, this is the drive Proxmox will be installed on, most likely you want to leave this on the default setting.

Target Hard Disk Setting

The next screen will have you input your Country, time zone, and keyboard layout.

Locale Settings

Next, set a root password and enter your Email address.

User Settings

Now for network settings:

I encourage you to read at least the first few sections of my introduction to computer networking article before proceeding, getting the network settings right here is critical to being able to access the Proxmox web interface later on.

  • Hostname: You can put anything you want here, I would choose a good domain name you can implement later for your home network like bob.home, so you could use for example pve.bob.home (PVE stands for Proxmox Virtual Environmnt)
    • Note: You don’t want to use .com or any other public top level domains, and you don’t want to use .local here either for complicated reasons that are beyond the scope of this article, I suggest you just use .home
  • IP Address: You’ll want to put this outside of the available range so there are not conflicts later. If the default value is something like 192.168.0.23 for example, you’d want to change it to say 192.168.0.201. You’ll want to ping the address you intend to use first to make sure it’s not in use. Write this IP address down so you don’t forget it, we will need it later.

The remaining settings should be fine for the defaults unless you have an advanced home network already set up.

Bonus points: If you already have an advance home network, set up your router’s DHCP and/or DNS records to have the host name point to your server. It’s totally fine to skip this step if you have no clue what I’m talking about.

Network Settings

Check over the settings one more time on the summary page, and then click Install.

Installation Summary

Nice! Now you can go grab a coffee or something while the installer goes to work.

Installation Started

Fix Software Updates

Proxmox is configured by default to get software updates from the enterprise repository which requires a paid subscription to use, we just need to switch it over to the free community repository to get updates working correctly.

After the installation you will be prompted to reboot the system, go ahead with that and pull out the USB drive when it tells you to “Remove the CD-ROM”, Does anyone use those anymore?.

After the reboot, you’ll see a text only screen prompting you to visit https://YourServerIP:8006 (from another computer), and that’s exactly what we will do next, don’t forget the s in https or it will fail to load the page.

You will be presented with a login screen, go ahead and use root for the user name, and the password you used during the installation earlier.

Proxmox Login Screen

Upon logging in, you will be presented with a “You do not have a valid subscription” warning, this will always pop up when you log in and that’s fine, we aren’t going to use the Enterprise Edition, we will use the free Community Edition, there are a few steps to get that set up.

Subscription Warning

On the left column, click the name you chose for your server during the installation, then click the Shell button on the top right.

Open a Shell

A new window should open with a command line on the server. You will need to type in the five commands below to accomplish the following:

  1. Move to the directory where Advanced Package Tool (APT) looks for software update repositories
  2. Rename the Enterprise configuration file to have .disabled at the end so it is ignored by APT
  3. Create a configuration file for the Community repository
  4. Update APT’s package list
  5. Install all available software updates
cd /etc/apt/sources.list.d
mv pve-enterprise.list pve-enterprise.list.disabled
echo 'deb http://download.proxmox.com/debian/pve buster pve-no-subscription' > pve-community.list
apt update
apt -y dist-upgrade

Note: If you are using Proxmox version 5 instead of 6, change “buster” to “stretch” in line three. These are version names for Debian releases, Proxmox versions 5 and 6 run on Debian Stretch and Buster respectively.

You’ll want to reboot after installing the updates by clicking the reboot button on the web interface, feel free to choose shutdown here if you want to move the server computer somewhere else now that it’s all set up.

Shutdown or Reboot

Create a VM

After the reboot, log back in (you will still get a subscription warning, don’t worry about it though), now we need an ISO image to set up a VM. You can use any operating system you want for this, I am using the Fedora Desktop image for this example. For a server you’d want a minimal install of Ubuntu Server or CentOS, you can download the ISO for Ubuntu Server from this link (You want to stick to the LTS or long term support versions for production servers).

Once you have an ISO on your workstation, go back to the Proxmox web interface and click the drop-down arrow next to the name of your server, click on local (storage), click content, and then the upload button. Choose the ISO image you just downloaded, and wait for it to upload to your server.

Upload an ISO Image

To create a new virtual machine, click the Create VM button on the top right, punch in a meaningful name for this VM like todo-list-app and click next.

Create a New VM

On the OS tab, click the drop-down arrow next to ISO image and choose the one you uploaded earlier. Go ahead and click next until you get to the CPU tab, you are free to experiment with the other settings but keep in mind some settings may cause the VM to not start depending on your system, so let’s keep this first one really simple.

Select an ISO Image

Here you can choose the number of sockets and cores your virtual CPU will have, there really is no meaningful difference between sockets and cores unless you have multiple CPU’s on your server, I usually just use cores and leave sockets set to 1 because of the licensing implications for software such as Windows server (although Microsoft seems to be moving toward licensing based on core count so it doesn’t make much difference anymore).

Select CPU Cores

For memory, I’m giving this VM 1024 MB of RAM, which is 1 GiB. Go ahead and click next and accept the defaults for everything else, you may want to lower the disk size depending on how much you have available, you should be able to run Ubuntu 18.04 Server on as little as 4 GiB.

Select Memory Allocation

After the setup completes (may take a few minutes), you’ll see the name of your shiny new VM on the left hand column, go ahead and click that, then click start on the top right, and then click console on the inner left column.

Start VM

That’s it! You now have a Virtual Machine!

VM Running

At this point, feel free to play around and get comfortable with your virtualization server. Try adding a few more VMs, maybe some different operating systems from different ISO images.