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.

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
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.

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