Virtualbox-6.1.28 Does Not Assign IPs to HostOnly Network

Discussions related to using VirtualBox on Linux hosts.

Virtualbox-6.1.28 Does Not Assign IPs to HostOnly Network

Postby Alvagante » 24. Oct 2021, 09:25

Same problem here.
Ubuntu 20.04.3, kernel 5.4.0-89-generic (but had the same problem on 5.4.0-77-generic), AMD Ryzen 9 3900 12-Core Processor, Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

On syslog, when starting vbox service everything seems fine and modules are loaded:
Oct 24 08:42:11 lab vboxdrv.sh: Starting VirtualBox services.
Oct 24 08:42:11 lab vboxdrv.sh: Building VirtualBox kernel modules. dme
Oct 24 08:42:20 lab vboxdrv.sh: VirtualBox kernel modules built.
Oct 24 08:42:20 lab kernel: [ 400.740655] vboxdrv: Found 24 processor cores
Oct 24 08:42:20 lab kernel: [ 400.760096] vboxdrv: TSC mode is Invariant, tentative frequency 3094151042 Hz
Oct 24 08:42:20 lab kernel: [ 400.760097] vboxdrv: Successfully loaded version 6.1.28 r147628 (interface 0x00320000)
Oct 24 08:42:20 lab kernel: [ 400.963396] VBoxNetFlt: Successfully started.
Oct 24 08:42:20 lab kernel: [ 400.965202] VBoxNetAdp: Successfully started.
Oct 24 08:42:20 lab vboxdrv.sh: VirtualBox services started.

When a VM is started:
Oct 24 08:42:40 lab kernel: [ 420.499285] SUPR0GipMap: fGetGipCpu=0x3b
Oct 24 08:42:40 lab kernel: [ 420.538162] vboxdrv: 0000000000000000 VMMR0.r0
Oct 24 08:42:40 lab kernel: [ 420.600439] VBoxNetFlt: attached to 'vboxnet0' / 0a:00:27:00:00:00
Oct 24 08:42:40 lab kernel: [ 420.600562] device vboxnet0 entered promiscuous mode
Oct 24 08:42:40 lab kernel: [ 420.629974] vboxdrv: 0000000000000000 VBoxDDR0.r0
Oct 24 08:42:40 lab kernel: [ 420.649694] VMMR0InitVM: eflags=246 fKernelFeatures=0x0 (SUPKERNELFEATURES_SMAP=0)

vboxnet interfaces appear but look down, without IP addresses assigned
8: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
9: vboxnet1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff

After downgrading to 6.1.26 everything is back to normal:

Oct 24 08:57:10 lab vboxdrv.sh: Starting VirtualBox services.
Oct 24 08:57:10 lab vboxdrv.sh: Building VirtualBox kernel modules.
Oct 24 08:57:19 lab vboxdrv.sh: VirtualBox kernel modules built.
Oct 24 08:57:19 lab kernel: [ 1299.908439] vboxdrv: Found 24 processor cores
Oct 24 08:57:19 lab kernel: [ 1299.925187] vboxdrv: TSC mode is Invariant, tentative frequency 3094147297 Hz
Oct 24 08:57:19 lab kernel: [ 1299.925188] vboxdrv: Successfully loaded version 6.1.26 r145957 (interface 0x00300000)
Oct 24 08:57:19 lab kernel: [ 1300.128695] VBoxNetFlt: Successfully started.
Oct 24 08:57:19 lab kernel: [ 1300.130302] VBoxNetAdp: Successfully started.
Oct 24 08:57:19 lab vboxdrv.sh: VirtualBox services started.
Oct 24 08:57:19 lab systemd[1]: Starting VirtualBox Linux kernel module...
Oct 24 08:57:20 lab vboxdrv.sh[26556]: vboxdrv.sh: Starting VirtualBox services.
Oct 24 08:57:20 lab vboxdrv.sh: Starting VirtualBox services.
Oct 24 08:57:20 lab vboxdrv.sh: VirtualBox services started.
Oct 24 08:57:20 lab systemd[1]: Started VirtualBox Linux kernel module.
Oct 24 08:57:20 lab systemd[1]: Starting vboxballoonctrl-service.service...
Oct 24 08:57:20 lab systemd[1]: Started vboxballoonctrl-service.service.
Oct 24 08:57:20 lab systemd[1]: Starting vboxautostart-service.service...
Oct 24 08:57:20 lab systemd[1]: Started vboxautostart-service.service.
Oct 24 08:57:20 lab systemd[1]: Starting vboxweb-service.service...
Oct 24 08:57:20 lab systemd[1]: Started vboxweb-service.service.

and when a VM is started:
Oct 24 08:57:48 lab kernel: [ 1329.026660] SUPR0GipMap: fGetGipCpu=0x3b
Oct 24 08:57:48 lab kernel: [ 1329.065516] vboxdrv: 0000000000000000 VMMR0.r0
Oct 24 08:57:48 lab systemd-networkd[777]: vboxnet0: Link UP
Oct 24 08:57:48 lab systemd-networkd[777]: vboxnet0: Gained carrier
Oct 24 08:57:48 lab kernel: [ 1329.115512] VBoxNetFlt: attached to 'vboxnet0' / 0a:00:27:00:00:00
Oct 24 08:57:48 lab kernel: [ 1329.115683] device vboxnet0 entered promiscuous mode
Oct 24 08:57:49 lab kernel: [ 1329.166707] vboxdrv: 0000000000000000 VBoxDDR0.r0
Oct 24 08:57:49 lab kernel: [ 1329.184747] VMMR0InitVM: eflags=246 fKernelFeatures=0x0 (SUPKERNELFEATURES_SMAP=0)

and on the host the IP appears on the interface
8: vboxnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 10.42.43.1/24 brd 10.42.43.255 scope global vboxnet0
valid_lft forever preferred_lft forever
9: vboxnet1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff
Alvagante
 
Posts: 1
Joined: 24. Oct 2021, 08:59

Re: Virtualbox-6.1.28 Does Not Assign IPs to HostOnly Network

Postby scottgus1 » 24. Oct 2021, 15:12

Do not hijack other threads, create your own. Choose your title carefully.

fth0 wrote:Please post a zip file containing the contents of ~/.config/VirtualBox, which contains the configuration and log files for the Host-only Networking.

A minor hint just in case you don't have noticed it already: Note that both VirtualBox versions (6.1.26 and 6.1.28) only assign the IP address to a Host-only Adapter when the first VM using it is started, so don't check it too early.
scottgus1
Site Moderator
 
Posts: 13866
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualbox-6.1.28 Does Not Assign IPs to HostOnly Network

Postby challengeursli » 25. Oct 2021, 13:00

This is a documented change in version 6.1.28, but pretty well hidden imho.

See:
Network: More administrative control over network ranges, see user manual


We hit the same issue, but found out we can fix it as described here:

On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.68.56.0/21 range to be assigned to host-only adapters. For IPv6 only link-local addresses are allowed. If other ranges are desired, they can be enabled by creating /etc/vbox/networks.conf and specifying allowed ranges there. For example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as 2001::/64 range put the following lines into /etc/vbox/networks.conf:

* 10.0.0.0/8 192.168.0.0/16
* 2001::/64


(I couldn't post the URLs because of "You must be a member for 1 days and have 1 posts before you can post urls." :/
challengeursli
 
Posts: 20
Joined: 21. Oct 2021, 14:52

Re: Virtualbox-6.1.28 Does Not Assign IPs to HostOnly Network

Postby scottgus1 » 27. Oct 2021, 00:30

Please see viewtopic.php?f=7&t=104198 where the info above from 'challengeursli' and some more bug workaround from 'aleksey-vb' gets host-only networks working again.
scottgus1
Site Moderator
 
Posts: 13866
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: rools and 30 guests