Proxmox Tips & Tricks¶
Cluster¶
- Never start a node in the same network that has been removed from the cluster. The node will try to join a cluster corrupting the cluster state(node was removed). This may bring the whole cluster down.
VM¶
- When creating a vm on a thin-pool storage, make sure to enable discard option to take advantage of thin pool( vm disk will not take full space). Run
fstrimas root user on vm disk with discard option to reclaim unused space. (fstrim -v \) - Remove any iso images that were attached during installation if the VM is setup for HA. (HA fails if ISO is attached because ISO is not on shared storage)
- Enable QEMU agent when creating VM.
- If HA is setup on a VM and VM start at boot option is not checked, VM will still start.
- VMs take the RTC time from the host at boot, afterwards they will use their own kernel based time which is not reliable. Time drift can happen on VMs after a few days on running. This can cause multiple issues. Its good to install NTP on the VM to sync time, use chrony
sudo apt install chronyfor better time sync.
Storage¶
- When creating ZFS, check thin-pool to take advantage of over allocation.
- High Availability ZFS vs Ceph
- ZFS
- Faster Disk IO.
- Slow HA (Can take a few mins for failover).
- Need to setup relication for HA to work.
- Ceph
- Slower Disk IO (IO happens on all ceph nodes via network).
- Fast HA.
- Storage is distributed by default, no replication needed.
- ZFS
High Availability¶
- Disabling Memory ballooning Device helps with HA. (VM may fail after migration with kernel panic memory error if ballooning device is enabled)
-
When using external NFS server, add delay to VM start at boot to avoid VM failover due to NFS server not ready. This can be done in two ways:
-
- Add delay from the GUI, vm options -> Start/Shutdown order -> Start delay.
-
- Run
pvenode config set --startall-onboot-delay 300to set delay for all VMs.
- Run
-
Option 2 is preferred as it will set delay for all VMs and appears to be working when HA is enabled.