Turn Your Old Laptop Into a Perfect Proxmox Server
Author: Yaroslav Koisa
Created on 10 November 2020
Last edit commited on 6 January 2021
This should be a quick reference to our YouTube video, so you don’t have to do a whole lot of typing.
Pros and Cons of this setup
- Portability – laptops are small and portable, storing them is no issue compared to a desktop PC or a rack mounted server.
- Energy consumption – laptops use less power on average, this will help to keep the energy bill down, and it’s overall good for our environment.
- Built in UPS – power backups are expensive, so a built in laptop battery is a huge plus. In case of a power outage, it can last for a really long time.
- Noise levels – laptop is a much quieter option compared to other alternatives. You can probably run one next to your bed during the night, without ever noticing it’s there.
- Built in keyboard, screen and mouse – there is no need to purchase a KVM or something like that, laptop already has it all.
- Performance per dollar spent – when you compare an older i7/16GB RAM laptop to an enterprise HP G8 server with up to 128GB RAM and double socket motherboard with Xen CPUs, they would cost nearly the same, but performance they offer is much different.
- Expandability – there are next to no options to improve the machine you’ve purchased, CPU and GPU are integrated, there are 1 or 2 RAM slots in most cases, no support for PCI cards, and the storage… well, you probably know.
- Single ethernet port (in most cases) – compared to an enterprise server with at least 4 NICs or more, this is far from optimal.
Steps to take, if you'd like to install ProxMox on the laptop
Remove the ProxMox enterprise repos and add the ProxMox non-sub repos
I assume you wouldn’t buy a license for this kind of deployment, but if you did, skip this step.
rm /etc/apt/sources.list.d/pve-enterprise.list echo "## PVE ##" >> /etc/apt/sources.list echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" >> /etc/apt/sources.list apt update
Add repo for the latest GlusterFS 7 (optional)
wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - echo "## GLUSTER ##" >> /etc/apt/sources.list echo "deb https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/10/amd64/apt buster main" >> /etc/apt/sources.list apt update
Generate additional locales (optional, but recommended)
Open the file
/etc/locale.gen and uncomment your own locale, I am going with en_GB here.
echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen locale-gen
Install the software that will help you in the future
You will need this software sooner or later. Better install it now, to not waste any time later down the road, for example ifupdown2 will keep your host from rebooting, when you change the network config.
apt-get install -y ifupdown2 bmon iftop tmux mc htop
Laptop specific tuning
TLP will help with better power management and battery monitoring. Systemd/logind file entries will keep the laptop from going to sleep when the lid is closed.
apt install -y tlp systemctl disable network-manager --now echo "@reboot root systemctl disable network-manager --now" >> /etc/crontab echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf echo "HandleLidSwitchExternalPower=ignore" >> /etc/systemd/logind.conf echo "HandleLidSwitchDocked=ignore" >> /etc/systemd/logind.conf
You can check your battery status with the next commands:
tlp-stat -s tlp-stat -b
Tune ZFS to use a small amount of RAM, 512Mb in this case (the maths behind the number is very simple: 512x1024x1024). I am running my testing box for a year now, with no issues or data loss. As far as I am concerned, this is safe to do, but “smart” people on the internet will definitely tell you otherwise.
echo "options zfs zfs_arc_max=536870912" >> /etc/modprobe.d/zfs.conf
Upgrade the system
apt -y dist-upgrade reboot
Check the arcstat, run update-initramfs and reboot if arc_max was not applied
arcstat update-initramfs -u reboot
Consider donating towards our project, to support a future content release