Installing an Ubuntu VM for a Homelab Environment

GOAL

In this article I will be adding a clean install of Ubuntu Linux Desktop 20.04.3 within Proxmox 7.0, and connecting the fresh install of Ubuntu to my primary macOS workstation through SSH.

Quick note: My previous post outlining the Proxmox install and hardware build can be viewed here.

 

Installing Ubuntu Desktop VM in Proxmox VE

With Proxmox VE, creating your own VMs is a seamless process and can be done directly within the UI.

Step One: Upload the ISO to Proxmox VE

The first step when creating a VM in any hypervisor is to make sure we have the ability to install an OS on the VM. Locate the ISO image from the official Ubuntu website and download the latest release. Before use, the download can be verified by running the provided command in the terminal.

Next, in Proxmox, click local from the side panel on the left-hand side of your screen.

Under the Content section, click the Upload button at the top of the screen.

Click the Select File button on the popup and choose the ISO you would like to upload from your local drive. Then click the Upload button.

Alternatively… There is also the option to upload the ISO directly into Proxmox by selecting Download from URL. Copy/paste the ISO URL and click Query URL. Select the appropriate hash algorithm, in this case it’s SHA-256 and paste the checksum provided from the Ubuntu website. Lastly, click Download and Proxmox will verify the file and load the ISO into the VE.

The time it takes for your ISO to upload will be dependent upon the speed of your network and the size of the ISO. One the upload is complete, you are ready to create your VM in Proxmox.

 

Step Two: Creating a VM in Proxmox VE

To create a VM in Proxmox VE, click Create VM at the top of the screen.

The following pop-up window will be displayed. Work your way through the setup by naming your VM, selecting the image file that was just downloaded, choosing how much hard disk space you need, and selecting how much RAM you wish to allocate to your VM. Of course, all of these preferences can be changed later is you wish.

Once you reach the “Confirm” tab, ensure the information is correct and then click Finish.

 

Step Three: Installing Ubuntu in Proxmox VE

To begin, choose your VM from the “Server View” panel on the left-hand side of your screen. Start the VM by clicking the Start button at the top of the screen. Ubuntu will walk you through the installation process, selecting your language and keyboard preferences, as well as confirming where to install the directory. Once complete, it will prompt you to restart the VM.

Quick note: The same process can be used to install other operating systems, as you may notice that I am also currently running Kali Linux and Windows 10.

 

Connecting to Desktop through SSH

Connecting Ubuntu Desktop through SSH is simple. To enable SSH on Ubuntu, we first install the openssh-server, followed by ensuring our SSH service is on. Follow this guide for more detail on enabling SSH on Ubuntu. This small setup allows us to only SSH within the same network.

In Ubuntu’s terminal, enter the following:

$ sudo apt update
$ sudo apt install openssh-server
$ sudo systemctl ssh

Once we have installed the openssh service on Ubuntu, we then need to get the IP address of the machine by typing:

$ ip a

We can now connect to our Ubuntu machine through SSH. Linux and macOS systems have SSH clients installed by default, so in the macOS Terminal app, this simple command is the only thing you need to enter:

ssh username@ip_address

Be sure to change “username” with the actual user name and “ip_address” with the IP Address of the Ubuntu VM.

And success! We now have a stable SSH connection between the Ubuntu Desktop VM and my MAC workstation.

 

Summary

In my process of building my first homelab virtual environment, I used Proxmox 7.0 to install and build an Ubuntu VM and enabled the ability to SSH into it from my main macOS workstation. Now I have the option to login to the Ubuntu VM to quickly perform sysadmin tasks through my macOS command prompt instead of performing them within Proxmox.

Previous
Previous

A Guide to installing and using the Nessus Vulnerability scanner

Next
Next

Proxmox: A VM Server For Your Home