Making your first virtual machine and container in Proxmox VE
Now that we have created our Proxmox host using this tutorial, we can host many virtual machines and containers.
In this tutorial, we will show you how to upload installation media to your Proxmox server and create a virtual machine and container in it.
Storage division in Proxmox VE
The disk on which Proxmox is installed, is divided into two parts – local and local-lvm.
The local storage is used for storing your ISOs, CT templates, and backups of your machine, while local-lvm is used for the virtual hard drives used by the VMs and containers.
Creating a Virtual machine
Our example virtual machine will have the following specs:
UEFI System
CPU - 4 core with AES
RAM - 4GB
HDD - 32GB
OS - Debian 12
We will start by uploading a Debian ISO.
Go to Datacenter>Your Server’s hostname>local>ISO images and click Upload.
After clicking Select File, locate the ISO on your computer and click Upload.
Alternatively, you can download the ISO directly to your server. Click Download from URL and paste the download link. After querying the URL, click Download.
The ISO is ready to be used when it shows TASK OK in the Log.
Right-click your node, or use the buttons at the top right corner, and choose Create VM.
The first page is choosing the Node, ID, and name for the VM.
We will name our first VM Debian and set an ID of 100. We can proceed to the next tab by clicking Next.
The next tab is OS. Choose the uploaded Debian ISO uploaded in local storage.
You can change the Guest OS options if you plan to host Windows VM,. The recommended minimal settings and parameters from Proxmox will be automatically applied.
The GPU, BIOS, and disc controller settings can be changed in the System tab.
For an ordinary VM with BIOS, you can leave the settings as they are.
You may change BIOS to OMVF(UEFI) if you plan to host Windows or a more modern Linux. It will create another virtual disk for the EFI filesystem, which will be used for storing the EFI keys. These disks are stored only on local-lvm storage.
Our next step is to set our Disk size. As the EFI disks those are stored in local-lvm storage.Change the Disk size for your needs.
Next, we will set the CPU. For an ordinary setup, you can change only the core count. If you want your VM to do NUMA operations, you can also change the sockets count, as that will emulate multiple processors for your VM.
Note that your VM may fail to start if your server or PC has an older CPU and doesn’t support certain instruction sets, like AES. To fix that, change the type to another one that is supported by your server CPU.
After that, set the amount of allocate memory.
The last step is to set up the networking. We will leave the options as it is.
You can later change the type of networking card if you experience networking issues with the default ethernet card.
The last tab will show you a summary of your VM configuration. Click Finish to create the VM.
Access the new VM from the side. Click it and then click Console.
It will open a noVNC console to the virtual machine. Click Start now to turn on your VM.
And your first VM is ready to be installed with an OS of your choice.
Creating a container
Proxmox can also host LXC containers. They are slightly different than the popular Docker containers but still provide the same containerization experience.
If you want to host a simple server, for example a simple web or a TFTP server, and don’t want to provision a VM for that, you can make container. They have less resource usage than VMs.
Proxmox uses CT templates to create them. You can download them from Proxmox’s repository() or directly from the web interface.
We will start by going to Datacenter>Your Server’s hostname>local>CT templates and then clicking Templates.
Choose the distro you like and click Download.
After it shows TASK OK, we can create our first container. Right-click your node, or use the buttons at the top right corner and choose Create CT.
The container setup is nearly identical to the VM setup. We will start by naming the container with a hostname and setting a password for the root user.
Then select the downloaded template.
We will choose the size of the container filesystem by setting the Disk size option.
Since this is a container, you can only set a core count.
In containers, you can assign both RAM and SWAP memory.
Containers can have one internet interface. You can set it to use either a static or dynamic IP address.
The address should be in CIDR format. In our example we will enter 192.168.1.10/24. Enter the gateway as well.
And the last step is to set the DNS servers. You can either leave it as it.
It will show you a summary of the settings at the last tab. You can start creating your container by clicking Finish.
Like the VMs, you can access the Containers from the side. To access their console, click Console.
Then start the container by clicking the Start button in the upper right corner.
After that, log in as root with the password you set in the first tab.
In our next tutorial, we will explain how to control and modify your newly created VMs and containers.