fix: Disable PXE boot on VirtualBox NICs

Add --nicbootprio1 0 and --nicbootprio2 0 to prevent VirtualBox
from attempting network boot when hard disk boot fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-04-08 19:08:56 +02:00
parent 1cddcf6732
commit 33d287c563
2 changed files with 12 additions and 3 deletions

View File

@ -88,11 +88,12 @@ VBoxManage modifyvm "${VM_NAME}" \
--boot1 disk --boot2 none --boot3 none --boot4 none
# Configurer réseau : 2 interfaces
# Adapter 1 : NAT (WAN)
# Adapter 1 : NAT (WAN) - PXE boot disabled
VBoxManage modifyvm "${VM_NAME}" \
--nic1 nat \
--nictype1 virtio \
--cableconnected1 on
--cableconnected1 on \
--nicbootprio1 0
# Adapter 2 : Host-Only (LAN) - créer si nécessaire
HOSTONLY_NET=$(VBoxManage list hostonlyifs | grep "^Name:" | head -1 | awk '{print $2}')
@ -106,7 +107,8 @@ VBoxManage modifyvm "${VM_NAME}" \
--nic2 hostonly \
--hostonlyadapter2 "${HOSTONLY_NET}" \
--nictype2 virtio \
--cableconnected2 on
--cableconnected2 on \
--nicbootprio2 0
log "Réseau configuré : NAT (WAN) + Host-Only (LAN)"

View File

@ -8,3 +8,10 @@ if command -v pypy3compile >/dev/null 2>&1; then
fi
# End automatically added section
# Automatically added by dh_installtmpfiles/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "$(command -v systemd-tmpfiles)" ]; then
systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create secubox.conf || true
fi
fi
# End automatically added section