Proxmox-VE offline installation

bolo101

New Member
Aug 13, 2024
3
0
1
Greetings,

I am currently working on a Bash script to automate the Proxmox VE installation on an offline Debian 12 setup. The goal is to enable a Proxmox installation on air-gapped systems.

My goal is to enable an offline installation while having GUI access on the server itself without using an additional machine to access the GUI.

I downloaded all the packages referred to in the Proxmox documentation explaining the installation of Proxmox over Debian 12 Bookworm, and everything is running smoothly. The issue I have is when I need to access the GUI. The bridge interface I use cannot get UP and stays DOWN despite having it set to "auto" in my /etc/network/interfaces.

Also on the first run I get an error with network restarting process. Note that it is run on a freshly installed Debian and no network connection as been made when the script is executed.


On a virtual machine, the system works thanks to the isolated network triggering the interface, but on a Debian installed on bare-metal, it does not work.

Any ideas?

For the bare-metal install, I had to set up the IP address manually and used the same address I use in my script for my bridge. Sometime I got an error message for services failing to start while they are installed.
Capture d’écran du 2024-08-14 14-44-00.png

I’ve included the code below.

If anybody has an idea about what the issue might be, please let me know. Otherwise if you guys have an existing method to get the job done I am all ears

Bash:
#!/bin/bash

# Variables
PACKAGE_DIR="/root/proxmox-ve-packages"

# Mise à jour du PATH
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin

# Récupérer la seconde interface réseau
    SECOND_INTERFACE=$(ip -o link show | awk -F': ' '{print $2}' | sed -n '2p')

  # Configurer l'adresse IP statique pour l'interface bridge
  cat <<EOL > /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto enp1s0
iface $SECOND_INTERFACE inet manual

# Bridge interface
auto vmbr0
iface vmbr0 inet static
    address 172.16.1.2/24
    gateway 172.16.1.1
    bridge_ports $SECOND_INTERFACE
    bridge_stp off
    bridge_fd 0
   
EOL

systemctl restart networking

echo "Network restarted"

# Installer les paquets à partir du répertoire local
dpkg -i $PACKAGE_DIR/*.deb

# Fixer les dépendances manquantes
apt -f install -y

# Installer Proxmox default kernel
if ! dpkg -l | grep -q 'proxmox-default-kernel'; then
  dpkg -i $PACKAGE_DIR/proxmox-default-kernel*.deb
  apt -f install -y
  echo "Kernel installed. Rebooting..."
  reboot
fi

# Vérifier si le script a déjà été exécuté et passé l'installation du kernel
if [ -f /root/proxmox_kernel_installed ]; then
  export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
 
  # Installer les autres paquets
  dpkg -i $PACKAGE_DIR/*.deb
  apt -f install -y

  # Nettoyer les anciennes images de noyau
  apt remove -y linux-image-amd64 'linux-image-6.1*'
  update-grub
  apt remove -y os-prober
 
  # Configurer le stockage pour Proxmox
  cat <<EOL > /etc/pve/storage.cfg
dir: local
    path /var/lib/vz
    content iso,backup,vztmpl
    maxfiles 3
EOL



  # Appliquer les changements de réseau
  systemctl restart networking

  # Configurer le démarrage automatique des services Proxmox
  systemctl enable pvedaemon
  systemctl enable pveproxy
  systemctl enable pvestatd

  echo "Proxmox VE installation complete."
else
  # Marquer que le kernel a été installé et le script doit continuer après reboot
  touch /root/proxmox_kernel_installed
  echo "Please reboot the system to continue with the Proxmox VE installation."
fi
 
I cannot join the zip file containing the packages, the command I used is
Bash:
apt-get install --download-only --reinstall -o Dir::Cache::archives=$(pwd) \
  proxmox-default-kernel proxmox-ve postfix open-iscsi chrony grub2-common -y
 
I am currently working on a Bash script to automate the Proxmox VE installation on an offline Debian 12 setup. The goal is to enable a Proxmox installation on air-gapped systems.

My goal is to enable an offline installation while having GUI access on the server itself without using an additional machine to access the GUI.
You might find the possibility of the unattended installation with the official ISO interesting. This is possible since the release of the Proxmox VE 8.2 ISO.

Code:
bridge_ports $SECOND_INTERFACE
bridge_stp off
bridge_fd 0
Normally these are called bridge-ports, bridge-stp and bridge-fd -- so a dash instead of an underscore. Although I'm not sure if ifupdown2 accepts both variants.

Anyway, the error message in the screenshot clearly says that these services are not installed, neither do you seem to install them anywhere in your script. You need to install the proxmox-ve package, which pulls in all required packages.

We have a dedicated wiki page explaining all steps in detail, please ensure you followed all of them: Install Proxmox VE on Debian 12 Bookworm
 
Thanks for your answer cheiss, I will have a look at the first link. I already followed the second one and I listed all the packages I installed during my script. proxmox-ve package is correctly installed. The 'missing' packages are also installed but fail to load causing the above error. I
Code:
alsa-topology-conf_1.2.5.1-2_all.deb
.deb

proxmox-archive-keyring_3.0_all.deb
proxmox-backup-client_3.2.7-1_amd64.deb
proxmox-backup-file-restore_3.2.7-1_amd64.deb
proxmox-backup-restore-image_0.6.1_amd64.deb
proxmox-default-kernel_1.1.0_all.deb
proxmox-firewall_0.5.0_amd64.deb
proxmox-kernel-6.8.12-1-pve-signed_6.8.12-1_amd64.deb
proxmox-kernel-6.8_6.8.12-1_all.deb
proxmox-kernel-helper_8.1.0_all.deb
proxmox-mail-forward_0.2.3_amd64.deb
proxmox-mini-journalreader_1.4.0_amd64.deb
proxmox-offline-mirror-docs_0.6.6_all.deb
proxmox-offline-mirror-helper_0.6.6_amd64.deb
proxmox-termproxy_1.1.0_amd64.deb
proxmox-ve_8.2.0_all.deb
proxmox-websocket-tunnel_0.2.0-1_amd64.deb
proxmox-widget-toolkit_4.2.3_all.deb
psmisc_23.6-1_amd64.deb
pve-cluster_8.0.7_amd64.deb
pve-container_5.1.12_all.deb
pve-docs_8.2.3_all.deb
pve-edk2-firmware-legacy_4.2023.08-4_all.deb
pve-edk2-firmware-ovmf_4.2023.08-4_all.deb
pve-esxi-import-tools_0.7.1_amd64.deb
pve-firewall_5.0.7_amd64.deb
pve-firmware_3.13-1_all.deb
pve-ha-manager_4.0.5_amd64.deb
pve-i18n_3.2.2_all.deb
pve-lxc-syscalld_1.3.0_amd64.deb
pve-manager_8.2.4_amd64.deb
pve-qemu-kvm_9.0.2-2_amd64.deb
pve-xtermjs_5.3.0-3_all.deb
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!