dhclient stucked when using guest additions (7.0.24) with Debian 12.9.0

Discussions about using Linux guests in VirtualBox.
Post Reply
brickb
Posts: 1
Joined: 14. Feb 2025, 12:25

dhclient stucked when using guest additions (7.0.24) with Debian 12.9.0

Post by brickb »

I created a guest box using Debian 12 with the unattended feature of vboxmanage. In the installation process I also install the guest additions (7.0.24 since it is the version I use on my host).

At first boot in NAT mode dhclient seems to be stucked and thus the basic network interfaces is not set up.

The only workaround is to kill dhclient and then ifup the interface again.

Since I want to use this box as a template for some other work and want it to be prepared non interactively, I found another workaround which consist in just adding the following line in the /etc/network/interfaces. With it the interfaces is bring up a little later and the boot works well again (but slower).

Code: Select all

pre-up /usr/bin/sleep 5
When no guest additions are installed at all, everything works fine. I guess that it seems that dhclient is started too soon, or before some guest additions service (vboxadd.service maybe).

This bad behavior seems very recent (I do not recall having to do the same thing ugly hacks 4 months ago).

Any idea where this problem comes from (Debian or Guest Additions) and most importantly how to fix it?

I created the box using the following lines:

Code: Select all

vboxmanage createvm --basefolder $HOME/vms --ostype Debian_64 --name debian-bookworm --register
vboxmanage createmedium disk --filename $HOME/vms/debian-bookworm/debian-bookworm-0.vdi --size 20480 --format VDI
vboxmanage storagectl debian-bookworm --name debian-bookworm-ctl --add scsi
vboxmanage storageattach debian-bookworm --storagectl debian-bookworm-ctl --port 0 --device 0 --type hdd --medium $HOME/vms/debian-bookworm/debian-bookworm-0.vdi
vboxmanage modifyvm debian-bookworm --memory 1024
vboxmanage modifyvm debian-bookworm --nat-pf1 "SSH,tcp,,2222,,22"
vboxmanage modifyvm debian-bookworm --drag-and-drop bidirectional
vboxmanage modifyvm debian-bookworm --clipboard-mode bidirectional
vboxmanage modifyvm debian-bookworm --graphicscontroller vmsvga
vboxmanage modifyvm debian-bookworm --vram 128
vboxmanage modifyvm debian-bookworm --description "Debian 12 (standard + ssh-server + fr)"
vboxmanage unattended install debian-bookworm --iso=debian-12.9.0-amd64-netinst.iso --locale=fr_FR --country=FR --script-template=preseed.cfg --post-install-template=postinstall
vboxmanage startvm debian-bookworm --type headless
The preseed.cfg and postinstall files are attached.
Attachments
postinstall.sh.txt
(1.52 KiB) Downloaded 8 times
preseed.cfg.txt
(2.48 KiB) Downloaded 1 time
Post Reply