Proxmox
Is a Supervisor Operating System
Links¶
- Proxmox Documentation
- Proxmox Wiki
- Home Assistant custom integration
Setup¶
- In VirtualBox: see the guide
- Trove of scripts
- Post-install script
- Change CPU Scaling Governor to
powersave
to save some previous Watts - Clean old kernels
- SSH port shouldn't be changed as it is used for cluster things
- Setup Cloudflare DNS with Proxmox: Guide
Activate IOMMU / PCIe Passthrough¶
- See this Wiki page and this documentation page
- Add
intel_iommu=on
oramd_iommu=on
to the GRUB or systemd-boot (in UEFI)- IOMMU Passthrough can also be added if supported with
iommu=pt
- IOMMU Passthrough can also be added if supported with
- Edit
/etc/modules
and addvfio vfio_iommu_type1 vfio_pci vfio_virqfd
update-initramfs -u -k all
- Reboot
- Check if active with PCI Express
- Check IOMMU groups with PCI Express
Import a VM from TrueNAS¶
- Disk copy
- Other settings from TrueNAS
- Boot loader: UEFI
- Display: SPICE
USB Passthrough¶
- The order of creation of passthrough does matter, like for Home Assistant
Remote SPICE access without going through Web GUI¶
- Set up permissions
- New role with
VM.Console, VM.Audit
- New group
- New permission for the group with the role and the necessary path
- New user in the PVE realm assigned to the group
- New role with
- Set up token
- Create API Token, with Privilege Separation
- In each VM, assign the API token to the Role created
- Choose a script option
- cv4pve-pepper
- API Access:
- Linux only script: PVE Spice Connect
- cv4pve-pepper
Configure ZFS settings¶
Limit ZFS Memory usage¶
- See Wiki
Serial Console¶
- Add Serial device to the VM
- Edit
/etc/default/grub
with
GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
- Run
update-grub
Create a QEMU CPU Model¶
- Stored in
/etc/pve/virtual-guest/cpu-models.conf
- See Documentation
Disable mitigations¶
- Edit
/etc/default/grub
- In
GRUB_CMDLINE_LINUX_DEFAULT
, addmitigations=off
- In
update-grub
reboot
Utilization¶
- See QEMU
Stop a VM¶
- Shutdown simulate an ACPI power off
- Stop simulate a sudden stops, like a power loss
qm stop <VMID>
withVMID
the ID in Proxmoxps aux | grep <VMID>
to grab the VM's process IDkill -9 <PID>
to kill the process
Mount a USB drive¶
- Mount the drive with fstab
- In the Proxmox interface, add the disk as a Directory
Shrink a VM Disk¶
- Make sure that things are zeroed
- Make sure that Discard is on
- Resize a partition
- Change the size (source)
- If LV:
lvreduce -L 5G /dev/pve/disk-name
(reduce to 5G) orlvreduce -L -5G /dev/pve/disk-name
(reduce by 5G) - If qcow2:
qemu-img resize --shrink <vmfile.qcow2>
[+-] or size - If ZFS:
zfs set volsize=<new size>G rpool/data/vm-<vm id>-disk-<disk number>
- Find the ZFS path with
zfs list
- Find the ZFS path with
- If LV:
- Update Proxmox:
qm rescan
- If you use GUID Partition Table
Backup to USB External Drive¶
- Have an existing
ext4
partition- Or create it, check fstab
- Create a folder and
mount /dev/sdba1 /mnt/folder
- Add the folder in Datacenter, Storage → Add Directory
Mail managements¶
See postfix