My Proxmox cheatsheet

Set up Let’s Encrypt with Cloudflare

Setting up email notifications

Not got this working yet

Updating Proxmox

# as root
apt clean
apt update
apt dist-upgrade
apt autoremove

If updates fail with a disk-out-of-space error, then it could be that /boot is full of old kernels and suchlike. This has happened to me already - I solved it simply by deleting some old kernels.

This is the more convenient way: BassT23/Proxmox: Update your Proxmox VE

Use xterm.js for VM terminal (nicer and allows copy and paste)

From here

In host console:

qm set your_vm_id -serial0 socket
# where your_vm_id is e.g. 100

In VM console:

sudo vim /etc/default/grub

and change line to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet console=tty0 console=ttyS0,115200"	

Then update GRUB and reboot:

sudo update-grub
sudo reboot

Now you can select an xterm.js console for that VM. Press Enter a few times if it seems to get stuck.

Sometimes this stops working, but repeating the steps above usually gets it working again.

Couldn’t get SPICE to work, at least on my corporate laptop

Useful pct (Proxmox container toolkit) commands

pct list
pct enter 100  # like SSH
pct status|start|stop|shutdown|destroy|unlock 100
pct config 100
pct exec 100 apt update
pct snapshot 100 snapshotname
pct restore 100 <file in /mnt/backup>
pct resize 100 rootfs +10G
pct push 100 localfilepath containerfilepath
pct pull 100 containerfilepath localfilepath
pct create ...

Useful qm (QEMU Machine) commands

qm guest exec 100 -- df -h  # if `qm-guest-agent` installed on VM
qm guest exec 100 -- su -c 'ls /home/senaite/senaitelims' senaite  # as specific user
qm terminal 100  # needs serial interface
qm status|start|stop|shutdown|destroy|reboot 100
qm resize 100 scsi0|virtio0|ide0 50G|+20G  # can only increase
qm list
qm create  ... # must learn more about this one
qm config 100 # list config
qm set 100 ... ...  # change config
qm snapshot 100 snapshotname
qm rollback 100 snapshotname
qm unlock 100  # if stuck