Proxmox
Is a Supervisor Operating System
Links¶
- Proxmox Documentation
- Proxmox Wiki
- Home Assistant custom integration
Setup¶
- In VirtualBox: see the guide
- Remove Subscription notice with pve-nag-buster
wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/install.sh && chmod +x install.sh && ./install.sh
- Then disable the
entreprise
repository
- Trove of scripts
- Change CPU Scaling Governor to
powersave
to save some previous Watts - Clean old kernels
- Change CPU Scaling Governor to
- 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 SCALE¶
- 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
- Linux only script: PVE Spice Connect
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
Utilization¶
Best settings when creating a VM¶
- Windows 10 guest best practices
- System
- QEMU Agent: enabled
- Need to be installed with
qemu-guest-agent
or Fedora VirtIO drivers
- Need to be installed with
- Machine type:
q35
+ BIOS:OVMF
for PCI Passthrough, otherwise default is fine
- QEMU Agent: enabled
- CPU
- Type:
x86-64-v3
works finehost
will match the Host CPU, but will impact migration to to other systems
- Type:
- Memory
- Ballooning: enabled, disable on Windows
- Minimum memory: don't use on Windows
- 1 GB must be made available for the host
- Network
- Type: VirtIO
- Display
- Type:
std
orqxl
for SPICE
- Type:
- Firmware
- SeaBIOS by default
- OVMF for Windows 11 and PCI Express
pre-enroll-key
for Windows keys + Secure Boot on- Virtual screen resolution is set in the VM BIOS
- Storage
- For Windows
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