IT post header

First steps with Proxmox VE

Well, we already have Proxmox VE installed on our mini PC as you can see here. Now it’s time to configure some things so that our installation is ready to to create our virtual machines.

Subscription not valid

Every time we open the Proxmox VE graphical interface, a pop-up window will appear saying that we do not have a valid subscription. This is not an error and we can ignore it.

If we want the message not to appear we have two options:

  • Get a subscription
  • Run the following in the SSH console:
# Go to the following directory
cd /usr/share/javascript/proxmox-widget-toolkit/

# Make a backup of the file that we are going to modify
cp proxmoxlib.js proxmoxlib.js.bak

# Edit the proxmoxlib.js file
nano proxmoxlib.js

## With CTRL+W we search the text 'No valid subscription' and add void({ // as we see here below

 void({ //Ext.Msg.show({                                      # Add void({ // before Ext.Msg.show
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),

# Restart the pveproxy service
systemctl restart pveproxy.service

Configure repositories and update Proxmox VE

In order to receive updates we need to have the repositories configured. By default the repositories that are configured only work if we have a subscription, if this is not the case we will need to change them. For this we will connect through SSH using the root user and execute the following:

nano /etc/apt/sources.list

We will modify the file as follows, the modifications are marked in red:

deb http://ftp.debian.org/debian buster main contrib

deb http://ftp.debian.org/debian buster-updates main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription

# security updates
# deb http://security.debian.org buster/updates main contrib
deb http://security.debian.org/debian-security buster/updates main contrib

And in /etc/apt/sources.list.d/pve-enterprise.list we will comment the line deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise to disable the repository for subscriptions.

Once we have modified the repositories we can update Proxmox VE by executing the following:

apt-get update
apt-get dist-upgrade

Network Configuration

If we want to make any change to the network configuration we will have to restart Proxmox VE. If we already have virtual machines running this is likely to be a nuisance.

To avoid this we will install ifupdown2 and in this way we can apply the changes without having to restart. To install it we will execute the following commands in our SSH console:

apt-get update
apt install ifupdown2

Once the package is installed we will see that the “Apply Configuration” button is available in our web interface.

Enable VLANs

In the image above we will see our physical interface (in my case eno1) and a linux bridge (vmbr1) assigned to the physical interface. In order to work with VLANs we will open the bridge properties and check the “VLAN aware” box.

After this we will simply need to tell the virtual machine which VLAN to connect to. We will do this in the properties of the virtual machine in “Hardware” – “Network Device” – “VLAN Tag”.

Add NAS as storage in Proxmox VE

We can add our NAS as storage in Proxmox VE. This can be useful for storing ISOs, snapshots, backups or even the hard drives of virtual machines.

The first thing will be to create a shared directory on our NAS and assign the read and write permissions in that directory to the user that we will use in Proxmox VE. It can be an existing user or a new one that we create for this.

Now in the graphical interface of Proxmox VE we will go to “Datacenter” – “Storage” we will click on “Add” and we will select “CIFS” (Common Internet File System).

Now we will fill in the fields with the following information:

  • ID: Name that we want to give to the storage in Proxmox VE.
  • Server: The IP address of our NAS.
  • Username: The user configured in our NAS with access to the directory.
  • Password: The password of this user.
  • Share: If the above data is correct, a drop-down will appear with the directory or directories where the user has access. We will select the directory for Proxmox VE.
  • Nodes: If we have several nodes we can make the NAS available only to one of them. We will select the ones we want or we will leave it empty so that it is available to all of them.
  • Content: Here we define for what type of data we want this directory to be available. We will select all the types that we want.

Once the fields are filled in, we will press “Add” and it will be ready.

The following error may appear after this:

To solve it we will go back to our NAS and set “Maximum SMB Protocol” as SMB3. In the synology NAS we will find this setting in “Control Panel” – “File Services” – “SMB” – “Advanced Settings”.

Create our first VM

To create our virtual machine, the first thing we will need is an ISO image of an operating system; I am going to use Ubuntu. The latest version of Ubuntu can be downloaded here. Once the image is downloaded we will upload it to our storage.

We expand the node and click on the storage where we want to upload the image, then we click on “ISO Images” and on the “Upload” button. In the new window we select the ISO file that we have downloaded and click on “Upload”.

Now we will right click on the node where we want to create the virtual machine and we will choose “Create VM”. A new window will appear with several tabs.

General

  • Node: Here we will choose the node where we want to create the virtual machine.
  • VM ID: Number assigned by Proxmox VE. We can choose another if we want.
  • Name: Here we will define the name we want to give to the virtual machine.
  • Start at boot: We will mark this box so that if our server is restarted, the virtual machine will start automatically.
  • Start/Shutdown order: If we have several virtual machines we can define in what order they will start.

OS

  • Storage: Here we will define in which storage the ISO image is located.
  • ISO Image: Here we will select the ISO image in the drop-down that appears when clicking.
  • Guest OS: Here we will define what type of OS we are going to install. The options are: Linux, Windows, Solaris, or Other.
  • Version: Here we will define the version of the OS that we are going to install.

System

  • Graphic card: Here we will define what type of graphics card we want to emulate. VirtIO devices tend to give the best results.
  • SCSI Controller: Here we will define the type of SCSI controller. Again VirtIO is the one that gives the best results.
  • Qemu Agent: We will check this box so that the QEMU Guest Agent is installed, if possible, automatically. This is used to improve the interaction between the virtual machine and Proxmox VE and to have some extra functions.
  • BIOS: Here we will define the type of BIOS that we want to install. We will choose OVMF if we plan to use PCIe passthrough.
  • Machine: Here we will choose between i440fx or Q35. We will choose Q35 if we plan to use PCIe passthrough.

Hard Disk

  • Bus/Device: Here we will define what type of Hard Drive we want (SCSI, IDE …).
  • Cache: Here we will define the type of cache we want for the hard disk. Write Back gives good results.
  • Discard: If our storage supports thin provisioning we can activate this option to make use of it.
  • Storage: Here we will define where we want to store the hard disk of the virtual machine.
  • Disk Size: Here we will define the size of the hard disk.
  • Format: If the option is available (it depends on the selected storage), we can choose the format of the hard disk.
  • Backup: If we uncheck this box, when we make a backup of the virtual machine, the hard disk will not be backed up.

CPU

  • Sockets: Here we will define how many Sockets we want to assign to the virtual machine.
  • Cores: Here we will define how many cores we want to assign to the virtual machine.
  • Type: Here we will define the type of CPU to emulate.

Memory

  • Memory: Here we will define the amount of RAM that we allocate to the virtual machine.
  • Minimum memory: Here we will define the minimum amount of memory that the virtual machine can have.
  • Ballooning Device: With this option enabled, Proxmox VE will dynamically allocate memory to the virtual machine between the values defined in the two previous fields depending on the amount used at all times. It is advisable to leave this parameter activated and if we do not want the amount of memory to be dynamic, we will simply put the same amount in the “Memory” and “Minimum memory” fields.

Network

  • Bridge: Here we will define which bridge our virtual machine will connect to.
  • VLAN Tag: Here we will define which VLAN our virtual machine will connect to. We will leave it empty if we do not use any VLAN.
  • Model: Here we will define the type of network card to emulate. Again VirtIO gives good results.
  • MAC address: Here we will define the MAC address of the network card. If we leave it empty, Proxmox VE will assign a MAC address automatically.
  • Firewall: By checking this box we will use the Proxmox VE firewall. I always uncheck it since I prefer to use my own firewall.

Confirm

Here we will see a summary of the configuration. If we check the box “Start after created” the virtual machine will start once we click on “Finish”. We are going to leave it unchecked since we are still going to adjust some more parameters before starting it.

Options

Now we are going to select the virtual machine and go to the “Options” screen, we double click on “QEMU Guest Agent” and we will mark the box “Use QEMU Guest Agent”.

Now we can start the virtual machine by clicking on it and pressing the “Start” button or by right clicking on the virtual machine and selecting “Start”. Then we will go to the “Console” screen to install the operating system.

If the installation asks us to remove the CD-ROM in order to continue the installation, we will go to the “Hardware” window in Proxmox VE and double-click on the CD-ROM drive, in the new window we will choose “Do not use any media”.

QEMU Guest Agent

Once the operating system is installed, we will check if the QEMU Guest Agent has been installed correctly. We can quickly see it in the “Summary” window, next to “IPs”. In my case it has not been installed.

To install it in Linux, from the console we will execute the following:

sudo apt-get update
sudo apt-get install qemu-guest-agent
sudo systemctl start qemu-guest-agent

# If necessary we will restart the system
sudo reboot now

For other systems we can see the instructions here.

If it has been installed correctly we will see that now the IP address is visible:

With this we finish the initial configuration and creation of a virtual machine.

If you have made it this far, thank you very much! If you have any questions, do not hesitate to leave them in the comments and I will do my best to help.

And don’t forget to subscribe to receive an email when new articles are published.

Don’t miss any new post!

We don’t spam! Read more in our privacy policy

Leave a Comment

Your email address will not be published.