Proxmox VE
Proxmox Virtual Environment is a complete, open-source server management platform for enterprise virtualization. It tightly integrates the KVM hypervisor and Linux Containers (LXC), software-defined storage and networking functionality, on a single platform. With the integrated web-based user interface you can manage VMs and containers, high availability for clusters, or the integrated disaster recovery tools with ease.
See more: https://www.proxmox.com/en/proxmox-virtual-environment/overview
Download: https://www.proxmox.com/en/downloads/proxmox-virtual-environment
- Mobile Application
- Scripts for Streamlining Your Homelab with Proxmox VE
- Collection of tools for Proxmox
Post-install configuration:
- https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_no_subscription_repo
- Powertop - Optimize power consumption and power management:
powertop --auto-tune.
Upgrade to Proxmox v9
Highlights:
- In-place upgrade is available
- Check configuration before and after upgrade:
pve8to9 --full
Virtual machines
VM config location: /etc/pve/qemu-server/<ID>.conf
Create a VM via CLI
See example: create-ubuntu-server-vm.sh
Kernel Samepage Merging (KSM)
KSM is a memory-saving de-duplication feature. See more: https://docs.kernel.org/admin-guide/mm/ksm.html
Check KSM statistics: watch cat /sys/kernel/mm/ksm/pages_sharing
Note: a page is 4096 bytes.
Proxmox VM Watchdogs
Force stop a VM
If Proxmox is stuck terminating a VM, as last resort, the kvm process can be forcefully terminated.
Scheduled VM start/shutdown
To schedule starting and stopping a VM in Proxmox VE, create a file in /etc/cron.d e.g.:
Setup the scheduling, like:
LXC Containers
Connect to terminal: pct enter <CTID>
Create a container
proxmox_lxc_pct_provisioner.sh
https://gist.github.com/tinoji/7e066d61a84d98374b08d2414d9524f2
pct create <id> /var/lib/vz/template/cache/centos-7-default_20170504_amd64.tar.xz ...
CLI examples (TODO cleanup):
Issue: Cannot mount a SMB share
You can’t mount any SMB/NFS share inside a unprivileged LXC. Thats only possible with the unsecure privileged LXCs after enabling the CIFS or NFS features under your LXC -> Options -> Features. If you want to use shares with a unprivileged LXC you need to mount the shares on your host and then use bind-mounts to bring the mounted share from your host into your LXC.