How to Install Proxmox on the Raspberry Pi?

Hackbs

How to Install Proxmox on the Raspberry Pi?

Using virtualization software like Proxmox allows you to turn a single Raspberry Pi into a mini datacenter capable of running multiple virtual machines and containers. This provides flexibility to consolidate services and try different software without needing dedicated hardware for each one.

Installing Proxmox on a Raspberry Pi takes a bit more effort than a regular Linux distribution, but it opens up many possibilities. This guide will walk through the entire process of flashing the Proxmox image, initial server setup, optimizing performance, and basic usage.

Why Proxmox on Raspberry Pi

Here are some of the main advantages of running Proxmox on a Raspberry Pi:

  • Low Cost – Raspberry Pis are inexpensive single board computers perfect for homelabs. Less wasted resources compared to running everything bare metal.
  • Energy Efficient – Consolidating services into VMs/LXCs allows unused boards to be powered off saving electricity costs.
  • Space Saving – Small form factor takes up less space instead of multiple dedicated machines and cables.
  • Mobility – Easy to backup and migrate VMs to move your lab anywhere. Raspberry Pi’s small size makes transportation easy.
  • Educational – Great way to learn server virtualization, containerization, clustering and Linux networking/storage concepts at low cost.

The end result is a compact yet capable server platform perfect for home use and experimentation.

Hardware Requirements

These are the official minimum hardware requirements from Proxmox to comfortably run their environment:

  • Raspberry Pi 4 (all models)
  • 8 GB RAM
  • 64 GB+ fast microSD card (avoid slow cards)
  • Heatsinks + fan case strongly recommended

Adequate cooling is very important when running intensive workloads otherwise performance will throttle during extended load from thermal throttling. Using higher spec hardware meets the requirements with more headroom.

Download Proxmox Image

First download the Proxmox VE image for Raspberry Pi from the official website.

The latest release at time of writing is v7.2 with the .xz compressed image file about 476 MB. Download and decompress this file to get the raw .image file.

Alternative option is downloading the community provided image with optimizations specific for the Raspberry Pi hardware. This can provide better performance over the generic reference image.

Next this Proxmox image will be written to a microSD card and used to boot up the Raspberry Pi.

Write Image & Boot Up

With the compressed disk image downloaded and decompressed the next step is flashing it onto the microSD.

This can be done using utilities like Etcher or dd on Linux/macOS. Windows users can try Rufus.

The microSD card will be completely erased so backup any required data first!

With the Proxmox image written insert the microSD into the Raspberry Pi and connect ethernet cable + power supply. It will now boot up directly into the Proxmox VE setup wizard.

Initial Server Setup

The first boot will launch the configuration wizard used to setup core server settings.

  • Set location/time zone
  • Configure networking
  • Create administrative user

The web-based Proxmox GUI can then be accessed at the configured management IP using the credentials entered.

With access to the web UI the system can also be updated from the shell by running:

apt update && apt dist.-upgrade -y && reboot

Reboot once to ensure latest package versions and kernel are loaded.

Optimizing Performance

Running Proxmox introduces some extra overhead from the virtualization management layer. But there are optimizations specific for improving performance on the Raspberry Pi hardware:

  1. Allocate More RAM to GPU

By default only 128 MB is given to GPU memory.

  • Manually set the gpu_mem value higher in /boot/firmware/config.txt.
  • gpu_mem=512
  • Reboot required for this to take effect
  1. Set CPU Governor Setting

The OnDemand governor will provide best performance and automatically clock CPU speeds faster under load.

  • Add the following line to /etc/default/cpufrequtils:
  • GOVERNOR=”OnDemand”
  • Then reload settings:
  • systemctl disable cpufrequtils.service
  • systemctl enable cpufrequtils.service
  • systemctl restart cpufrequtils.service
  1. Enable Kernel Swap Support

Zram creates compressed swap in RAM. This speeds up swapping significantly and allows more aggressive overcommitting.

  • Install required package:
  • apt install zram-tools
  • The service is enabled by default on Proxmox so no further action needed.
  1. Mount External USB Storage

The internal microSD storage is limited and slow. For best performance mount external fast USB disks and SSDs. This also allows resizing as needed instead of the fixed microSD card size.

First identify device names:

  • lsblk
  • Then create an ext4 filesystem:
  • mkfs.ext4 /dev/sda1
  • Finally add a mount entry in /etc/fstab:
  • /dev/sda1  /mint/usbdisk  ext4  defaults  0 2
  • Reboot and the drive will now persistently mount on boot.

Creating Virtual Machines

With Proxmox server fully set up it’s time to create some VMs!

  1. Add ISO and Disk ImagesFirst locate the ISO install images and disk templates to upload. These can be stored locally or downloaded on demand.
  2. Launch VM WizardClick Create VM then go through the wizard to configure new virtual machine.
  3. Select Type/ISOChoose type as Linux and select install ISO previously uploaded.
  4. Configure OptionsSet CPU cores, RAM amount, add storage disks, configure network, etc. Based on OS minimum requirements.
  5. Start VMLaunch the VM! Connect via VNC and go through OS install process inside the virtual machine.

Repeat steps to create additional VMs for all services with appropriate specs for each.

Managing Containers

Proxmox also includes LXC support for fast containers. Make use of these lighter weight containers for microservices:

  1. Download TemplateGo to the LXC template library and download the desired base image.
  2. Create ContainerUse the GUI or CLI pct tool for setup.
  3. Customize OptionsTweak config settings as needed for application running inside container.
  4. Start ContainerLaunch the newly created LXC!

Containers complement full VMs allowing services to run more efficiently.

Conclusion

Getting Proxmox running on the Raspberry Pi unlocks tons of new possibilities. It’s an affordable platform for gaining practical first-hand experience with datacenter virtualization concepts.

Hopefully this guide covered the full setup process starting from flashing the Proxmox image to configuring VMs and containers. The Raspberry Pi may have basic specs on paper but can punch above its weight by maximizing performance and running services in a virtualized architecture.

In summary the key aspects are:

  • Flashing the Proxmox image and initial server setup
  • Optimizing the system for best performance
  • Adding external storage via USB for capacity and speed
  • Creating both VMs and LXC containers customized for services
  • Taking advantage of containerization and virtualization

So grab a Raspberry Pi and begin building your virtual home lab!

Frequently Asked Questions

Q: Does Proxmox have a free tier?
A: Yes, Proxmox VE is open source with a completely free tier available. Paid subscriptions add enterprise features and official support.

Q: Can Proxmox run on any model Raspberry Pi?
A: Officially Proxmox supports Pi Model 4 and later. Earlier models do not meet minimum system requirements.

Q: Is Proxmox difficult for beginners to learn and use?
A: The web GUI provides an intuitive and user-friendly management interface. But understanding servers and virtualization does have a learning curve.

Q: Why use Proxmox instead of just running Linux?
A: Proxmox provides easy containers, clustering, high availability and a wide range of tools that simplify management.

Q: What guest VMs can run on a Raspberry Pi Proxmox host?
A: ARM64 compatible OS images include most Linux distros and Windows 11 for ARM. Linux 32-bit x86 images also work with emulation.

Q: Can I host a VPN inside Proxmox on a Pi?
A: Yes VPNs like Wire guard or OpenVPN run great in containers. Network cards can be passed through or use the built-in VPN capabilities.

Q: Is Docker included on Proxmox and fully supported?
A: Docker comes pre-installed and integrated seamlessly as an alternative to LXC containers.

Q: What filesystem should be used for external USB disk mounts?
A: For reliability ext4 is recommended. But ZFS brings advanced features if you can dedicate full disks.

Q: Can a swap file be used instead of zram swap for the Raspberry Pi?
A: For reliability zram compressed RAM swap is best. But a swap file works with some performance impact.

Q: Does Proxmox offer live migration of running VMs?
A: Yes live migration allows moving active VMs between Proxmox cluster nodes with no downtime.

Q: Can I create linked clones of an existing VM in Proxmox?
A: Yes linked clones provide duplicates efficiently sharing base image data. Great for scaling homogeneous services.

Q: What components can be clustered between multiple Pi nodes?
A: Storage, VMs, containers and the Proxmox web UI itself can be clustered across nodes.

Q: Is running desktop environments like GNOME viable within VMs?
A: Low powered ones yes, but avoid heavy DEs intended for high end x86 CPUs. Better to keep the host OS lean.

Q: Should SSH keys be used instead of root passwords inside VMs?
A: Definitely, disabling root password access entirely and relying solely on SSH keys is most secure best practice.

Q: Can I pass an entire USB device through to a VM guest OS?
A: Yes full PCIe passthrough options allow assigning USB controllers. Useful for Z-Wave radios for home automation use cases.

Q: Is High Availability (HA) possible between Pi cluster nodes?
A: Limited officially supported HA, but enterprise levels achieved with replication and keepalived.

Q: Does the standard 64bit kernel have better performance over 32bit?
A: Very slightly yes, at the cost of increased memory usage. But most situations won’t notice a difference either way.

Q: Can multiple external storage drives be pooled together?
A: Yes via mergerfs plugins, LVM or distributed GlusterFS filesystems spanning multiple disks.

Q: How do OS updates and upgrades work within VMs?
A: Guest operating systems can update independently through normal update mechanisms. Proxmox itself can also stay up to date.

Q: Is pass-through device USB performance reduced?
A: Yes emulated USB adapters have lower speeds than PCIe passthrough assign directly to the guest.

Leave a Comment