Proxmox Virtual Environment
Install Proxmox 8 on Debian 12
Prepare Debian system
apt -y update && apt -y install sudo iptables python3 dbus wget
Reboot the system
Install Proxmox
Follow the manual on https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm
Configure internal network
Create Linux Bridge
interface vmbr0
with internal IP address, e.g. 192.168.1.1/24
and no bridge ports attached
Install DHCP server (based on https://computingforgeeks.com/using-dnsmasq-dhcp-server-proxmox-vms/)
Install dnsmasq - sudo apt install dnsmasq
Add to the end of /etc/dnsmasq.conf
config file:
domain=test.local
interface=vmbr0
dhcp-range=192.168.1.10,192.168.1.250,30d
dhcp-option=vmbr0,3,192.168.1.1
server=8.8.8.8
server=8.8.4.4
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
Restart the service systemctl restart dnsmasq.service
Enable outgoing NAT - add section to /etc/iptables/rules.v4
and apply rules by command netfilter-persistent reload
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 192.168.1.0/24 -o vmbr0 -m comment --comment "Outgoing NAT" -j MASQUERADE
COMMIT
Create Admin group and assing full privileges to it
pveum groupadd admin
pveum aclmod / -group Admin -role Administrator
Additional configuration
Cluster
Get cluster status - pvecm status
Reduce number of nodes requires for quorum, if some nodes in cluster are not available - pvecm expected 1
Corosync
Corosync is a distributed configuration storage where proxmox stores cluster information
Apply update to /etc/pve/coronosync.conf
- corosync-cfgtool -R
After major changes of corosync.conf
file corosync
service must be restarted on all nodes
Network
Example of Bridges and NAT in network configuration
auto lo
iface lo inet loopback
iface enp0s25 inet manual
auto vmbr0
iface vmbr0 inet static
address 172.16.12.10/24
gateway 172.16.12.1
bridge-ports enp0s25
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 172.16.111.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s 172.16.122.0/24 -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 172.16.122.0/24 -o vmbr0 -j MASQUERADE
Example of IP alias
auto vmbr0
iface vmbr0 inet static
...
up ip addr add 1.2.3.4/24 dev vmbr0 label vmbr0:1
down ip addr del 1.2.3.4/24 dev vmbr0 label vmbr0:1
Tips:
- Proxmox node IP address must use IP of internal bridge interface
Commands
- Rescan disks for VM
qm rescan --vmid <VMID>
- Rescan all disks
qm rescan
ZFS Cache
ZFS cache does not counts in Linux cache and can get memory from other apps.
Show ZFS cache statistics arcstat
, very detailed stat: arc_summary
Limit ZFS cache to 8Gb on the fly
echo 8589934592 >> /sys/module/zfs/parameters/zfs_arc_max
Limit ZFS cache permanently - create file /etc/modprobe.d/zfs
options zfs zfs_arc_max=8589934592
options zfs zfs_arc_min=1073741824
Proxmox VE Helper-Scripts
https://tteck.github.io/Proxmox/
Use Proxmox VE Tools\Proxmox VE Post Install
to finish installation.