This tutorial is designed to help you set up your own Ubuntu Virtual Machine on a Proxmox server, such as the ones in GH165. Once you have this initial setup done, you can use your VM for whatever you want!
If you are choosing to do this on your own hardware, please follow this tutorial first:
You will also need the OS image ISO, which can be found as part of the below tutorial. YOU DO NOT HAVE TO FLASH THE IMAGE. You just need the downloaded ISO file.
If you are creating a VM on the NKU hardware, reach out to us first! We need to setup a resource pool for you to use and give you proper permissions!
If you are using the GH165 servers, choose one of them to put your Virtual Machine on. For this tutorial, we will be using 'prox4'. Once you have chosen your server, select it and select the 'local' storage pool. This is where we will place our ISO image.
Now that you have chosen a server, you need to get the ISO image of Ubuntu. This will contain everything needed to install the OS.
- Once in the local storage pool of your Proxmox installation, select "ISO Images" on the left. Either click "Upload" if you already have the image installed or use "Download from URL" to take it directly from the Ubuntu website. Here, we will just use "Download from URL".
- You can access the most recent version from here: Ubuntu Download. Hit the green "Download" button, cancel the download, then copy the "download now" link on the left.
- Paste this link into the "Download from URL" section, then hit "Query URL". A name for the file should appear that ends in ".iso". If so, hit "Download Now".
If you are using the NKU homelabs (or have already setup a VM in the past), skip this step as we already have storage pools set up. Only use the "proxzfs" storage pools for your VMs if you are using the NKU servers. Otherwise, we need to set up a storage pool. This will serve as the virtual storage for our VM.
- Select your proxmox server
- Scroll down until you see the "LVM" and "LVM-Thin" options. LVM is static (allocate all space as soon as it is created). LVM-Thin is dynamic (as VM needs space, allocate it. Slower, but potentially more space efficient). Whichever you choose to use is up to you.
- If you already made a VM, you can likely just use the same storage pool. However, that is up to your own personal preference, as this means they will share that space.
- Hit the "Create Volume Group" or "Create Thinpool" button. Choose a disk to base the storage pool on and give it a unique name.
If you are using the NKU homelabs, reach out to us for this step! We will set up a resource pool for you. Otherwise, we need to make a resource pool that will allocate what your VM needs to it.
- Click on "Datacenter" at the very top of your server tree on the left.
- Scroll down on the middle pane until you find the "Permissions" dropdown. Click it, then click "Pools".
- Hit the "Create" button. Give your pool a unique name and description.
We are now ready to get started making the actual VM! Click the server you want to use, then click the blue "Create VM" button in the top right.
- General Tab - Here we set some generic information about our VMs.
- Node: What server you are setting up the VM on.
- VM ID: A unique identifier for your VM. It is recommended to leave this on the default.
- Name: What you want to call your VM
- Resource Pool: Which resource pool you want to use, as determined in step 4.
- OS Tab - Where we pick the image to boot from. If you already downloaded an ISO Image, pick "Use CD/DVD disc image file (iso)" to access it.
- Storage: Where the ISO image is located, should be on "local" if you followed previous steps.
- ISO image: The ISO image you installed.
- Type: What OS you are trying to install. This guide is for Ubuntu, so pick "Linux".
- Version: What version of Linux to use. For the current version of Ubuntu, we want "6.x - 2.6 Kernel"
- System - Everything here can be left default, EXCEPT you likely want to turn on the "Qemu Agent." This will let you create backup snapshots of your VM.
- Disks - This is where we set up the virtual drives our VM will use. You can mess with this if you want, but for the purposes of this guide these are the only parts that matter:
- Storage: The LVM/Resource Pool we are creating the virtual drive from. Once again, use the "proxzfs" pool if you are using NKU hardware.
- Disk Size (GiB): How must storage space you want on the drive. For most cases, you shouldn't need more than 32 or 64 GiB. On the NKU servers, please let us know if you need more than this.
- CPU - How many physical CPUs/cores you want to use for this VM.
- Memory - How much memory to allocate to the vm. Try to keep this as a power of 2. For most purposes 8 GiB (8,192 MiB) will be sufficient. If you need more than this on the NKU servers, please let us know.
- Network - How to connect the computer to others on the network/internet. Setting up a bridge will make the computer have its own IP address given by the network. Leaving these on defaults will be fine.
- Confirm - Double check and make sure everything is set up how you want. You may want to select "Start after creation."
To view your new VM, click its icon on the left bar under your server, then click the drop-down arrow next to "Console" in the top right, and "noVNC". You can now see your VM!
Since we enabled the "QEMU Agent" before, we can also take snapshots whenever we want. It is a good idea to create an initial snapshot for if something goes wrong down the line.
- Back in the Proxmox web GUI, select your VM then select "Snapshots".
- You can create a new snapshot by selecting "Take Snapshot"
- Be sure to give your snapshot a unique and helpful name and description.
Next we need to setup Ubuntu itself. Follow the steps in the wizard once the GUI pops up. Here is a guide on how to get things set up:
When you see these steps, I would recommend these selections:
- "Use wired connection" when asked how to connect to the internet.
- Skip the "Update the installer" step.
- Select "Install Ubuntu" when it appears
- "Interactive installation" (unless you have a yaml file set up)
- "Download and install support for additional media formats" - Unless you do not think you will need it
- "Erase disk and install Ubuntu" - We are on a fresh VM so this is safe.
Now just wait for it to install. Congratulations! You now have an Ubuntu VM setup on your Proxmox server! For next steps you may want to install Docker. Here is a helpful guide on how to do that (follow the "Install using the apt repository" section): https://docs.docker.com/engine/install/ubuntu/