proxmox

DIY HOME SERVER 2021 – Software – PROXMOX

1. DIY HOME SERVER - PROXMOX Installation

This guide is my implementation of the official Proxmox VE Installation Guide.
At first, installing PROXMOX VE 6.4 seemed to be a walk in the park. But then…

I choose to install Proxmox in ZFS Raid 1 mirror on the 2 Crucial MX500 500 GB SATA SSD drives connected directly to the SUPERMICRO X10SRi-F motherboard. I did not want to occupy the whole drives but only use a 64 GB partition. The rest of the SSD drives will be used to run the VMs.

I downloaded the latest ISO Installer and flashed it to an USB drive using Etcher.

Booting your server from the USB drive, you’ll get the welcome screen. Select the first option.

On the next screen, select zfs (Raid 1). Then click Deselect All and select as Harddisk  0 and Harddisk 1 both internaly installed SSD’s.

Click on Advanced Options.

Set the compression to lz4. Then reduce the hdsize to about 80% of the SSD size. This way you enable overprovisioning. In my case, I use 400 GB of the available 500 GB.

Click OK and then Next.

Select your Country, Time zone and Keyboard Layout.

Then click Next.

Enter a strong password and confirm it.

Enter the system administrators email address. It will be used to send you warnings and maintenance messages.

Click on Next.

Select the NIC to be used by Proxmox VE , set the hostname and give your system a fixed IP address inside your LAN IP range.

Click on Next.

Verify your settings in the summary screen.

Either go back and correct some settings or click Install to continue.

Proxmox VE will be installed on both SSDs.

Take note of the mentioned URL. It’s the URL you’ll use to remotely manage your new Proxmox VE installation.

Click Reboot.

Remove the USB drive during reboot.

When all goes well, the system will reboot and start Proxmox VE. If not, see the section PROXMOX Boot problem below.

2. DIY HOME SERVER - PROXMOX Log in

Open a browser and go to the URL mentioned during the installation process.

You’ll get a security warning. Accept it and continue.

Log in to the GUI as user root and use the password set during the installation procedure.

Click Login.

You’ll see your datacenter welcome screen showing the installed Proxmox VE node.

Click on your Proxmox VE node to check its current status.

3. DIY HOME SERVER - PROXMOX Prepare upgrades

Let’s prepare Proxmox VE for upgrading. 

Open up a ssh session to the server, either from your computers terminal

C:\>ssh root@xxx.xxx.xxx.xxx

or use Putty.

Log in as user root and enter the password.

First we will remove the Enterprise Repository and replace it with the Community Repository.

Type : 

cd /etc/apt/sources.list.d/
ls
rm pve-enterprise.list
cd ..
nano /etc/apt/sources.list

Remove all content by pressing CTRL + K to delete each line.

Paste into the editor : 

deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
# security updates
deb http://security.debian.org buster/updates main contrib

Then press CTRL + O to save. Confirm.
Then press CTRL + X to exit.

After that, we get use apt update the latest information and install it using apt dist-upgrade.

Type : 

apt update && apt dist-upgrade -y
reboot

After reboot, Proxmox VE is up-to-date and future updates will be possible from the GUI.

4. DIY HOME SERVER - PROXMOX Configuration

a. Enabling applying network configuration without reboot

Log in to Proxmox and browse to your PVE. Then select Shell.

Enther the command : 

apt install ifupdown2 -y

b. Activating network interfaces

In case your motherboard has multiple NICs, not all network interfaces will be activated by default. The primary network interface, the one specified during installation, will of course be activated. All other NICs will stay deactivated in case the do’nt recieve an IP address during boot time.

Log in to Proxmox and browse to your PVE. Then select System → Network and double-click a deactivated network device. Enter an valid IP address and click the Autostart option. Then click OK. Do the same for all other deactivated NICs. Then click the Apply Configuration button.

c. Configuring E-mail alerts using GMail

Follow this excellent article on how to set up e-mail alerts on your Proxmox VE server.

d. Configuring E-mail alerts using another e-mail provider 

Log in to Proxmox and browse to your PVE. Then select Shell.

Install the required packages :

apt update && apt install -y libsasl2-modules

Configure a relay account :

echo "[mailserver]:port username:password" > /etc/postfix/sasl_passwd

Replace mailserver, port, username and password with your own values.

Create a hash from the sasl_passwd file :

postmap /etc/postfix/sasl_passwd

Secure your sasl_passwd files :

chown root:root /etc/postfix/sasl_passwd*
chmod 0600 /etc/postfix/sasl_passwd*

Configure postfix to use the relay account :

nano /etc/postfix/main.cf

Delete the line :

relayhost =

Add the lines :

relayhost = [mailserver.somecompany.com]:587
# enable SASL authentication
smtp_sasl_auth_enable = yes
# disallow methods that allow anonymous authentication.
smtp_sasl_security_options = noanonymous
# where to find sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# Enable STARTTLS encryption
smtp_use_tls = yes
# where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Restart the postfix service :

systemctl restart postfix

Test your new configuration :

echo "My first test message" | mail -s "Proxmox alert test" somebody@somewhere.com

5. DIY HOME SERVER - PROXMOX Boot problem

After installing Proxmox VE on a ZFS (SSD) mirror, there may be a problem importing the ZFS Mirror Pool at boot time. It seems like the boot process is halted half way down the process.

In such cases you get into the busybox shell of initramfs by pressing the Enter key.

Type :
zpool import -N rpool
exit

The pool is now imported. The boot process continues until it reaches the login prompt.

This article shows how to fix the problem by inserting a short wait (SLEEP parameter). 

Open up a ssh session to the server, either from your computers terminal

C:\>ssh root@xxx.xxx.xxx.xxx

or use Putty.

Log in as user root and enter the password.

Type :
nano /etc/default/zfs

Scroll down to the bottom and add : 

# ZFS sleep parameters are set to 5 seconds
ZFS_INITRD_PRE_MOUNTROOT_SLEEP='5'
ZFS_INITRD_POST_MODPROBE_SLEEP='5'

Then press CTRL + O to save. Confirm.
Then press CTRL + X to exit.

Type :
update-initramfs -u
reboot
The system will reboot and the problem should be solved.

Depending on the number of harddisks your system is using, it’s possible you’ll have to set de delay to a larger value (10, 20 or even 30 seconds).

6. DIY HOME SERVER - PROXMOX PCIe Pass-through

PCI passthrough allows you to use a physical PCI device (hba controller, graphics card, network card) inside a VM (KVM virtualization only). If you “PCI passthrough” a device, the device is not available to the host anymore.

Follow one of the following articles to configure your system : 

In the next episode, we’ll install TRUENAS CORE as a virtual machine and passthrough the PCie HBA controller to it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.