Categories: Ubuntu

How to Install Proxmox VE [Step by Step Guide]

In this article, we will see step by step guide to install Proxmox VE on your Server environment. Proxmox Virtual environment is a free and open source, full feature platform for enterprise virtualization. It not only integrates the KVM hypervisor and Linux Containers(LXC) but also the software defined storage and network functionality on a single platform. The integrated web interface can be easily used for managing VMs and containers, high availability for clusters or the integrated disaster recovery tools.

If you are looking to virtualize your IT infrastructure, minimize resource deployment cost and increase efficiencies then Proxmox VE is the best solution suited for your requirement. You don’t have to worry about scaling your infrastructure anymore for future growth. It can dynamically scale computing and storage as per your requirements. It can even virtualize the most demanding Linux and Window application workloads with ease. Here we will see a step by step guide on how to install Proxmox VE and create a virtual machine on it with almost no effort.

 

Sponsored

How to Install Proxmox VE [Step by Step Guide]

Also Read: How to Install Portainer on Ubuntu 22.04 

Step 1: Prerequisites

a) You should have a Server(Physical or Virtual) ready to install Proxmox VE on it.

b) You should have a USB medium to be used as a bootable medium.

c) You should have a supported web browser installed to access the web interface.

d) You should have the recommended hardware requirements fulfilled to get the best experience.

 

Step 2: Download Proxmox VE

Visit official website and download the latest available ISO installer from below highlighted download link.

 

Step 3: Create a Bootable Disk

After downloading ISO installer, you have to take a fresh USB device and make it bootable by copying the image on it using some specialized tools such as dd command available on Linux based systems. Just plugin the USB device and run below command to make it a bootable medium.

dd bs=1M conv=fdatasync if= of=/device/name

You have to specify the full path of proxmox iso installer on option if= and also have to provide the full path of USB device medium correctly on option of=

 

Step 4: Install Proxmox VE

Plugin your USB medium to the Server where you would like to install Proxmox VE. Boot the Server with Proxmox ISO Image by selecting the USB installation media from Boot Menu. Depending on your server architecture, boot menu would be generally accessible by pressing Esc, F2, F10, F11 or F12.

Once the booting process starts, it should show below Proxmox VE menu where you have to select the appropriate option using up/down arrow keys to start with the installation. Here we are selecting Install Proxmox VE (Graphical) to start the Graphical installation.

Next you will see an End User License Agreement(EULA) for Proxmox Virtual Environment. You have to carefully go through the agreement and then click on I agree to proceed with the installation.

By default, it will select a target harddisk to partition and install all required packages. If you have multiple disks then you can choose the harddisk where you want it to be installed. After choosing the correct harddisk, click on Options to make sure Filesystem is selected as ext4 as shown below. Once verified, click on OK and then Next to continue.

Next it will ask you to select the Country and Time Zone to make your installation faster by choosing the nearest mirror to download all the required files. Once the details are filled, click on Next to continue.

Then you will be asked to setup administration password and email address. You must provide a password which should be atleast 8 characters long and contain a combination of letters, numbers and symbols to secure your root authentication. A valid email address must be entered to get the important alerts and notifications about backup failures, high availability events etc. Once given, click on Next to continue the installation.

Next step is the management network configuration. You have select a management interface and provide a valid hostname. If have DHCP enabled, then you will see an IP address, Gateway and DNS Server getting assigned automatically. If you agree with all the details mentioned then click on Next to continue.

Finally you will see a summary of all the options provided. Please check all the details provided. If something is not correct or you would like to modify some option then you can always click on Previous and go back to change that option. You can also tick mark Automatically reboot after successful installation to restart Proxmox VE automatically after installation. Once done, click on Install.

 

Installation will be started and should progress like below. You may need to wait for few minutes before it completes.

After successful installation, you will see below Installation successful message displayed. It will automatically reboot after few seconds but you can also reboot it immediately by clicking on reboot as shown below. Don’t forget to notice the URL provided which have to be accessed through your web browser.

After successful reboot, you will see below GRUB Bootloader screen where by default it will boot through Proxmox VE GNU/Linux OS. You can also use up/down arrow keys to change your option.

After the booting process completed, you will see below login screen. Take the URL shown here and paste it on your favorite web browser.

If Port 8006 is allowed through firewall then you will see below page getting accessed in google chrome browser. Here you have to click on Advanced to proceed.

Then click on Proceed to 192.168.0.102(unsafe) link to open the Proxmox VE web interface.

It should open like below where it will ask you to first login with the correct root credentials. Provide the same password which you given earlier during the installation and click on Login.

You will be successfully logged in and dashboard should appear like below. This confirms successful installation of Proxmox VE on your Server.

 

Step 5: Create a VM

Now that Proxmox VE installation is completed, let’s create a VM. For that, you should have the VM ISO Images uploaded on Proxmox storage. This can be done by expanding pve node and selecting local(pve) storage. Then navigate to ISO Images and click on Upload.

Browse to the path where you kept the ISO Image and click on Open to choose that image. For example, here we are uploading ubuntu-20.04.2 desktop image from the required path. Then click on Upload.

Image will start getting uploaded as shown below. Depending on the size of the image and your local network upload speed, you have to wait for few minutes till it gets uploaded.

After successful upload, you will see below Task viewer screen with import in progress. Wait till import completes. Once you see import completed successfully then close below screen.

Sponsored

You may notice that ubuntu 20.04.2 desktop iso image is now successfully uploaded and visible on the local storage.

To create VM, navigate to pve node and click on Create VM as highlighted below.

In the General tab section, provide the Name of the Virtual Machine and verify other mentioned details.

Then go to OS section, and click on drop down to select the ISO Image. You will notice that the uploaded image is shown here.

Select the ISO image and verify other Guest OS details.

Then go to System and check all the default details mentioned below. There is not much to change here. So leave everything as it is and then proceed to the next section.

Next, go to Disks section and check all the details given. Verify the Disk size as shown below.

NOTE:

Please note that if you are using SSD disk then tick mark and enable the Discard option.

Then go to CPU section and check the sockets and number of cores given. Since I have allocated a total of 1 core, so by default it is selecting 1 core but in your case the total number of cores might be higher so you can allocate as per your requirement.

Then go to memory section and provide the memory in MiB.

Next go to Network section. Here you may notice bridge vmbr0 is currently used for management network. To create VMs, you may think about creating a separate VM network to secure your resources. We will shortly see how you can do this. But for now leave everything as default and then move on.

Finally you have to confirm all the details provided and click on Finish to start creating the Virtual machine. If you want to start the Virtual machine after creation then check mark the Start after created option.

You will see a VM appserver getting created under node pve as shown below. You can verify the status showing as OK.

 

Step 6: Start VM

To start the VM, go to Console section and click on Start Now as highlighted below.

If everything goes well, Virtual Machine should start as shown below.

 

Step 7: Using qm utility

Now that you have a fair idea about GUI interface, let’s talk little bit about command line interface to manage VMs. In proxmox, qm is the main command line utility to manage Virtual machines. For example, if you want list all the VMs then run qm list command as shown below.

root@pve:~# qm list
  VMID NAME          STATUS    MEM(MB)   BOOTDISK(GB) PID
  100  appserver     stopped   2048             32.00 0

If you would like to start any stopped VM then run qm start command. Verify the vm status by using qm list command.

root@pve:~# qm start 100
root@pve:~# qm list
  VMID NAME          STATUS    MEM(MB)   BOOTDISK(GB) PID
  100  appserver     running   2048             32.00 6795

Similarly, if you would like to stop any running VM then run qm stop command. Verify the status using qm list command.

root@pve:~# qm stop 100
root@pve:~# qm list
  VMID NAME          STATUS    MEM(MB)   BOOTDISK(GB) PID
  100  appserver     stopped   2048             32.00 0

 

Step 8: Resize disk

Before resizing the disk of a virtual machine, you have to find the disk name of that VM by using qm config command. As you can see from below output, disk name of vmid 100 is scsi0.

root@pve:~# qm config 100
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: local:iso/ubuntu-20.04.2-desktop-amd64.iso,media=cdrom,size=2809792K
kvm: 0
memory: 2048
meta: creation-qemu=8.0.2,ctime=1694982909
name: appserver
net0: virtio=96:42:35:6B:C9:C1,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,iothread=1,size=34359738369
scsihw: virtio-scsi-single
smbios1: uuid=b9cafe1b-2b1b-4de1-8948-23d768f1a8e9
sockets: 1
vmgenid: 5879c76b-8b5a-4c74-94c1-85df52f22c52

Now to increase the disk size of scsi0 disk by 1GB, run qm disk resize 100 scsi0 +1G command. The syntax of resizing disk is qm disk resize [vmid] [disk] [size].

root@pve:~# qm disk resize 100 scsi0 +1G
  Size of logical volume pve/vm-100-disk-0 changed from 32.00 GiB (8192 extents) to 33.00 GiB (8448 extents).
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume pve/vm-100-disk-0 successfully resized.
  WARNING: Sum of all thin volume sizes (33.00 GiB) exceeds the size of thin pool pve/data and the amount of free space in volume group (<9.88 GiB).

You will notice that the size of disk has now increased from 32G to 33G. This confirms resizing went successful.

root@pve:~# qm list
    VMID NAME          STATUS   MEM(MB)   BOOTDISK(GB) PID
    100  appserver     stopped  2048             33.00 0

 

Step 9: Enable NAT Mode

You should always make sure to separate out the management network from vm network for security and other purposes. But this would require you to have two different networks. For example, here we are running management network on interface enp0s3 having ip address 192.168.0.102/24 and we are looking to run all the virtual machines on another network. For that, you need to create a new linux bridge with another network interface enp0s8.

NOTE:

Please note that we have added an extra network interface enp0s8 to this server to demonstrate the separation of management network from the vm network.

To create a linux bridge, go to node pve and in Network section, click on down arrow to visualize all the drop down. Click on Linux bridge to create the bridge.

Provide IPv4/CIDR address and bridge ports as enp0s8 to create a new linux bridge. Then click on Create.

It will then ask you to apply the pending changes post linux bridge creation by clicking on Apply Configuration.

It will ask you to confirm apply pending changes. Click on Yes to apply.

The changes will be applied and now a new bridge vmbr1 is available to be used next time during VM creation.

Ubuntu Server Admin

Recent Posts

How we used Flask and 12-factor charms to simplify Canonical.com development

Our latest Canonical website rebrand did not just bring the new Vanilla-based frontend, it also…

5 hours ago

Web Engineering: Hack Week 2024

At Canonical, the work of our teams is strongly embedded in the open source principles…

1 day ago

Ubuntu Weekly Newsletter Issue 873

Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…

3 days ago

How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…

3 days ago

Remembering and thanking Steve Langasek

The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…

3 days ago

How to Change Your Prompt in Bash Shell in Ubuntu

I don’t like my prompt, i want to change it. it has my username and…

3 days ago