We already have seen how to create Proxmox containers from Proxmox VE web user interface. In this tutorial, we will give you a brief introduction to Virtual machines and why VMs are better than Containers and how to create Proxmox virtual machines from Proxmox VE Web UI.
Table of Contents
What Is A Virtual machine?
A Virtual machine is software program that emulates the functionality of a physical hardware or computing system. A VM runs on a top of emulating application known as Hypervisor.
The hypervisor replicates the functionalities of the underlying physical hardware resources of the host system. The VM that runs on a hypervisor is also referred as guest machine.
Unlike the Container, a Virtual machine runs a complete operating system including the kernel. So it requires more resources such as CPU, Memory and Storage. In contrast to VM, a Container runs the user mode portion of an operating system.
The runtime costs for containers is usually very low compared to VMs. However, Containers have a few drawbacks as listed below.
- Containers offer weaker isolation than virtual machines.
- Since the Containers use the same underlying kernel, it can able to directly access the host system's resources.
- Only Linux distributions can be run in Proxmox Containers. It is not possible to run other operating systems such as Mac OS, FreeBSD or Microsoft Windows inside a container.
If you want to run your applications and services on a completely isolated environment, Virtual machine is the way to go.
If you haven't installed Proxmox VE yet, refer the following guides.
Create Proxmox Virtual Machines
Proxmox VE uses Qemu (Quick Emulator) as the underlying technology to create and manage Virtual machines. For the purpose of this guide, we will create and manage a Virtual machine running with Debian 11 Bullseye.
We can create Proxmox virtual machines from command line (CLI) using qm
command or from Proxmox Web UI (GUI). In this tutorial, we will see the graphical way.
Step 1 - Download And Add ISO to Proxmox Storage
Open the web browser and navigate to https://Proxmox-IP-Address:8006/ URL. You will be pleased with Proxmox VE Web UI screen. Enter the username (root
) and its password to login.
Click the arrow button beside the Proxmox node to expand it. Here, 'pvedebian' is my the name of my Proxmox system.
Next, Click on "local (pvedebian)' option and then click 'ISO Images' on the right pane.
In this section, you can upload an ISO file from your local disk or download a ISO from an URL or remove the already added ISO file. I haven't uploaded any ISOs yet, so I click Upload button and choose the Debian 11 ISO from my local disk.
Close the Output dialog box after the file is uploaded. You will now see the list of available ISO image files under the 'ISO Images' section.
We have added the ISO file to Proxmox default storage location. The ISO files will be uploaded to /var/lib/vz/template/iso/
directory.
$ ls /var/lib/vz/template/iso/ debian-11.2.0-amd64-DVD-1.iso
Step 2 - Create Proxmox Virtual Machine
Right click on the Proxmox node and click 'Create VM' button.
Enter a name for the new Virtual machine and click Next.
Choose the ISO file from the 'ISO Image' drop-down box and click Next.
Choose the system hardware details such as graphic card, bios and SCSI controller etc. If you don't know what to select, just leave the defaults and click next.
Enter the disk size for your VM and click Next.
Enter the no of CPU sockets, cores, CPU type and click Next.
Enter the Memory size for the VM and click Next.
Choose network bridge and other network settings like VLAN tag, enable/disable firewall, device model etc., and click Next.
Review the the settings/options that you've chosen for the VM. If you're OK with it, click Finish button to create the Proxmox virtual machine.
Once the VM is created, you will see it under your Proxmox node dashboard.
Click on the newly created VM to view the summary of it. In the Summary section, you can view the Container's uptime, cpu usage, memory usage, network traffic, and disk I/O etc.
You can also configure or change the various parameters (E.g. Access Console, Network, DNS, Firewall, Snapshot, Backup etc.) from the center pane.
Step 3 - Access And Install Virtual Machine
Click on the name of the virtual machine that you just created and click 'Start' button on the top right corner.
Next click the 'Console' button to view the newly created Debian 11 VM console.
You will now see the Vm console screen.
Just continue the Debian 11 installation task as the way you do in a local machine.
During installation process, you will be prompted to configure network details. You can configure the network settings now or after the installation.
I chose to configure network manually.
Enter the IP address to your virtual machine.
Enter the gateway for your virtual machine. The gateway is required if you want to let the Container to talk to other Containers in the network. Also, keep in mind that the gateway is the IP address of your network bridge's (vmbr0).
Enter the DNS server address to allow the virtual machine to connect to Internet.
Continue the installation process and complete it.
Log in to your VM.
Here is Debian 11 Bullseye virtual machine running on Proxmox VE.
Step 4 - Shutdown/Reboot Virtual Machine
You can directly shutdown or restart the Virtual machine from within itself or use the respective action buttons on the top of the Proxmox web UI.
Step 5 - Clone Virtual Machine
Power off the virtual machine and click 'More' button on the top action bar and choose 'Clone' from the drop down button.
Enter the name to the clone, choose the target storage location. Leave as is if you want to save it in the default location. Click Clone button to start cloning.
Step 6 - Delete Virtual Machine
Make sure the Virtual machine is powered off. Click on the 'More' drop-down button and choose 'Remove' option to delete the VM.
Conclusion
In this detailed guide, we learned what is a Virtual machine and its advantages over Containers. Then we discussed how to create Proxmox virtual machine from Proxmox web UI and how to do basic virtual machine management actions such as starting, stopping VMs, cloning a VM and destroy the VM if it's no longer needed.