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 jagdpanther » 23. Oct 2021, 00:36

Virtualbox-6.1.26 was working without issue on Linux kernel 5.14.14. I upgraded to virtualbox-6.1.28. Now when I launch a VM that uses host-only networking, the host's VirtualBox network device (ex: vboxnet0) no longer is assigned its IP address. The address is still listed in VirtualBox's "Host Network Manager" but it is not assigned. As root on the host, I can run "ip add .... dev vboxnet0" to solve the issue and then the VM can "talk" to the host.

I have this same issue on both of my Linux hosts. (Same version of Virtualbox and Linux kernel.)

Any idea why the VirtualBox host-only network devices on the host no longer are assigned an IP at VM startup?

(I have reverted to Virtualbox-6.1.26 which is working without issue and the Virtualbox host-only network devices are assigned their configured IPs.)
jagdpanther
 
Posts: 36
Joined: 2. Aug 2009, 01:45
Primary OS: PCLinuxOS
VBox Version: OSE other
Guest OSses: Windows10, Linux

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

Postby fth0 » 23. Oct 2021, 12:09

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.
fth0
Volunteer
 
Posts: 2627
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...


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

Postby jagdpanther » 25. Oct 2021, 19:08

challengeursli: Thanks for the link.

I should have read the VirtualBox-6.1.28 change log more carefully. I think this line applies:
Network: More administrative control over network ranges, see user manual
jagdpanther
 
Posts: 36
Joined: 2. Aug 2009, 01:45
Primary OS: PCLinuxOS
VBox Version: OSE other
Guest OSses: Windows10, Linux

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

Postby jagdpanther » 25. Oct 2021, 21:00

Creating the /etc/vbox/networks.conf file did NOT solve this issue for me. My /etc/vbox networks.conf contains the following (excluding some commented lines at the top):
Code: Select all   Expand viewCollapse view
* 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12

# * 0.0.0.0/0 ::/0


I have tried the following on my Linux host (running kernel 5.14.14):
1. Re-installing virtualbox.
2. removing the three virtualbox kernel modules and putting them back with "modprobe -r <module>" and "modprobe <module" for
vboxdrv, vboxnetadp, and vboxnetflt
3. In the Virtualbox "Host Network Manager" removing all the vboxnet* devices and putting them back. However, I am no longer allowed to change the default IP suppllied by the "Host Network Manager" I receive a little error window when I do stating: "Failed to save host network interface parameter" Details: Callee RC: NS_ERROR_FAILURE (0x80004005)"
4. Trying different entries in /etc/vbox/networks.conf. (Including "* 0.0.0.0/0" which according to the docs should allow any IPV4 address.)

In all cases when Virtualbox is launched, if they don't already exist, I see the network devices added, without assigned IPs and in the down state. (Ex vboxnet0). When I launch a VM, the host-only network device (ex: vboxnet0) stays "down" and no IP is assigned. (I can add an IP by hand (as root, "ip addr add ...") and bring the device UP to get networking working.

I also see entries in /var/log/messages like the following. (In this case I assigned the IP by hand in a previous attempt.)
Code: Select all   Expand viewCollapse view
Oct 25 11:53:39 fangorn kernel: vboxdrv: 00000000cf9ae7cc VMMR0.r0
Oct 25 11:53:39 fangorn kernel: VBoxNetAdpCtl[59927]: segfault at 0 ip 000056407deadc44 sp 00007ffe88286310 error 4 in VBoxNetAdpCtl[56407deac000+4000]
Oct 25 11:53:39 fangorn kernel: Code: ff 48 8b bd 98 fb ff ff be 00 04 00 00 e8 f4 e5 ff ff 48 85 c0 0f 84 db 01 00 00 48 8b bd 98 fb ff ff 48 89 de e8 dc e4 ff ff <80> 38 2a 0f 85 e3 00 00 00 80 78 01 00 0f 85 d9 00 00 00 66 0f 1f
Oct 25 11:53:39 fangorn kernel: vboxdrv: 0000000018273ff1 VBoxDDR0.r0
Oct 25 11:53:39 fangorn kernel: VBoxNetFlt: attached to 'vboxnet0' / 0a:00:27:00:00:00
Oct 25 11:53:39 fangorn kernel: vboxdrv: 00000000220e232f VBoxEhciR0.r0
Oct 25 11:53:39 fangorn kernel: VMMR0InitVM: eflags=246 fKernelFeatures=0x0 (SUPKERNELFEATURES_SMAP=0)
Oct 25 11:53:39 fangorn kernel: device vboxnet0 entered promiscuous mode
Oct 25 11:53:41 fangorn ntpd[2729]: Listen normally on 16 vboxnet0 192.168.15.1:123
Oct 25 11:53:41 fangorn ntpd[2729]: Listen normally on 17 vboxnet0 [fe80::800:27ff:fe00:0%14]:123


Any suggestions?
jagdpanther
 
Posts: 36
Joined: 2. Aug 2009, 01:45
Primary OS: PCLinuxOS
VBox Version: OSE other
Guest OSses: Windows10, Linux

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

Postby aleksey-vb » 26. Oct 2021, 18:04

There is a bug in VBoxNetAdpCtl that stumbles on empty lines. It will be fixed in the next maintenance release. A workaround solution is to remove all empty lines in /etc/vbox/networks.conf.
aleksey-vb
Oracle Corporation
 
Posts: 22
Joined: 23. May 2012, 09:38

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

Postby jagdpanther » 26. Oct 2021, 20:21

Thanks aleksey-vb.

Solved. (I would prepend the subject in my original message with [SOLVED] but there seems to not be an edit button on that message.)

There were three issues with HostOnly networks when migrating Virtualbox-6.1.28.

1. I needed to create a /etc/vbox/networks.conf file as described in the Virtualbox-6.1.28 user manual on page 116.

2. I needed to remove all blank lines from /etc/vbox/networks.conf file. As user aleksey-vb points out:
There is a bug in VBoxNetAdpCtl that stumbles on empty lines. It will be fixed in the next maintenance release. A workaround solution is to remove all empty lines in /etc/vbox/networks.conf.


3. I removed and added back all of the VirtualBox HostOnly networks using the VirtualBox "Host Network Manager"

Now Virtualbox-6.1.28 is working as expected.
jagdpanther
 
Posts: 36
Joined: 2. Aug 2009, 01:45
Primary OS: PCLinuxOS
VBox Version: OSE other
Guest OSses: Windows10, Linux

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

Postby gordonplay » 27. Oct 2021, 05:01

jagdpanther wrote:Thanks aleksey-vb.

Solved. (I would prepend the subject in my original message with [SOLVED] but there seems to not be an edit button on that message.)

There were three issues with HostOnly networks when migrating Virtualbox-6.1.28.

1. I needed to create a /etc/vbox/networks.conf file as described in the Virtualbox-6.1.28 user manual on page 116.

2. I needed to remove all blank lines from /etc/vbox/networks.conf file. As user aleksey-vb points out:
There is a bug in VBoxNetAdpCtl that stumbles on empty lines. It will be fixed in the next maintenance release. A workaround solution is to remove all empty lines in /etc/vbox/networks.conf.


3. I removed and added back all of the VirtualBox HostOnly networks using the VirtualBox "Host Network Manager"

Now Virtualbox-6.1.28 is working as expected.


Thanks jagdpanther and everyone, it is work for me.
gordonplay
 
Posts: 5
Joined: 26. Jun 2019, 12:52

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

Postby basti2dkd » 27. Oct 2021, 12:22

Hi,
I have no vbox folder in the etc/ folder :(
what can i do?
basti2dkd
 
Posts: 1
Joined: 27. Oct 2021, 12:20

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

Postby challengeursli » 27. Oct 2021, 12:29

Just create it manually. Also create the file manually.
challengeursli
 
Posts: 20
Joined: 21. Oct 2021, 14:52

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

Postby aleksey-vb » 27. Oct 2021, 14:54

basti2dkd wrote:Hi,
I have no vbox folder in the etc/ folder :(
what can i do?

Do you get VBoxNetAdpCtl crashes with no '/etc/vbox' present on your system? If so, could you run
Code: Select all   Expand viewCollapse view
./VBoxNetAdpCtl -n vboxnet0 192.168.56.1 netmask 255.255.255.0
from command line? It is located in the the VirtualBox installation folder along with other VirtualBox binaries. Make sure to replace vboxnet0 with the actual interface name you are trying to configure, replace IP address/netmask with the actual values as well. If it indeed crashes, please create a bug in the public bugtracker (which is a preferred way) or post a reply here. Generally there is no need in '/etc/vbox/networks.conf' if 192.168.56.0/21 range is used. It is only needed to provide access to other ranges.
aleksey-vb
Oracle Corporation
 
Posts: 22
Joined: 23. May 2012, 09:38

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

Postby scottgus1 » 27. Oct 2021, 17:34

@aleksey, I'm curious: could you please let us know why this change to predetermined host-only ranges was made?
scottgus1
Site Moderator
 
Posts: 13820
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: No registered users and 23 guests