Debian 11 Server and VirtualBox 7

Download and install VirtualBox 7
https://www.virtualbox.org/wiki/Downloads

Install VirtualBox extension pack
Just double click on the *.vbox-extpack file

Download Debian netinstall ISO and install as usual
https://www.debian.org/distrib/netinst

Install dynamic kernel modules, kernel headers and compiler

apt install dkms linux-headers-$(uname -r) build-essential

Install libxt6 and libxmu6

apt install libxt6 libxmu6

Install VirtualBox Guest Addition

Mount Guest Addition ISO

mount /dev/cdrom /media/cdrom
mount: /media/cdrom0: WARNING: source write-protected, mounted read-only.

Install it

cd /media/cdrom
./VBoxLinuxAdditions.run

Reboot and test the installation

VBoxClient --version
7.08r156879
modinfo vboxguest
filename:       /lib/modules/5.10.0-23-amd64/misc/vboxguest.ko
version:        7.0.8 r156879
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle and/or its affiliates
srcversion:     55B45B43FE1759D12174E93
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:        
retpoline:      Y
name:           vboxguest
vermagic:       5.10.0-23-amd64 SMP mod_unload modversions

Allow sudo for user

visudo
username ALL=(ALL) NOPASSWD: ALL

Replace “username” with the username of the sudoer.

Rename network interface and set console to 1024×768

nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet vga=792"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Update grub

update-grub2

Edit interface configuration file

nano /etc/network/interfaces
# The primary network interface
#allow-hotplug enp0s3
#iface enp0s3 inet dhcp

allow-hotplug eth0
iface eth0 inet dhcp

Reboot

Setup Nameservers

Debian 11 is using resolvconf, check status

service resolvconf status

If the status is Active: active (exited) then everything is fine.

Add your nameservers in /etc/resolvconf/resolv.conf.d/head

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.

# nano /etc/resolvconf/resolv.conf.d/head

#nameserver 127.0.0.1
nameserver 192.168.0.2
nameserver 192.168.0.4
search lan

Update resolv.conf

resolvconf --enable-updates
resolvconf -u

review resolv.conf

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.

# nano /etc/resolvconf/resolv.conf.d/head

#nameserver 127.0.0.1
nameserver 192.168.0.2
nameserver 192.168.0.4
search lan

Make resolv.conf persistent after reboot

crontab -e
@reboot /usr/sbin/resolvconf -u

Continue with ISPConfig installation.