Add guest agent

apt install qemu-guest-agent
yum install qemu-guest-agent

then start it:

systemctl start qemu-guest-agent


For Windows

download the latest iso:

Unlock VM/containers

VMs and container often stay locked after any kind of connectivity problem, to unlock them:

pct unlock <ID>
qm unlock <ID>

Use a USB drive for backup

Mount the USB drive, then you can add via GUI a new Storage Datacenter->Storage->Add->Directory

Reduce HD file size (qcow2)

mv original_image.qcow2 original_image.qcow2_backup
qemu-img convert -O qcow2 original_image.qcow2_backup original_image.qcow2

TASK ERROR: can’t lock file

If you issue a Shutdown command on a VM than cannot process it (no ACPI), the task runs and tries its best before timing out. During this time the /var/lock/qemu-server/lock-100.conf is locked by this task.

If during this time (before the Shutdown task times out), you issue a Stop command to the VM, you become this error message:

trying to acquire lock...

TASK ERROR: can't lock file '/var/lock/qemu-server/lock-101.conf' - got timeout

In this case, you have to open the -still running- Shutdown task (double click on it in the Tasks pane) and stop it.

Then, re-issue the Stop command to the VM. This time it should work.

Mount a network share on an unprivileged container

cannot be done -> bind mount instead (see pct)


pveam – Proxmox VE Appliance Manager

pveam update
pveam available
pveam download <storage> <template>
pveam download local debian-10-turnkey-observium_16.0-1_amd64.tar.gz
pveam download Deployment ubuntu-21.04-standard_21.04-1_amd64.tar.gz

pvesm – Proxmox VE Storage Manager

config file:

pvesm status
root@proxmox01:~# pvesm path local-lvm:vm-107-disk-0
pvesm add cifs StorageName --server myServer --share myShare --username myUser --domain myDomain --smbversion 3.0 --password
pvesm remove StorageName

Failed migration with ZFS drives:

pct – Tool to manage Linux Containers (LXC) on Proxmox VE

pct list
pct shutdown 302

Bind mount (container 109, mount point #0):

pct set 109 --mp0 /mnt/pve/Deployment,mp=/mnt/deployment,backup=0,replicate=0,ro=1

Unlock a container:

pct unlock <ID>




systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster


pmxcfs – Proxmox Cluster File System


NFS share for backups

VM and containers configuration files


Default local storage directory

more /etc/pve/storage.cfg

Container to hold docker (nesting)

Create a container with debian/ubuntu

  • unpriviledged
  • disk 8GB
  • cpu 2 cores
  • ram 2048 GB, 512 GB swap
  • Network IPv4/v6 DHCP (for now)

Add keyctl and nesting features.

Start and update

create new user

adduser --quiet technician
usermod -aG sudo technician

The rest will happen as leo over ssh.

Install docker following:

Add technician to the docker group to be able to manage the containers:

usermod -aG docker technician