Bookmarks

Virtualisation (KVM, Proxmox)

Virtualisation on Linux: running virtual machines with KVM, QEMU and Proxmox VE. The reference covers VMs, LXC, storage, bridges, backups, clusters and libvirt.

checked 7 Nov · next check 14 Nov · 66 min read

Sections
13
Reading
66 min
Current version
9.2
Written from
pve.proxmox.com/pve-docs

Check status of the reference

Verified 7 Nov · next check 14 Nov

The sections were compared with the release notes, the check found nothing, and all source links respond.

  1. Verified
  2. Scheduled check

What KVM virtualisation is and how it works

Virtualisation on Linux is built on KVM, a kernel module that turns the kernel into a hypervisor. QEMU processes run on top of it, one per virtual machine. The machines are managed by libvirt or by the Proxmox VE platform, which adds a web interface, clustering and backups.

Layers: from hardware to guest

KVM needs a processor with hardware virtualisation: Intel VT-x or AMD-V on x86. Without hardware support the module does not work. With KVM loaded, the Linux kernel gives each QEMU process a share of the processor and memory so that the guest OS believes it is running on separate hardware.

The management layer is Proxmox VE or libvirt; each VM has its own QEMU process and guest OS, while LXC containers share the host kernel.

QEMU is a computer emulator: a QEMU process presents the guest with a motherboard, disks and network cards. KVM accelerates only the processor and memory; QEMU emulates the other devices itself. libvirt is a common API and toolset for managing virtualisation; virsh and virt-manager work through it.

Proxmox VE is a platform built on Debian with its own management layer: a web interface, a REST API and the qm and pct commands. It also adds a cluster of several nodes, live migration and backups without separate tools. It runs LXC containers on the same kernel: a container has no kernel of its own, and its processes run on the host kernel.

Virtual machine and LXC container

Both isolate a workload, but in different ways: a machine carries its own kernel and a full OS, while a container shares the host kernel with other containers.

FeatureVirtual machineLXC container
Kernelits own for each machinethe host kernel, shared
What is insidea full OS: kernel, drivers, programsapplication processes and files
IsolationKVM hardware virtualisationhost kernel namespaces
Overheadhigher: the kernel and OS take memorylow
OS insideLinux, Windows, BSDLinux only
Backupthe whole disk, including the guest OSthe file system, without a kernel

Choose a machine when you need a different OS, a kernel of your own or full isolation: a Windows server, a separate kernel for a firewall, a RouterOS CHR router. Choose a container when the guest is Linux and saving resources matters: databases, web applications, services. The two are often combined: machines for foreign operating systems and strict isolation, containers for services on the same host.

Which to choose

Choose Proxmox VE when you have several servers and need to manage them as a fleet: a cluster, live migration, backups and a web interface. It also suits a single node: all administration is done in the browser, and you can add the cluster later.

Choose libvirt without Proxmox VE when you have a single host and need automation: virsh in scripts, an API for your own code. There is no web panel; libvirt can also manage a remote host over secure protocols.

bashon the host
# check the processor for hardware virtualisationlscpu | grep -E 'VT-x|AMD-V' # list the machines on a libvirt hostvirsh list --all

VirtIO and the guest agent

The guest recognises paravirtualised VirtIO devices and works with them in cooperation with the hypervisor: disk and network are noticeably faster than with emulated devices. The guest agent (QEMU Guest Agent) inside the guest passes OS details and IP addresses to the host, freezes the file system before a snapshot or backup, and shuts the machine down cleanly.

What to know beforehand

  • The Linux command line: files, permissions, processes (see the Linux reference).
  • Networking: addressing, bridges and VLANs (see the Linux reference, “Networking” section).
  • Disks and file systems: LVM, ZFS (see the Linux reference).

Section sources

the section is written from these pages

Cheat sheet: qm, pct, virsh

Everyday commands for Proxmox VE virtual machines, containers and storage, plus virsh commands for libvirt without Proxmox. The examples use the IDs 101 and 200 and the names web and pve2: substitute your own. Each topic is covered in detail in its own section of the reference.

Virtual machines: qm

Run these commands on any cluster node; they also work on a standalone node without a cluster.

TaskCommand
List the machines on the nodeqm list
Status of one machineqm status 101
Startqm start 101
Shut down through the guest OSqm shutdown 101
Cut the powerqm stop 101
Reboot and apply changesqm reboot 101
Hard reset without shutting downqm reset 101
Suspend and resumeqm suspend 101 and qm resume 101
Show the configurationqm config 101
Set memory to 4096 MBqm set 101 --memory 4096
Snapshotqm snapshot 101 pre-update
Roll back to a snapshotqm rollback 101 pre-update
List snapshotsqm listsnapshot 101
Delete a snapshotqm delsnapshot 101 pre-update
Clone a machineqm clone 101 102 --name web2
Migrate to node pve2qm migrate 101 pve2
Show the machine’s start command for debuggingqm showcmd 101
Grow disk scsi0 to 64 GBqm disk resize 101 scsi0 64G

LXC containers: pct

TaskCommand
List containerspct list
Statuspct status 200
Startpct start 200
Shut down cleanlypct shutdown 200
Stop immediatelypct stop 200
Shell inside the containerpct enter 200
Run one command insidepct exec 200 -- apt update
Configurationpct config 200
Set the memory limit to 1024 MBpct set 200 --memory 1024
Copy a file from the container to the hostpct pull 200 /etc/hosts hosts
Copy a file from the host to the containerpct push 200 hosts /etc/hosts
Snapshot and rollbackpct snapshot 200 pre and pct rollback 200 pre
List and delete snapshotspct listsnapshot 200 and pct delsnapshot 200 pre
Clone a containerpct clone 200 201 --hostname web2
Migrate to node pve2pct migrate 200 pve2
Free unused space in the file systempct fstrim 200

Storage: pvesm

TaskCommand
All storages and their capacitypvesm status
What is in a storagepvesm list local-lvm
File system path of a volumepvesm path local:100/vm-100-disk10.raw
Delete a volumepvesm free local:100/vm-100-disk10.raw
Extract a machine’s configuration from a backup archivepvesm extractconfig local:230/example-image.raw

Backups: vzdump

TaskCommand
Back up a machine in snapshot modevzdump 101 --mode snapshot --storage backup
Back up a containervzdump 200 --storage backup --compress zstd
Back up several machinesvzdump 101 102 --storage backup
Back up all machines on the nodevzdump --all --storage backup
Keep the last three backupsvzdump 101 --storage backup --prune-backups keep-last=3
Restore a machine from a backupqmrestore /mnt/backup/vzdump-qemu-888.vma 601
Restore a container from a backuppct restore 600 /mnt/backup/vzdump-lxc-777.tar

Cluster: pvecm

TaskCommand
Cluster and quorum statuspvecm status
List nodespvecm nodes
Create a cluster on the first nodepvecm create lab
Join a node to the clusterpvecm add pve1
Remove a node from the clusterpvecm delnode pve3
Set the expected votes on a node without quorumpvecm expected 1

libvirt: virsh

Without Proxmox, management goes through virsh. libvirt calls a machine a domain, addressed by name or UUID. The system connection is qemu:///system; for your own machines without root, use qemu:///session.

TaskCommand
List all domainsvirsh list --all
Domain detailsvirsh dominfo web
Exact statevirsh domstate web
Startvirsh start web
Shut down cleanlyvirsh shutdown web
Cut the powervirsh destroy web
Rebootvirsh reboot web
Suspend and resumevirsh suspend web and virsh resume web
Save the state and stopvirsh managedsave web
Dump the configuration XMLvirsh dumpxml web
Open the XML in an editorvirsh edit web
Apply a modified XMLvirsh define web.xml
Serial consolevirsh console web
Start automatically when the host bootsvirsh autostart web
Disks and interfacesvirsh domblklist web and virsh domiflist web
Interface addressesvirsh domifaddr web
Snapshotvirsh snapshot-create-as web pre-update
List snapshots and roll backvirsh snapshot-list web and virsh snapshot-revert web pre-update
Delete a snapshotvirsh snapshot-delete web pre-update
Networks and storage poolsvirsh net-list --all and virsh pool-list --all
Volumes in a poolvirsh vol-list default --details

Deletion

TaskCommand
Delete a machine and its disksqm destroy 101 --purge
Delete a container and its diskspct destroy 200 --purge
Delete a libvirt domain’s configurationvirsh undefine web

Section sources

the section is written from these pages

Installation and first start

You can install KVM in one of two ways: as the complete Proxmox VE distribution from its installation ISO, or as QEMU and libvirt packages on top of ordinary Linux. First check that the processor supports hardware virtualisation and that it is enabled in the BIOS. Finish the installation with a check: pveversion on a Proxmox VE node, or virsh version on a host without it.

Checking the processor

Full virtualisation works on processors with Intel VT-x or AMD-V. Look for the support flag, vmx on Intel or svm on AMD, in /proc/cpuinfo. If there is no flag, enable virtualisation in the BIOS or UEFI: on many machines it is switched off even though the processor supports it.

bashon the host
# vmx on Intel, svm on AMDgrep -E '(vmx|svm)' /proc/cpuinfo

On Ubuntu and Debian there is a shorter check: kvm-ok from the cpu-checker package. It looks at the same flags in /proc/cpuinfo and at whether the /dev/kvm device exists, and when run as root it also checks whether virtualisation is disabled in the BIOS.

bashon the host, Ubuntu and Debian
sudo apt install cpu-checkerkvm-ok

Proxmox VE from the ISO

Proxmox VE is a distribution based on Debian GNU/Linux. It includes the KVM hypervisor, LXC containers and a web interface for managing virtual machines. Download the image from proxmox.com. It is a hybrid ISO: you can burn it to a disc or write it to a USB stick, and the USB stick is the recommended way, since installing from it is faster.

bashon the host, Linux
# find the stick’s name in the lsblk output before and after plugging it inlsblksudo dd bs=1M conv=fdatasync \  if=./proxmox-ve_*.iso of=/dev/XYZ

Boot from the stick and select Install Proxmox VE (Graphical); if the graphical installer does not work, choose Terminal UI. The installer asks for the target disks and the file system: the default is ext4 on top of LVM, or you can choose ZFS with software RAID, but not on top of a hardware RAID controller. Next come the time zone, a root password of at least 8 characters and an email address for notifications. Last is the network: the interface and an IPv4 or IPv6 address; you add the second stack after the installation.

After the reboot, the web interface opens on port 8006, for example https://192.0.2.10:8006. Log in as root with the password you set during installation.

Updates come from repositories: you need both the Debian repositories and the Proxmox VE repository. Once a day Proxmox VE checks for updates itself and reports them by email to root.

RepositorySubscriptionPurpose
pve-enterprisekey requiredproduction; enabled by default
pve-no-subscriptionnot requiredtesting and non-production servers
inithe proxmox.sources file
Types: debURIs: http://download.proxmox.com/debian/pveSuites: trixieComponents: pve-no-subscriptionSigned-By: /usr/share/keyrings/proxmox-archive-keyring.gpg

You can also install Proxmox VE on top of a ready-made Debian 13: add the Proxmox VE repositories and run apt install proxmox-ve. This path is for experienced users, as you set up the disk layout and networking by hand.

KVM and libvirt on Ubuntu

On ordinary Linux you assemble the hypervisor from packages. qemu-kvm is a metapackage that pulls in QEMU with x86 emulation (qemu-system-x86), libvirt-daemon-system installs the libvirt daemon and drivers, and the virtinst package brings the console utility virt-install for creating VMs, which installs a guest OS into the new machine right away.

bashon the host, Ubuntu
sudo apt updatesudo apt install qemu-kvm libvirt-daemon-system virtinst

Users in the libvirt group can manage virtual machines: add yourself and log in again. Members of the sudo group are added to it automatically.

bashon the host, Ubuntu
sudo adduser $USER libvirt

virt-host-validate, part of libvirt, checks that the host is ready: the qemu argument limits the checks to the QEMU/KVM driver, and without arguments it checks all known drivers.

bashon the host
virt-host-validate qemu

Verifying the installation

On a Proxmox VE node, pveversion prints the version of the installed packages; the -v option adds the full package list. On a libvirt host, virsh version does the same: it shows the version of the library and of the running hypervisor.

bashon a Proxmox VE node
pveversionpveversion -v
bashon a host with libvirt
virsh version
textexample output
Compiled against library: libvirt 1.2.3Using library: libvirt 1.2.3Using API: QEMU 1.2.3Running hypervisor: QEMU 2.0.50

The node is ready. To create virtual machines, see the “Virtual machines: creating and configuring” section; for containers, see the “LXC containers” section.

Section sources

the section is written from these pages

Virtual machines: creating and configuring

In Proxmox VE you create a virtual machine with the qm create command or the Create VM wizard: you choose an ISO image, the guest OS type, the firmware and the processor model, and add a disk and a network card. For speed, almost everything is attached as paravirtualised virtio devices.

A VM runs on QEMU and KVM; how that works is explained in “What KVM virtualisation is and how it works”, and the commands for VMs and containers are collected in “Cheat sheet”. This section covers the settings that you should choose deliberately.

System: machine type, firmware, guest agent

The machine type defines the layout of the virtual motherboard: the default is Intel 440FX, while q35 adds a PCIe bus and is needed for PCIe passthrough. The type is versioned: Linux guests use the newest QEMU version, while Windows pins the version at creation, as it is sensitive to hardware changes.

The default firmware is SeaBIOS, the classic BIOS. OVMF, a UEFI implementation, is required for operating systems such as Windows 11 and for PCI(e) passthrough. On arm64 hosts the firmware is always OVMF, because SeaBIOS exists only for x86.

bashon the host
qm set 100 --machine q35 --bios ovmf

The QEMU Agent checkbox enables the guest agent, the qemu-guest-agent service, a channel between the host and the guest system. Through it the panel shows the VM’s IP addresses, and the guest’s file systems are synchronised during snapshots and shutdown. On Linux you install the agent as a package; on Windows, from the VirtIO drivers.

Processor and memory

The number of virtual processors is the product of sockets and cores (--cores, --sockets); the default is one of each. If you do not know the workload, start with two cores. Each vCPU corresponds to a QEMU thread on the host. You may exceed the host’s physical core count, since the scheduler distributes the threads like those of any multithreaded application, but performance drops because context switches increase.

The processor type determines the guest’s instruction set. The host type passes all the host processor’s flags to the guest and gives the best performance, but a live migration to a host with a different processor or microcode will stop QEMU, because the guest lacks flags. That is why new VMs default to the virtual type x86-64-v2-AES, and host is kept for homogeneous clusters.

Memory is set either to a fixed size or to a range from a minimum to a maximum. In the second case Proxmox VE gives the guest free host memory and takes it back when the host runs short, through the balloon driver in the guest system. Ballooning is enabled even with fixed memory: it reports statistics to the host.

Disks and network

A disk is attached to a controller. For new Linux VMs the default is VirtIO SCSI single: each disk has its own controller, and I/O runs in a separate QEMU thread (iothread=1). Windows needs the VirtIO drivers from a separate ISO.

SettingWhat it doesWhen to enable
iothread=1disk I/O in a separate QEMU threada busy disk on VirtIO SCSI
discard=onthe guest sends TRIM commands, and the image shrinksthin-provisioned storage
ssd=1the disk appears to the guest as an SSD rather than a spinning HDDtogether with discard, if the guest requires it
cache=nonea write is acknowledged without the host page cachethe default; leave it

discard=on makes sense on thin-provisioned storage: files deleted in the guest system then free space in the image. The default cache mode is No cache: a write is acknowledged when it reaches the physical storage’s write queue, which balances reliability and speed. The network should be paravirtualised too: a VirtIO card gives up to three times the throughput of an emulated Intel E1000, and a VirtIO disk gives twice the sequential write speed of an emulated IDE disk.

bashon the host
qm set 100 \  --scsihw virtio-scsi-pci \  --scsi0 local-lvm:32,iothread=1,discard=on,ssd=1 \  --net0 virtio,bridge=vmbr0

Worked example: creating a VM from an ISO

qm create declares a VM with an ID (VMID) and settings, and qm set attaches a CD-ROM drive with an ISO image and a disk and sets the boot order. --net0 describes the network: the card model and the bridge. For bridges, see the “Networking: bridges and VLANs” section.

bashon the host
qm create 100 --name web1 \  --ostype l26 \  --machine q35 --bios seabios \  --cores 2 --memory 2048 --cpu host \  --net0 virtio,bridge=vmbr0 \  --scsihw virtio-scsi-pciqm set 100 --ide2 local:iso/debian-13.iso,media=cdromqm set 100 --scsi0 local-lvm:32,iothread=1,discard=onqm set 100 --boot order=ide2\;scsi0qm start 100qm set 100 --ide2 none,media=cdrom

--ostype l26 is the guest OS type, Linux 2.6 to 7.x kernels: it enables small optimisations for specific systems. Windows needs its own value (for example, win11 for Windows 11 and Server 2022/2025). After the OS is installed, the CD-ROM drive is usually detached.

Template, clones and cloud-init

To deploy many VMs of the same kind, use a template: qm template converts an ordinary VM. A template is read-only and cannot be started, but you create clones from it. A full clone is an independent copy of the disk: all the data is copied, which is slow.

A linked clone is created almost instantly and takes no space at first: it reads unchanged blocks from the original and writes changes to a new image (copy-on-write). For this the original must be a template on storage that supports clones. While linked clones exist, you cannot delete the template.

You do not need to configure each copy by hand: on first boot, cloud-init applies the network, name, password and SSH keys set on the hypervisor. Proxmox VE passes them through an ISO, so a VM with cloud-init needs a CD-ROM drive ide2 local-lvm:cloudinit; the guest system needs the cloud-init package or a ready-made cloud image. The password is stored encrypted on the hypervisor, so logging in with SSH keys is safer.

bashon the host
qm set 100 --ide2 local-lvm:cloudinit \  --serial0 socket --vga serial0 \  --boot order=scsi0qm set 100 --sshkeys ~/.ssh/id_ed25519.pub \  --ipconfig0 ip=10.0.10.123/24,gw=10.0.10.1qm template 100qm clone 100 101 --name web1-template1

In more detail

The host tries to keep its load at 80% of RAM; above that, ballooning takes memory from the guest systems. The target percentage is set in the node options. With automatic allocation, the Shares factor divides free RAM among VMs: a database gets 3000 against the default 1000. The cpulimit cap limits a VM’s total processor time: 2.5 means 250% of one core.

Moving a running VM to another node without stopping it is live migration; it uses the pinned machine version and requires compatible node processors. For details, see the “Cluster and high availability” section.

Section sources

the section is written from these pages

LXC containers

An LXC container is a lightweight alternative to a virtual machine: it runs on the host kernel with no guest OS of its own, so it uses memory and disk like an ordinary set of processes. In Proxmox VE you create one with pct create from a ready-made OS template, usually as an unprivileged container.

The technology underneath is Linux Containers (LXC), and pct is the Proxmox VE command-line interface to it. Containers join the cluster, storage and network on equal terms with virtual machines; the everyday commands for them are collected in the “Cheat sheet” section. This section covers when to choose a container over a virtual machine and how to create one.

Creating a container: template and pct create

A system template is an archive with the root file system of a Linux distribution (a system container template). The template list is refreshed daily; download the one you want to the local storage and create a container from it:

bashon the host
pveam updatepveam available --section systempveam download local debian-13-standard_13.6-1_amd64.tar.zstpct create 200 \  local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst \  --hostname web1 \  --cores 2 --memory 2048 --swap 512 \  --net0 name=eth0,bridge=vmbr0,ip=dhcp \  --rootfs local-lvm:20 \  --unprivileged 1 \  --ssh-public-keys ~/.ssh/id_ed25519.pub \  --onboot 1

The 20 GiB disk is placed on the local-lvm storage; for more on storage, see the “Storage and VM disks” section. Set the root password with the --password option or interactively; a key is enough for SSH login. That’s it: run pct start 200, then get inside with pct enter 200.

Unprivileged by default

An unprivileged container uses user namespaces: the superuser with UID 0 inside maps to an unprivileged user on the host. An attacker who escapes from such a container gets the rights of an arbitrary host user, not real root, which is why it is the default at creation.

A privileged container leaves root inside the container as root on the host: isolation is held only by AppArmor, seccomp and namespaces. The LXC developers consider such a container unsafe by definition and do not promise urgent fixes for an escape. Use one only in a trusted environment, when there is no way around it.

Resources and mount points

Container limits are set through cgroup v2 control groups: by default a container sees all cores and gets 512 MB of memory and the same amount of swap. Set explicit limits:

bashon the host
pct set 200 \  --cores 2 \  --cpulimit 0.5 \  --cpuunits 100 \  --memory 1024 \  --swap 512
OptionWhat it setsDefault
coresnumber of CPU cores visibleall available
cpulimitCPU time ceiling; 0.5 is half a core0 — no ceiling
cpuunitsweight when CPU is shared between containers100
memoryRAM limit, MB512
swapadditional swap, MB512

The root file system is the rootfs mount point; besides it, you can add up to 256 more mount points, mp0–mp255. A mount point is one of three types: a volume from Proxmox VE storage, a bind mount (a host directory) and a direct block device. By default only the root file system is included in a backup; include mp0 with the backup=1 option.

bashon the host
mkdir -p /mnt/bindmounts/sharedpct set 200 \  --mp0 /mnt/bindmounts/shared,mp=/shared

Container limitations

A container has no kernel of its own: all processes run on the host kernel, and some system calls are blocked. Only Linux runs inside; FreeBSD or Windows go in a virtual machine (see the “Virtual machines: creating and configuring” section). The template’s systemd must be version 220 or newer; Proxmox VE 9 manages resources only through cgroup v2.

Docker runs inside a container, but it is nesting that you must enable explicitly: the nesting flag exposes the host’s procfs and sysfs to the container (systemd itself needs this to isolate services), and an unprivileged container additionally needs keyctl=1.

Instead of a system template you can use an OCI image from a registry: in the storage’s template view, use the Pull from OCI registry button, then run an ordinary pct create. The image is converted to the LXC stack; support for application containers is still a technology preview.

Section sources

the section is written from these pages

Storage and VM disks

A storage in Proxmox VE is a named source of space: virtual machine disks, container data, ISO images and backups. After installation, VM disks live on local LVM-thin or ZFS; live migration without copying needs shared storage, such as NFS or Ceph.

The storage type (dir, lvmthin, zfspool, nfs, rbd and others) determines where and how data is kept: file-level types can hold any content, block-level types only disk images. The content property sets what may be placed on a storage:

  • images — virtual machine disks
  • rootdir — LXC container data
  • iso — installation images
  • vztmpl — container templates
  • backup — vzdump backups
  • snippets — snippet files, for example hook scripts

All configuration lives in one file, /etc/pve/storage.cfg, which is distributed automatically to every cluster node: a storage you add is visible everywhere at once. A volume is addressed by the storage name and a name within it: local:230/vm-230-disk-0.raw belongs to VM 230, and deleting the VM deletes its volumes with it.

ini/etc/pve/storage.cfg
dir: local        path /var/lib/vz        content iso,vztmpl,backup # default disk storagelvmthin: local-lvm        thinpool data        vgname pve        content rootdir,images

Choosing a storage

Local storages exist on every node, but VM disks on them are available only to that node. Shared ones (NFS, CIFS and Ceph RBD) are visible to all cluster nodes, and on them live migration of a running VM happens without copying the disk.

Local storages are separate on each node; shared ones are visible to the whole cluster.

For a single node, choose LVM-thin, a simple local block-level type with thin provisioning, or ZFS if you need snapshots, compression and integrity checking: ZFS is the strongest at snapshots and clones. NFS and CIFS suit ISO images and backups: the storage mounts the network directory itself, with no /etc/fstab editing. Ceph RBD makes sense from three nodes up, pooling the nodes’ own disks into distributed storage. In the table, “Shared” shows whether all nodes can see the storage.

TypeLevelSharedSnapshotsThin provisioning
Directory (dir)filenoyes, with qcow2with qcow2
LVM (lvm)blocknoyes, as a volume chain (preview)no
LVM-thin (lvmthin)blocknoyesyes
ZFS (zfspool)file and blocknoyesyes
NFS (nfs)fileyesyes, with qcow2with qcow2
CIFS (cifs)fileyesyes, with qcow2with qcow2
Ceph RBD (rbd)blockyesyesyes

The types with snapshots, except LVM, also support thin provisioning: only the blocks the guest has actually used are written, so a 32 GiB disk may take 3 GiB on the host. That is why the total size of VM disks can exceed the physical capacity of the storage.

Image formats: raw and qcow2

On block-level storage (LVM-thin, ZFS, Ceph RBD) a VM disk is always raw: the plain bytes of the block device with no wrapper (in ZFS it is a zvol volume). On file-level storage you choose the format: raw is possible too, while qcow2 adds thin provisioning, internal snapshots and compression. The default format is set by the storage’s format property (raw, qcow2 or vmdk).

You can’t judge an image’s size by eye: qemu-img info shows the virtual size the guest sees and the space actually used on the host.

bashon the host
qemu-img info vm-100-disk-0.qcow2
textexample output
image: vm-100-disk-0.qcow2file format: qcow2virtual size: 32 GiB (34359738368 bytes)disk size: 3.1 GiB

qemu-img convert changes the format and drops empty sectors along the way, so the image takes less space afterwards. The -c flag compresses the result, but only in the qcow and qcow2 formats.

bashon the host
qemu-img convert -p -O raw vm-100-disk-0.qcow2 disk.raw

Adding a storage

Add a storage in the web interface or with the pvesm command, which writes to the same /etc/pve/storage.cfg. Each storage has a short name; pvesm status shows availability and usage, and pvesm list shows volumes. pvesm remove deletes the entry but does not touch the data itself.

bashon the host
# a directory for images and templatespvesm add dir local-iso --path /srv/iso --content iso# a shared network directory for backupspvesm add nfs backup --path /mnt/pve/backup \  --server 198.51.100.10 \  --export /srv/nfs \  --content backuppvesm status

Ceph in brief

Ceph pools the cluster nodes’ own disks into fault-tolerant storage with no separate SAN; such a setup is called hyper-converged. The services are spread across the nodes: monitors (MON), managers (MGR) and OSDs, the daemons that store data, one per physical disk. The working minimum is three nodes; at least 12 OSDs, evenly distributed, are recommended.

bashon the host
# on every nodepveceph install# Ceph configuration and network, on one nodepveceph init --network 198.51.100.0/24# a monitor on each of three nodespveceph mon create# an OSD for each data diskpveceph osd create /dev/sdb

You can also install Ceph through the wizard in the web interface: under the node tree, the Ceph section offers to install it. The wizard creates the configuration, monitors, OSDs and the first pool; VM disks are placed on a storage of type rbd. The same cluster also provides the CephFS file system, a cephfs storage type for files.

Backups and snapshots are covered in the “Backups, snapshots and restore” section, live migration and cluster requirements in “Cluster and high availability”, and VM disk settings in “Virtual machines: creating and configuring”.

Section sources

the section is written from these pages

Networking: bridges and VLANs

A virtual machine reaches the network through a bridge, a software switch on the host. By default Proxmox VE creates the vmbr0 bridge on the first network interface, and the VM ends up on the same network as the host. You can separate machines into VLANs with tags set right on the VMs’ network cards.

A bridge works like a switch: the VM cards and the host’s physical interface are plugged into its ports. The network sees each VM as a separate device with its own MAC address, even though a single cable runs to the host.

A VLAN-aware bridge: VLAN tags are set on the VMs’ network cards.

The vmbr0 bridge in /etc/network/interfaces

The host describes its whole network in /etc/network/interfaces, and it is applied through ifupdown2. The installer creates the vmbr0 bridge, attached to the first Ethernet interface, and assigns it a management address:

ini/etc/network/interfaces
auto vmbr0iface vmbr0 inet static        address 192.168.10.2/24        gateway 192.168.10.1        bridge-ports eno1        bridge-stp off        bridge-fd 0

bridge-ports lists the physical interfaces in the bridge; bridge-stp off disables spanning tree, and bridge-fd 0 removes its forwarding delay. Edits first go to /etc/network/interfaces.new, so you can review several related changes before applying them; the Apply Configuration button (Datacenter → node → System → Network) moves them to the main file and applies them on the fly.

VLANs on a bridge

A VLAN is an isolated layer 2 segment, each marked by a numeric tag. You can switch a bridge to VLAN-aware mode: the tag is set right on the VM’s network card, and the bridge sorts the tagged traffic itself:

ini/etc/network/interfaces
auto vmbr0iface vmbr0 inet manual        bridge-ports eno1        bridge-stp off        bridge-fd 0        bridge-vlan-aware yes        bridge-vids 2-4094

For a VM with tag=10, the card is attached to VLAN 10: frames leave tagged, and other tags never reach the VM. Set the tag when creating a VM or LXC container, in the VLAN tag field. Several tags on one card, a trunk, are set with the trunks=10;20 parameter; the VLAN is then configured in the guest OS. Without VLAN-aware mode, each number gets an interface pair such as eno1.5 and a vmbr0v5 bridge that lives until reboot, which is why VM tags should be set on a VLAN-aware bridge.

The host’s address can be moved to a separate VLAN: a VLAN interface with the tag number is created on the bridge while the bridge itself has no address, which takes node management out of the VMs’ network:

inimanagement address on VLAN 99
auto vmbr0.99iface vmbr0.99 inet static        address 192.168.99.2/24        gateway 192.168.99.1 auto vmbr0iface vmbr0 inet manual        bridge-ports eno1        bridge-stp off        bridge-fd 0        bridge-vlan-aware yes        bridge-vids 2-4094

Enable the VLAN interface on the device with the fewest layers between it and the physical card; for the management address, that is the vmbr0 bridge. For what a VLAN is in general, see the MikroTik reference, section “Interfaces, bridges and VLANs”.

Combining interfaces into a bond

Several interfaces can be combined into a bond (link aggregation). If the switch supports LACP, use the 802.3ad mode: it uses all interfaces and survives a cable failure. Without such support, choose active-backup: the second interface sits idle until the first fails.

inia bridge on top of a bond
auto bond0iface bond0 inet manual        bond-slaves eno1 eno2        bond-miimon 100        bond-mode 802.3ad        bond-xmit-hash-policy layer2+3 auto vmbr0iface vmbr0 inet static        address 192.168.10.2/24        gateway 192.168.10.1        bridge-ports bond0        bridge-stp off        bridge-fd 0

The balance-tlb and balance-alb modes do not work with a Linux bridge and VMs: a packet’s MAC address depends on which interface it left through. Corosync cluster networks do not need a bond, since Corosync switches between networks itself (see the “Cluster and high availability” section).

One public IP: routed and NAT

On a private network a bridge works straight away: your router hands out the VMs’ addresses. At a hosting provider, the provider may cut access when it sees several MAC addresses behind one port. The way out is to keep the VMs’ MACs from leaving the host. The first approach is routing (routed): the VMs’ address block is routed through the host’s address, and all packets leave with its MAC address. A bridge with no physical ports holds the internal network, and ip_forward and proxy ARP are enabled on the external interface:

inia routed setup at a hosting provider
auto eno1iface eno1 inet static        address 198.51.100.5/29        gateway 198.51.100.1        post-up echo 1 > /proc/sys/net/ipv4/ip_forward        post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp auto vmbr0iface vmbr0 inet static        address 203.0.113.17/28        bridge-ports none        bridge-stp off        bridge-fd 0

The address 203.0.113.17 is the first usable address of the 203.0.113.16/28 block allocated to the VMs; the network address 203.0.113.16 and the broadcast address 203.0.113.31 cannot be assigned to interfaces.

The second approach is masquerading (NAT): VMs with private addresses reach the outside under the host’s address. For port forwarding of incoming connections, see the MikroTik reference, section “NAT: masquerade and port forwarding”.

iniNAT for VMs behind a single IP
auto vmbr0iface vmbr0 inet static        address 10.10.10.1/24        bridge-ports none        bridge-stp off        bridge-fd 0        post-up echo 1 > /proc/sys/net/ipv4/ip_forward        post-up iptables -t nat -A POSTROUTING \            -s '10.10.10.0/24' -o eno1 -j MASQUERADE        post-down iptables -t nat -D POSTROUTING \            -s '10.10.10.0/24' -o eno1 -j MASQUERADE

SDN, libvirt networking and where to look

For complex networks in a cluster there is SDN: zones define the network type (VLAN, simple, QinQ, VXLAN, EVPN), and virtual networks (VNets) are created inside a zone. A configured VNet appears on the nodes as an ordinary bridge that you can assign to a VM; changes are applied all at once in the Datacenter → SDN panel.

Without Proxmox VE, libvirt manages the networks: the default network is enabled after installation and works through NAT, so guests go out through the host and get addresses by DHCP from dnsmasq. For details, see the “libvirt and virsh without Proxmox” section.

SetupWhen to choose it
Bridge on a physical interfaceHome and office network: VMs on the same network as the host
VLAN-aware bridgeSeveral networks on one cable, with tags set by Proxmox VE
802.3ad bond under a bridgeRedundancy and more bandwidth
RoutedThe hosting provider cuts the network when it sees several MACs, and you have an address block
Masquerading (NAT)One public IP, VMs with private addresses
VNet in SDNA cluster with many networks and tenants

Section sources

the section is written from these pages

Backups, snapshots and restore

A backup is an archive of a machine’s disks and configuration on a separate storage; a snapshot is a marker of state on the same disks, and if the node fails it is lost along with them. vzdump makes backups, and qmrestore and pct restore restore them.

A snapshot is handy before an upgrade or a risky configuration change: you roll the machine back to the snapshot, and delete it once all is well. It lives on the same storage as the machine’s disks and takes only the space of its difference from the original state.

A backup is always full: the archive contains the guest configuration and all disk data. Backups become incremental only on Proxmox Backup Server, where deduplication leaves only the changed blocks between backups.

How a backup runs

The mode determines how data consistency is achieved: the machine keeps running, is suspended or is shut down.

ModeHow it worksWhen to choose it
snapshotA background QEMU process copies the disks while the machine keeps running; the guest agent freezes the file system for the duration of the backupThe default: minimal downtime
suspendThe machine is suspended until the backup finishesKept for compatibility; the documentation recommends snapshot
stopThe machine is shut down cleanly, a background process copies the disks, then the machine starts againYou need maximum consistency and a short downtime is acceptable

For machines, snapshot mode does not require the storage to support snapshots: consistency comes from Proxmox VE’s live backup. For containers the modes work differently: stop shuts the container down for the whole backup, suspend makes two rsync passes over the data, and snapshot needs snapshots from the storage itself. Mount points other than the root disk are not backed up by default, and bind and device mounts are never included.

Manual backups and compression

Where the archive goes is set by a storage with the backup content type; without --storage, vzdump writes the archive to the local default directory, usually /var/lib/vz/dump/. Compress with zstd: of the three algorithms it is the fastest and multithreaded; the algorithm shows in the archive file’s extension.

bashon the node
vzdump 101 --mode snapshot \  --storage backup \  --compress zstdvzdump 200 --storage backup --compress zstdvzdump --all --storage backup --exclude 110

The archive name is built from the guest type, number and time: vzdump-qemu-101-2026_11_06-02_30_00.vma.zst for a machine, vzdump-lxc-200-2026_11_06-02_30_00.tar.zst for a container. Limit bandwidth with --bwlimit, in KiB/s, so the backup does not take disk throughput from running machines.

The retention policy is set on the storage and applied after each backup.

Scheduled jobs and retention

Regular backups are configured as jobs: Datacenter → Backup or the /cluster/backup API. Each entry lives in /etc/pve/jobs.cfg and is run by the pvescheduler daemon. A job selects nodes and guests, sets the time with a systemd-style calendar schedule, and overrides the mode, compression and retention. A job missed because a node was down is caught up if you enable repeat-missed.

How many backups to keep is decided by the prune-backups retention policy. Each condition is checked in its own way: keep-last keeps the most recent backups, while keep-hourly, keep-daily, keep-weekly, keep-monthly and keep-yearly keep the latest backup within each interval. An individual backup can be marked as protected (--protected): pruning leaves it alone, and it does not count towards the retention limits.

bashon the node
vzdump 101 --storage backup \  --prune-backups keep-last=3,keep-daily=13,keep-yearly=9

The conditions add up: the example keeps the last 3 backups, plus one for each of 13 days and each of 9 years. You don’t have to put prune-backups in every command; the property is usually set on the storage. To check what will be deleted at the next backup, use the retention simulator in the Proxmox Backup Server documentation.

Proxmox Backup Server

Proxmox Backup Server (PBS) is a separate server with a web interface that accepts backups of machines, containers and physical hosts over TLS. It splits data into chunks and stores them in a datastore: identical chunks are written once, so each subsequent backup transfers over the network and occupies on disk only the changes. Integrity is verified by a SHA-256 checksum; backups can be encrypted on the client, synced to another server and written to tape.

For containers, PBS has change detection modes: metadata compares files against the previous backup’s metadata and does not re-read unchanged ones. The documentation recommends a dedicated PBS node; a simpler substitute is an NFS storage with ordinary archive files.

Restore

A machine is restored from an archive with qmrestore, a container with pct restore; both tools take the target guest number and the storage for the disks. From a backup on PBS, individual files can be opened in the file browser without unpacking the whole archive.

bashon the node
qmrestore /mnt/backup/vzdump-qemu-101-2026_11_06-02_30_00.vma.zst \  601 --storage local-lvmpct restore 600 /mnt/backup/vzdump-lxc-200-2026_11_06-02_30_00.tar.zst \  --storage local-lvm

A restored machine gets its disks on the original storage if --storage is not given; a container without --storage goes to the local storage. Start a large machine with --live-restore (it works for backups on PBS): the guest starts at once while data is loaded in the background. Limit restore speed with the --bwlimit 10240 flag of qmrestore, which is 10 MiB/s of archive reading, or with a limit on the storage: pvesm set backup --bwlimit restore=10240.

Keep backups off the node, on a separate PBS server or at least on an NFS storage, and test restores regularly: bring up a guest from a backup under a different number, and check that the services started and the data is in place. A backup that has never been restored is just an archive.

The 3-2-1 rule (3-2-1 backup rule3-2-1 backup ruleA scheme for storing backups: three copies of the data on two different types of media, one of them off the primary site.Read more: 3-2-1 backup rule) covers all of this: three copies, two kinds of media, one off-site. For storage types, see the “Storage and VM disks” section; for nodes and live migration, “Cluster and high availability”.

Section sources

the section is written from these pages

Cluster and high availability

A Proxmox VE cluster is a group of nodes joined by the corosync service. They share the /etc/pve configuration, can migrate VMs without stopping them, and automatically restart a guest on another node after a failure. Quorum needs a majority of votes, so clusters use an odd number of nodes.

Nodes are joined so that you can manage every machine from one interface and avoid downtime: pvecm creates the cluster and adds nodes, qm migrate moves a running VM, and ha-manager watches it and starts it on another node if its node fails. The storage under the machines is made shared — see the section “Storage and VM disks”.

Quorum 2 of 3: the cluster survives the failure of one node.

Creating a cluster and adding nodes

The first node creates the cluster: corosync exchanges state between nodes, and the pmxcfs file system distributes the shared /etc/pve configuration to all of them. Each node has one vote. A node’s name and IP address can only be changed before the cluster is created.

bashon the first node
pvecm create cluster-lab --link0 10.10.10.1pvecm status

The other nodes join with pvecm add, giving the address of any existing node. On joining, a node loses its own /etc/pve configuration, so it must not hold any guests: move them with a backup and restore under different IDs.

bashon the new node, then check
pvecm add 10.10.10.1pvecm nodes

pvecm status shows the state of the cluster: the number of nodes and votes and the Quorate field. pvecm nodes lists the members. To remove a node, run pvecm delnode name following the procedure in the documentation: first shut it down and move its guests, then remove it from the configuration and clean up /etc/pve/nodes/name.

Quorum and the corosync network

Quorum is the minimum number of votes needed to change the state of the cluster. Each node gives one vote, so a majority is easiest to hold with an odd number of nodes: 3, 5 or 7. If most nodes are unreachable, the cluster becomes read-only: the configuration cannot be changed and VMs cannot be started.

Corosync needs low, stable latency rather than a wide link. Give the cluster its own network card or VLAN, separate from storage and migration traffic. A single gigabit interface is enough in most cases; nodes communicate over UDP ports 5405–5412. Corosync supports up to eight links (link0–link7) — put the backup path on a different physical network.

Live migration of virtual machines

Live migration moves a running VM between nodes without shutting it down: an empty QEMU process starts on the target node, and memory and device state are sent over the network while the guest keeps running.

bashVM 102 from this node to pve3
qm migrate 102 pve3 --online

Migration requirements: the nodes are in the same cluster, have the same CPU architecture, and the guest uses no local resources such as passed-through PCI devices. If the disks are on shared storage, only memory is transferred. Local disks can be migrated too: the --with-local-disks flag copies them to the target node during the transfer.

SituationWhat is transferredHow to enable
Disks on shared storagememory and device state only--online
Local disksthe disk is copied during migration--online --with-local-disks
Passed-through PCI or USB deviceslive migration is blockedmigrate with the VM stopped
Nodes with different architectures, x86 and arm64migration is not possible—

The VM’s CPU type affects migration between different hosts: the host type passes every instruction of the specific processor to the guest, so migration between different hardware may fail. For mixed nodes, choose a generic type such as x86-64-v2-AES. A stopped VM is migrated with the same command without --online; the disks and configuration are copied.

High availability

The HA manager ha-manager watches the resources you mark — VMs or containers — and keeps them in the requested state: it restarts a running machine after a failure and starts it on another node if its node fails. Detecting a failure and recovering from it typically takes about two minutes.

Add a resource to HA with ha-manager add; from then on HA tries to keep it running. Node affinity rules set where a resource may run: a rule without the strict flag only states a preference, while strict forbids starting on other nodes.

basha resource under HA and a placement rule
ha-manager add vm:102 --state startedha-manager rules add node-affinity db-on-pve3 \  --resources vm:102 --nodes pve3 --strictha-manager status

A failed node is fenced with a watchdog: while a node cannot see quorum, it cannot refresh its hardware or software watchdog timer, and after 60 seconds the timer reboots the machine. This guarantees that the old node is not writing to shared storage before HA starts its machines on other nodes.

Learn more

The HA simulator included with Proxmox VE helps you test fault tolerance without hardware. HA groups have been deprecated since version 9.0 — node affinity rules replaced them. Load balancing, the cluster resource scheduler (Datacenter → Options → Cluster Resource Scheduling), moves only HA resources in 9.2 and does not yet rebalance ordinary guests. The Ceph storage for a cluster is covered in the section “Storage and VM disks”; the cluster network is covered in the section “Networking: bridges and VLANs”.

Section sources

the section is written from these pages

libvirt and virsh without Proxmox

libvirt is a virtualisation management service. It keeps the configuration of domains, networks and storage pools, and virsh is its command-line client. On plain Linux without Proxmox VE, you create a machine through libvirt with a single virt-install command, start it with virsh start and edit its settings in XML.

libvirt takes commands through a connection URI and stores state in XML descriptions: a machine is a domain, a network is a NAT or bridged network, and a disk is a file or a volume in a pool. Installing the packages and checking the host are covered in the section “Installation and first start”.

URIWhat it opens
qemu:///systemthe system daemon: all domains on the host; needs root or the libvirt group
qemu:///sessionyour own user’s daemon: only your domains, no root needed
qemu+ssh://host/systemthe same system daemon on another host over SSH

Without options, virsh takes the URI from the LIBVIRT_DEFAULT_URI variable, and without that it probes for a running daemon: for root this is usually the system qemu:///system, and for an ordinary user their own qemu:///session. Domains of the system daemon are shared by the whole host, and only it supports autostart at boot. A session is for your own machines without root rights, but it has no access to system networks and pools. The graphical client virt-manager shows the same libvirt in a window.

Creating a VM from a cloud image

A cloud image is a ready-made disk with an operating system already installed, which configures itself on first boot. virt-install describes the machine with flags and starts it immediately; a root password is generated and printed to the console, and cloud-init is disabled after the first boot.

bashon the host
wget https://cloud.debian.org/images/cloud/trixie/latest/\  debian-13-genericcloud-amd64.qcow2sudo virt-install \  --connect qemu:///system \  --name web \  --memory 2048 \  --vcpus 2 \  --disk path=debian-13-genericcloud-amd64.qcow2,format=qcow2 \  --network network=default,model=virtio \  --osinfo debian13 \  --import \  --cloud-init \  --noautoconsole

virt-install --osinfo list prints the available --osinfo values; without one of them, virt-install exits with an error. The --import flag means “the disk already contains a system, skip installation”, and --cloud-init attaches a configuration disk for the first boot and prints the password.

bashon the host
virsh list --allvirsh console web

Leave the console with Ctrl+]. If the guest shows neither the boot messages nor a login prompt in virsh console, point its kernel at the serial port with the console=ttyS0 parameter.

Domain lifecycle

libvirt describes a domain in XML: a persistent domain exists until you remove it with undefine, while a transient one disappears when it stops. virsh list --all shows the states: running, paused, shut off.

bashon the host
virsh start webvirsh shutdown webvirsh autostart webvirsh dumpxml web > web.xmlvirsh edit webvirsh undefine web

shutdown asks the guest operating system to power off — this takes time and does not always work — whereas destroy cuts the power immediately, like pulling the cable. undefine removes the XML description of a stopped domain; the disks remain. Autostart is enabled on a domain (autostart), a network (net-autostart) and a pool (pool-autostart).

Domain XML: CPU, memory, disks, network

virsh dumpxml prints the full description and virsh edit changes it. The reference fragment shows where to look: memory is in MiB, and disks and interfaces are in the <devices> block.

xmlexcerpt from `virsh dumpxml web`
<domain type='kvm'>  <name>web</name>  <vcpu>2</vcpu>  <memory unit='MiB'>2048</memory>  <os>    <type>hvm</type>  </os>  <devices>    <disk type='file' device='disk'>      <driver name='qemu' type='qcow2'/>      <source file='/var/lib/libvirt/images/web.qcow2'/>      <target dev='vda' bus='virtio'/>    </disk>    <interface type='network'>      <source network='default'/>      <model type='virtio'/>    </interface>    <console type='pty'/>  </devices></domain>

Disks differ in source type: file is an image in the file system, volume is a volume in a named libvirt pool, and block is a block device. The virtio bus is faster than emulated IDE — for choosing devices, see the section “Virtual machines: creation and configuration”. virsh domblklist web lists a machine’s disks and virsh domiflist web lists its network interfaces.

The default network and a bridge

The default network is created when libvirt is installed: a virbr0 bridge on the host, address 192.168.122.1, DHCP from the built-in dnsmasq and NAT to the outside. The guest gets an address and reaches the network on behalf of the host; incoming connections from outside are blocked.

bashon the host
virsh net-list --allvirsh net-start defaultvirsh net-autostart defaultvirsh net-dhcp-leases default

To put a machine on the same network as the host, attach it to a bridge on a physical interface. The host creates the bridge — see the Linux reference, section “Networking: ip, ss and configuration” — and libvirt describes it as a network in bridge mode:

xmlfile lan-bridge.xml
<network>  <name>lan-bridge</name>  <forward mode='bridge'/>  <bridge name='br0'/></network>
bashon the host
virsh net-define lan-bridge.xmlvirsh net-start lan-bridgevirsh net-autostart lan-bridge

After that, switch the domain’s interface to this network in virsh edit: <source network='lan-bridge'/> instead of <source network='default'/>. For VLANs and rules for several networks, see the section “Networking: bridges and VLANs”; for host and guest security, see the section “Hypervisor security”.

Storage pools

libvirt keeps disks in pools: a directory, an LVM group or network storage; a volume is a unit inside a pool. virsh pool-list --all lists pools and virsh vol-list images lists volumes. A directory pool is described by an XML file:

xmlfile images-pool.xml
<pool type='dir'>  <name>images</name>  <target>    <path>/var/lib/libvirt/images</path>  </target></pool>
bashon the host
virsh pool-define images-pool.xmlvirsh pool-start imagesvirsh pool-autostart imagesvirsh vol-create-as images web-root 20G --format qcow2virsh vol-list images

The volume from the example corresponds to a volume source in the domain XML: pool='images', volume='web-root'. Pool types and fine-tuning are covered in the section “Storage and VM disks”.

Section sources

the section is written from these pages

Hypervisor security

Securing a virtualisation host starts with locking down management: the Proxmox VE web interface (port 8006) is never published to the internet, and access comes from a trusted network or through a virtual private network (VPNVPNvirtual private networkA network that uses a shared channel, such as the internet or a provider’s network, to join hosts into a closed group: outside traffic cannot see its addresses and data.Read more: VPN). After that come named users with roles, a firewall (firewallfirewallA device or program that passes traffic between networks according to rules and tracks the state of connections instead of judging each packet in isolation.Read more: firewall) at three levels, and guest isolation.

Management and accounts

The web interface listens on port 8006 over TLS; alongside it are SSH on port 22 and the VNC (5900–5999) and SPICE (3128) consoles. All of them are meant for a trusted network: do not publish the node to the outside, and give management access through a VPN or a dedicated bastion server. The root login is not removed and serves as the administrator’s fallback access; day-to-day work is done under named users.

Users belong to an authentication realm: pve is the built-in password store with SHA-256 hashing, PAM holds the host’s system users, and LDAP, Active Directory and OpenID Connect are added separately. Grant permissions to groups rather than to individual users — such a permission list is easier to maintain.

bashon the Proxmox VE node
pveum group add operatorspveum user add operator@pve -group operatorspveum acl modify /vms -group operators -role PVEVMUser

A permission is defined by a triple of path, subject and role: the role lists privileges, and the path addresses an object. Paths form a tree: /, /vms, /vms/101, /nodes/pve1, /storage/local, /pool/dev. Permissions are inherited down the tree, and a rule on a deeper path overrides the inherited one; the NoAccess role cancels all others on its path.

RoleWhat it allows
Administratorall privileges
PVEVMAdminfull VM management
PVEVMUserview, console, power, CD-ROM, VM backup
PVEAuditorread-only access to everything
PVEUserAdminuser management

Two-factor authentication

A second factor can be required for a whole realm or left to each user. The methods are time-based one-time codes (TOTP), WebAuthn keys — hardware or built into the device — and one-time recovery keys in case the phone is lost. WebAuthn requires HTTPS with a trusted certificate. Eight failed TOTP attempts lock that user’s factors; unlock them with pveum user tfa unlock operator@pve.

For automation, create an API token instead of using a personal password. A token is tied to a user, and with privilege separation enabled (the default) its permissions are the intersection of the user’s permissions and the token’s own rules. Limit its lifetime with --expire, a Unix timestamp: an expired token stops working by itself. Tokens can never open VM or node consoles. The principle of least privilegeprinciple of least privilegeAn information security rule: every user, process and service gets only the permissions it needs for its task — and none beyond that.Read more: principle of least privilege is built in here: automation gets only the permissions assigned to it.

basha read-only token
pveum user token add operator@pve monitoring -privsep 1pveum acl modify /vms -token 'operator@pve!monitoring' \  -role PVEAuditorpveum user token permissions operator@pve monitoring

Firewall at three levels

The Proxmox VE firewall generates iptables rules from its own configuration in /etc/pve, so on a cluster the rules reach every node at once. There are three zones: datacenter (/etc/pve/firewall/cluster.fw), node (/etc/pve/nodes/pve1/host.fw), and VM or container (/etc/pve/firewall/101.fw); node rules override datacenter rules. A rule consists of a direction (IN, OUT, FORWARD), an action and conditions: source, port, protocol.

inifile cluster.fw
[OPTIONS]enable: 1 [IPSET management]198.51.100.7198.51.100.0/24

The firewall is off by default; enable it with enable: 1. Once enabled, traffic to the nodes is denied except for essential flows from the local network. With a DROP policy, addresses in the management set keep access to the web interface (8006), SSH (22) and the VNC (5900–5999) and SPICE (3128) consoles, so add administrators’ addresses to management instead of writing rules for them one by one.

A guest has its own rules: the global enable flag plus a firewall flag on each network interface. The policy_in and policy_out policies decide what happens to all other traffic. Repeated rule sets are packaged as a security group at cluster level and attached with a GROUP webserver line. The ipfilter option stops a guest from sending packets from addresses that are not its own, which protects against IP spoofing.

inifile 101.fw
[OPTIONS]enable: 1policy_in: DROPpolicy_out: DROP [RULES]IN ACCEPT -source 198.51.100.0/24 -p tcp -dport 443

The alternative nftables backend, the proxmox-firewall package, reads the same configuration but remains a technology preview and is not recommended for production.

Guest isolation

A virtual machine is isolated more strongly than a container: it has its own guest kernel and a separate QEMU process. In libvirt, the QEMU process is confined by AppArmor or SELinux; sVirt isolation adds boundaries between guests — each process gets a unique SELinux label or AppArmor profile, and disks are relabelled so that a machine cannot read another’s disks. The settings live in /etc/libvirt/qemu.conf; the libvirt maintainers advise against running QEMU as root.

Create LXC containers as unprivileged: their root maps to an unprivileged host user, so an escape does not yield real root rights, whereas in a privileged container root inside is equivalent to root on the host. This mode is the default when you create a container; for details, see the section “LXC containers”.

Host updates

Security fixes come from the Debian and Proxmox VE repositories — you need both. Production nodes update from pve-enterprise (requires a subscription) or from pve-no-subscription, whose packages are tested less. The pve-test repository is only for trying new features; do not add third-party kernel or hypervisor repositories. How updates are installed is covered in the section “Versions and what’s new”.

Backups on Proxmox Backup Server can be encrypted on the client side with AES-256 GCM: with encryption on, the backup server receives blocks that are already encrypted, and the key stays with the client. How backups work is covered in the section “Backups, snapshots and restore”. Securing the Debian host itself — SSH, accounts, the local firewall — is described in the reference “Securing Linux servers”, section “Checklist”.

Section sources

the section is written from these pages

Common errors and diagnostics

Most problems with virtual machines show up in the task log in the web interface: starting, migrating and backing up all write every error there. After that, work through the following in order: node services in journalctl, the machine configuration with qm config, and storage state with pvesm status. The usual culprits are virtualisation switched off in the BIOS, a lock left by an interrupted operation, and a full storage.

Order of checks

  1. Task log: in the web interface on the node, or pvenode task list --errors --vmid 100; pvenode task log <UPID> shows the task output
  2. Proxmox services: journalctl -u pve-cluster -u pvedaemon -u pveproxy -u pvestatd
  3. Machine configuration: qm config 100, or pct config 200 for a container
  4. Storage: pvesm status — whether the storages are active and have free space

KVM is unavailable

If a virtual machine fails to start with an error about KVM being unavailable (KVM virtualisation configured, but not available), the processor does not support hardware virtualisation or it is turned off in the BIOS/UEFI. Look for the vmx flag (Intel) or svm flag (AMD) in /proc/cpuinfo; with nested virtualisation, the flag appears only after nesting is enabled on the host.

bashon the host
# vmx is Intel, svm is AMDgrep -E '(vmx|svm)' /proc/cpuinfo

The virtual machine is locked

An interrupted migration, snapshot or backup leaves a lock on the machine: qm config 100 shows a lock: backup line, and the machine cannot be started, migrated or deleted.

bashon the host
qm config 100 | grep lockqm unlock 100

Cluster without quorum

A node that has lost quorum switches /etc/pve to read-only: machine configurations cannot be changed and new tasks cannot be started. pvecm status shows Quorate: No and the number of available votes.

bashon the node without quorum
pvecm statuspvecm expected 1

pvecm expected 1 lowers the expected vote count so that the surviving node is treated as a full cluster again. After the repair, restore the real vote count by adding nodes or a QDevice, rather than faking the expected value.

Storage is full

Thin provisioning uses space as data is written, so space runs out suddenly. When a storage fills up, every machine on it gets I/O errors and is suspended in the paused state.

bashon the host
pvesm statusqm resume 100

Free up space or extend the pool, then resume the machine with qm resume 100. Writes missed during the pause can corrupt guest file systems — the documentation advises not to allocate more space to machines than the storage has.

Slow VM disk

SymptomCauseWhat to do
The disk is attached as ide0a slow emulated IDE controllerattach the volume as scsi0 (detach ide0 and add the disk again) and set the controller: qm set 100 --scsihw virtio-scsi-single
iothread=1 is missing in qm config 100all disk I/O runs in one QEMU threadadd iothread=1 to the disk with the virtio-scsi-single controller: qm set 100 --scsi0 local-lvm:vm-100-disk-0,iothread=1

The fastest option is a disk on virtio or scsi with its own I/O queue; choosing the device and cache mode is covered in the section “Virtual machines: creation and configuration”.

libvirt: paused domain

On a host without Proxmox, you track down the same problems through virsh. A domain stopped by an I/O error appears in virsh list --state-paused, virsh domblkerror shows the block error, and the domain log is in /var/log/libvirt/qemu/name.log.

bashon a host with libvirt
virsh list --state-pausedvirsh domblkerror vm-dbvirsh resume vm-db

Disk image backing chains and disk locks are covered in the libvirt knowledge base.

Section sources

the section is written from these pages

Versions and what’s new

This reference covers Proxmox VE 9.2, released on 21 May 2026 with kernel 7.0. Branch 9 follows Debian 13 “Trixie” and is supported for at least as long as Debian is. Minor releases install as ordinary updates.

How long each branch lives

Each branch is tied to a Debian release: 9 to Debian 13 “Trixie”, 8 to Debian 12 “Bookworm”. The end of Trixie support has not been announced, so branch 9 has no firm end date. Branch 8 went out of support in August 2026.

BranchDebianReleasedEnd of support
9 (current)13 (Trixie)August 2025Not announced
812 (Bookworm)June 2023August 2026
711 (Bullseye)July 2021July 2024

Proxmox VE is supported for as long as the Debian Security Team maintains the base release, so the documentation recommends running the latest stable version. Minor releases of a branch arrive when they are ready: 9.0 in August 2025, 9.1 in November 2025, 9.2 in May 2026.

What changed in 9.2

Components: kernel 7.0 as the default stable kernel, QEMU 11.0, LXC 7.0, ZFS 2.4, Ceph Squid 19.2.3 and Ceph Tentacle 20.2.1. The substantive changes are:

  • dynamic load balancing in the Cluster Resource Scheduler: CRS moves HA guests between nodes based on real node and guest load metrics;
  • HA can be “disarmed” with disarm-ha and arm-ha: during cluster maintenance the HA scheduler ignores events while resource state is preserved;
  • SDN gains WireGuard and BGP fabrics: an encrypted node-to-node tunnel as the underlay for VXLAN and migration networks, and BGP with eBGP unnumbered and a unique ASN per node;
  • on storage that keeps snapshots as volume chains, live VM snapshots now work with TPM state;
  • a separate 9.2 image for 64-bit ARM was released (August 2026): NVIDIA Grace Hopper and Vera platforms, UEFI boot only, and live migration only between nodes of the same architecture.

Versions without Proxmox

Without Proxmox, versions are tracked per component, with libvirt and virsh in place of the pve tools; see the section “libvirt and virsh without Proxmox”. The latest releases are QEMU 11.1.3 (28 October 2026) and libvirt 12.9.0 (2 November 2026); Proxmox VE 9.2 ships with QEMU 11.0.

QEMU deprecation is simple: a feature keeps working in the release that deprecates it and in one more, and may be removed after that. The list and timelines are on the Deprecated features page. Examples are the short form of boolean options such as noshare (since 6.0) and the device argument of QMP commands such as eject (since 2.8, replaced by id). Versioned machine types live for 6 years and are marked deprecated after 3.

How to upgrade

Within a branch, a minor release installs as an ordinary update: apt update and apt full-upgrade, or the Node → Updates panel. The repositories must be configured correctly and apt update must finish without errors. Before upgrading, read the release notes for the branch, which list notable and breaking changes.

bashon a Proxmox VE node
apt updateapt full-upgrade

Moving from one branch to the next is different. Upgrading from 8 to 9 needs a plan: a fresh backup of all VMs and containers, version 8.4.1 or later on the node, 5 GB free on the root partition (10 GB is better), and access to the node other than SSH, such as IPMI or a console. Hyper-converged Ceph must first be upgraded to Squid 19.2.

  • run pve8to9, the built-in checklist, on every node; run pve8to9 --full before starting, and repeat it before and after the upgrade;
  • switch the repositories to Trixie: use sed to replace bookworm with trixie in /etc/apt/sources.list and pve-enterprise.list, then add the Proxmox VE 9 repository and run apt update;
  • run apt dist-upgrade, which upgrades the system to Debian Trixie and Proxmox VE 9.0; answer questions about configuration files carefully;
  • reboot into the new kernel and check pve8to9 --full again.

The alternative to an in-place upgrade is a fresh install from the 9.x ISO, restoring VMs from backups; on heavily customised nodes it is more predictable. For how a cluster is upgraded, see the section “Cluster and high availability”.

Section sources

the section is written from these pages

End of the reference

What changed

revision history · 4 entries

Every edit is saved as a revision: a snapshot of the reference, the reason and a summary of changes. The published version changes only after the same checks as at creation.

  1. Manual edit

    reason: manual edit
  2. Manual edit

    reason: manual edit
  3. Manual edit

    reason: manual edit
  4. Reference updated

Weekly check

How the reference is checked

Once a week — and right after news of a release or a vulnerability — the reference is checked in three steps.

  1. 1. Freshness

    Sections are compared with the release notes and changelogs from the official sources and with the topic’s news.

  2. 2. Errors

    Every section is read again: wrong facts, outdated APIs and flags, broken examples.

  3. 3. Links — by an HTTP request

    Every source link must respond. A broken link is a reason to recheck the section.

No findings — only the date changes. Findings — only the affected sections are rewritten, and they appear in “What changed”. A new version replaces the published one only after passing the same checks as at creation.

Statuses

Verified
no findings
Updated
sections rewritten, edits are listed
Rechecking
while the check runs, the previous version stays open
Needs review
disputed points: the verified version is shown, editors review

Last check

18 Nov · Check · updated · no findings

Found an error in the reference?

On the topic

tracks, news and other references
The whole “Virtualisation (KVM, Proxmox)” topic
13 sections
Another reference · DevOps & cloud

Docker

Verified 31 Oct
All references · 61