How to configure Proxmox
Overview
This guide will show you how to perform the initial configuration of a fresh install of Proxmox VE, version 6.3-3 at the time of writing.
This guide assumes knowledge of vim
and basic Linux administration. It also assumes that you have installed the OS as a ZFS
filesystem.
It’s absolutely critical that the PVE OS was installed as a
UEFI
OS. Usually in the boot menu in theBIOS/UEFI
menu, it will show the installer USB disk asUEFI: <Installer USB Drive>
If you need help with the installation of Proxmox VE
, you can check out the previous setup post here.
Sometimes you may boot into an (initramfs)
, run these commands: zpool import -R / rpool
then exit
.
At this time, browse to: https://<pve-ip:8006>
Verify UEFI Boot and OS Version
Check to see that PVE
has in fact booted into UEFI
mode:
efibootmgr -v
Look for something along these lines:
BootCurrent: 0007
...
Boot0007* UEFI OS HD(2,GPT,<disk-uuid>)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Check the installed version (Should read at least 6.3-X
):
pveversion
Enable No-Subscription Repository
Proxmox VE No-Subscription Repository Documentation
-
Login to the
pve
hypervisor:ssh root@<pve-ip>
-
Enable the No-Subscription repositories
# vi /etc/apt/sources.list
Before:
deb http://ftp.us.debian.org/debian buster main contrib deb http://ftp.us.debian.org/debian buster-updates main contrib # security updates deb http://security.debian.org buster/updates main contrib
After:
deb http://ftp.us.debian.org/debian buster main contrib deb http://ftp.us.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
Save and exit.
-
Disable Proxmox VE Enterprise Repository
vi /etc/apt/sources.list.d/pve-enterprise.list
Before:
deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
After:
# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
Save and exit.
-
Run update and install basic tools
apt update apt update && apt install vim tmux parted
-
Upgrade PVE OS Packages
apt upgrade apt dist-upgrade
Nested Virtualization
Enable Nested Hardware-assisted Virtualization
Make sure that there are no running VMs at this time.
-
Check to see if it has been enabled. At this point it should show
N
cat /sys/module/kvm_intel/parameters/nested
-
Add the Nested Virtualization Kernel Module
Only run one of these commands below
If you have an Intel processor:
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
If you have an AMD processor:
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
-
Load the Kernel Module
modprobe -r kvm_intel modprobe kvm_intel
-
Verify that it has been enabled. Should show
Y
cat /sys/module/kvm_intel/parameters/nested
Install Cloud-Init
At this point, let’s just install cloud-init
, more information can be found in another post.
-
Install package
apt install cloud-init
(Optional) ZFS Imports
Most PVE
hypervisors are configured to use disks as VM/Container storage, but in this case we want to use additional ZFS Pools
for data storage that can be mounted/shared with VMs and Containers.
- If no pools have been created, follow the instructions here.
-
Import pools
zpool import -f <pool-name>
-
Enable
ZFS
Scan and import services on bootEnable
zfs
import services:systemctl enable zfs-import-scan.service systemctl enable zfs-import.target
Update
initramfs
:update-initramfs -u -k all
(Optional) Install NFS Server
Most guides recommend using an external NFS server or appliance OS, which is preferred if running as a PVE Cluster
as it allows for migration across hypervisors.
This guide configures the hypervisor as an all-in-one server.
Here’s how to install and configure NFS Server:
-
Install NFS Server
apt update apt install nfs-common nfs-kernel-server
-
Configure Server
vim /etc/exports
Add NFS exports (shares) to end of the file:
<share-path> <network, e.g. 192.168.1.0>/255.255.255.0(rw,no_root_squash,subtree_check)
-
Export and check setup:
Export all shares:
exportfs -a
List all shared mounts:
showmount -e <ip-of-pve-host>
(Optional) Add Networking Tools
If there is a need to add additional networks to the PVE
hypervisor, install these packages
-
Install these packages
apt install ifupdown2 tcpdump
-
Configure secondary network bridge
Navigate to
<pve-hostname>, System, Network, Create, Linux Bridge
Add the following:
IPv4/CIDR: <subnet-to-add>/24 Bridge ports: <bridge-interface>
Be sure to NOT add the gateway
-
Click
Apply Configuration
(Optional) Install Dark Theme
Install the Dark Theme like this:
# Oneliner
bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install
# OR manual
wget https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh
bash PVEDiscordDark.sh install
[~] PVEDiscordDark Utility
[I] Install theme
[Q] Exit
>? I
[~] PVEDiscordDark Utility
Backing up index template file..
Downloading stylesheet..
Downloading patcher..
Applying stylesheet and patcher..
Downloading images [22/22]..
Theme installed successfully!
Press [ENTER] to go back. <ENTER>
[~] PVEDiscordDark Utility
[I] Install theme
[U] Uninstall theme
[Q] Exit
>? Q
Final Steps
After performing all the selected steps above, reboot the machine and verify that everything is set up correctly.
reboot