Post

Before I do anything on Proxmox, I do this first...

After setting up my Proxmox servers, there are a few things I do before I use them for their intended purpose.This ranges from updates, to storage, to networking and VLANS, to uploading ISOs, to clustering, and more.Join me as we pick up where the rest of the proxmox tutorials stop, and that’s everything you need to do to make these production ready (and maybe a bonus item too).

📺 Watch Video

Updates

Edit /etc/apt/sources.list

Proxmox Version 6.X

1
2
3
4
5
6
7
8
9
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

# not for production use
deb http://download.proxmox.com/debian buster pve-no-subscription

Proxmox Version 7.X

(for a full guide on Proxmox 7, please see this link)

1
2
3
4
5
6
7
8
9
10
deb http://ftp.debian.org/debian bullseye main contrib

deb http://ftp.debian.org/debian bullseye-updates main contrib

# security updates
deb http://security.debian.org/debian-security bullseye-security main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription

Edit /etc/apt/sources.list.d/pve-enterprise.list

1
# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise

Proxmox Version 8.X

Create a file at /etc/apt/sources.list.d/pve-no-enterprise.list with the following contents:

1
2
# not for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

If you’re looking to upgrade to Proxmox 8, see this post

Run

1
apt-get update
1
apt dist-upgrade
1
reboot

Storage

BE CAREFUL.This will wipe your disks.

1
fdisk /dev/sda

Then P for partition, then D for delete, then W for write.

Check SMART Monitoring

1
smartctl -a /dev/sda

IOMMU (PCI Passthrough)

See Proxmox PCI Passthrough

nano /etc/kernel/cmdline

add intel_iommu=on iommu=pt to the end of this line without line breaks

1
root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt

Edit /etc/modules

1
2
3
4
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

run

1
update-initramfs -u -k all

then reboot

1
reboot

VLAN Aware

If you want to restrict your VLANS

1
nano /etc/network/interfaces

Set your VLAN here

1
2
bridge-vlan-aware yes
bridge-vids 20

NIC Team Example

1
nano /etc/network/interfaces
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
auto eno1
iface eno1 inet manual

auto eno2
iface eno2 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.11/24
        gateway 192.168.0.1
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
#lacp nic team

If you’re running Proxmox 7, see the modified config here for LAGG / LACP

Cloning

These are the commands I run after cloning a Linux machine so that it resets all information for the machine it was cloned from.

(Note: If you use cloud-init-aware OS images as described under Cloud-Init Support on https://pve.proxmox.com/pve-docs/chapter-qm.html, these steps won’t be necessary!)

change hostname

1
sudo nano  /etc/hostname
  • find your hostname and change it

change hosts file

  • find your hostname and change it
1
sudo nano /etc/hosts

reset machine ID

1
2
3
rm -f /etc/machine-id /var/lib/dbus/machine-id
dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure

regenerate ssh keys

1
2
3
regen ssh keys
sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server

reboot

Alerts

I’ve added yet another item to my list when setting up a new Proxmox server, and that’s setting up alerts!

⚙️ See all the hardware I recommend at https://l.technotim.live/gear

🚀 Don’t forget to check out the 🚀Launchpad repo with all of the quick start source files

This post is licensed under CC BY 4.0 by the author.