Linux Systems Setup

Quid

Proxmox Virtual Environment (Proxmox VE or PVE) is a Virtualization platform designed for the provisioning of HCI (hyper-converged infrastructure: virtualized computing (a hypervisor) + virtualized storage + virtualized networking in a unified software-defined system).

Proxmox allows deployment and management of virtual machines (with KVM) and containers (with LXC). It is based on a modified Debian LTS kernel. It includes a web-based management interface.

Source: Wikipedia (edited)

Setup

UI Settings

Network:

  • Datacenters > “proxmox” > System > Network > Create/Edit interface as needed (e.g 192.168.137.11/24)

Activate and do updates:

Once NAS is available:

  • Mount an SMB share from NAS
  • Schedule backups (Datacenter > Backup > Add) with email reports

TODO: Notification System configuration

Terminal settings

Do some limited config for the root account, such as installing a couple of programs, setting up aliases and strengthening sshd. See Linux Systems Setup.

Wifi (if needed)

apt update && apt install wpasupplicant vim
systemctl disable wpa_supplicant
wpa_passphrase SSIDNAME PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf
dmesg | grep wlp # Write down DEVNAME such as wlp6s0
 
vim /etc/systemd/system/wpa_supplicant.service
### Add/edit
[Unit]
Description=WPA supplicant
Before=network.target
After=dbus.service
Wants=network.target
IgnoreOnIsolate=true
 
[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i DEVNAME
Restart=always
 
[Install]
WantedBy=multi-user.target
Alias=dbus-fi.w1.wpa_supplicant1.service
###
 
systemctl enable wpa_supplicant
 
vim /etc/network/interfaces
### Add
auto DEVNAME
iface DEVNAME inet manual
    address WISHED_IPADDRESS/24
    gateway 192.168.137.1
###
 
reboot # Or `systemctl restart wpa_supplicant && systemctl restart networking`

Ref: https://forum.proxmox.com/threads/howto-proxmox-ve-8-x-x-wifi-with-routed-configuration.147714/

IOMMU

Should be enabled by default for AMD processors.

Useful commands for dealing with (PCIe) disks:

ls -l /sys/block/nvme*/device # /sys/block/nvme1n1/device
 
lsblk -o NAME,FSTYPE,MOUNTPOINT,SIZE,MODEL
# nvme1n1                                             465.8G WD Blue SN580 500GB
# └─nvme1n1p3                  LVM2_member            464.8G
#   ├─pve-root                 ext4        /             96G
 
lspci # 01:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue SN580 NVMe SSD (DRAM-less) (rev 01)
 
udevadm info /dev/nvme5n1
# P: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/nvme/nvme1/nvme1n1
# M: nvme1n1
 
zpool status
systemctl status zfs-import-scan.service

Notes on cloning a VM

These things need to be changed on the new VM!

Change hostname in: /etc/hostname and /etc/hosts

Reset machine ID:

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

Regenerate ssh keys:

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