VirtualBox

Ticket #4014 (reopened defect)

Opened 5 years ago

Last modified 4 years ago

Cannot create multiple host only networks => Fixed in SVN

Reported by: hawaiian717 Owned by:
Priority: major Component: network
Version: VirtualBox 2.2.2 Keywords:
Cc: Guest type: other
Host type: other

Description (last modified by frank) (diff)

It's not possible to create additional host only networks on Mac OS X 10.5 and CentOS 5.3 hosts. The option to do so in the Preferences panel is disabled, as shown in the attached screenshot, so clicking on it does nothing.

There was some discussion of this topic on the forums  here.

Attachments

hostonlynetwork.png Download (57.1 KB) - added by hawaiian717 5 years ago.
Screenshot showing disabled buttons to create a host only network
hostonlyif_setup.png Download (80.1 KB) - added by Enno 5 years ago.
Setup of vboxnet1
hostonlyif_ifconfig.png Download (137.1 KB) - added by Enno 5 years ago.
ifconfig of vboxnet1 showing the correct settings as long as the vm is off
hostonlyif_ifconfig_afterStartup.png Download (228.9 KB) - added by Enno 5 years ago.
ifconfig showing vboxnet1 using the settings of vboxnet0 after starting the vm up
fake_router.xml Download (3.8 KB) - added by Enno 5 years ago.
XML config of machine using vboxnet1
VBox.log Download (34.9 KB) - added by Enno 5 years ago.
VBox.log of the machine using vboxnet1 (or as you can see in reality it uses vboxnet0)

Change History

Changed 5 years ago by hawaiian717

Screenshot showing disabled buttons to create a host only network

comment:1 Changed 5 years ago by frank

  • Description modified (diff)
  • Summary changed from cannot create multiple host only networks to Cannot create multiple host only networks => Fixed in SVN

This is less a bug than a missing feature. Even on Linux you can't create additional host-only adapters with the current version. This will be fixed in a future release of VBox (and the code for this is actually already in the public SVN).

comment:2 Changed 5 years ago by hawaiian717

Thanks, I'll check out SVN and try to get it built on CentOS (already found the instructions page). Is there an estimate on when this will go into a released version?

comment:3 Changed 5 years ago by hawaiian717

Just built VirtualBox from SVN (Version 2.2.51_OSE r19819) on CentOS 5.3. The button to add a host only network is active in the GUI, but when I click it, I get an error:

Failed to create the host-only network interface.

Failed to execute 'VBoxNetAdbCtl add' (exit status: 768)...

Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
HostNetworkInterface
Interface: 
IHostNetworkInterface {ce6fae58-7642-4102-b5db-c9005c2320a8}

comment:4 Changed 5 years ago by frank

This works only if you did a hardened build. And VBoxNetAdpCtl must be SUID root.

comment:5 Changed 5 years ago by hawaiian717

Did a hardened build (r19852), but I get the same error. I checked the permissions on VBoxNetAdpCtl and they look correct:

# ll VBoxNetAdpCtl 
-r-s--x--x 1 root root 15538 May 20 11:18 VBoxNetAdpCtl

I tried running the program directly, it looks like the device is missing:

# ./VBoxNetAdpCtl add
VBoxNetAdpCtl: failed to open /dev/vboxnetctl: No such file or directory
# ll /dev/vbox*
crw------- 1 root root 10, 62 May 20 11:51 /dev/vboxdrv

comment:6 Changed 5 years ago by frank

That means that you didn't load the vboxnetadp kernel driver.

comment:7 Changed 5 years ago by hawaiian717

Thanks, once I got that driver and the vboxnetflt loaded, I was able to create the networks using the GUI.

However, now I'm running into another issue. I have three host only networks (vboxnet0, vboxnet1, and vboxnet2), all running with DHCP disabled and using different addresses in different subnets. Running ifconfig on the host shows the correct addresses. However, once I start a guest (either through the VirtualBox GUI or using VBoxManage startvm, all three networks show the vboxnet0 address when I run ifconfig on the host.

comment:8 follow-up: ↓ 12 Changed 5 years ago by MrX1980

Please try it with v3.0.0 again.

comment:9 Changed 5 years ago by hawaiian717

I'm not able to; I'm no longer using VirtualBox as I was able to get the setup I needed working with KVM and libvirt.

comment:10 Changed 5 years ago by sandervl73

  • Status changed from new to closed
  • Resolution set to fixed

comment:11 Changed 5 years ago by Enno

  • Status changed from closed to reopened
  • Resolution fixed deleted

I have got the same problem (once starting a guest the networks use the adress of vboxnet0). VirtualBox 3.0.2 r49928. I added another hostonly-Network (vboxnet1) using the GUI and gave it the IP/net 192.168.66.1/24. Everything ist fine after that and ifconfig vboxnet1 shows the right config. But as soon as I start the virtual machine using that hostonlyif, the settings of vboxnet0 are used. Another interesting point is, that the VBox.log of the machine only mentions vboxnet0. I will attach some screenshots, the config of the machine and the VBox.log soon.

Changed 5 years ago by Enno

Setup of vboxnet1

Changed 5 years ago by Enno

ifconfig of vboxnet1 showing the correct settings as long as the vm is off

Changed 5 years ago by Enno

ifconfig showing vboxnet1 using the settings of vboxnet0 after starting the vm up

Changed 5 years ago by Enno

XML config of machine using vboxnet1

Changed 5 years ago by Enno

VBox.log of the machine using vboxnet1 (or as you can see in reality it uses vboxnet0)

comment:12 in reply to: ↑ 8 Changed 4 years ago by harrymc

Replying to MrX1980:

I have confirmed this problem on debian lenny using GUI v3.1.6 r59338
I create vboxnet1 using:
/usr/lib/virtualbox/VBoxNetAdpCtl add
response: vboxnet1
/usr/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.66.1
ifconfig shows:

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          etc ..
vboxnet1  Link encap:Ethernet  HWaddr 0a:00:27:00:00:01
          inet addr:192.168.66.1  Bcast:192.168.66.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:1/64 Scope:Link
          etc ..

I start VirtualBox and ifconfig shows the vboxnet0 and vboxnet1 addresses as before. As soon as my XP client is started from the GUI, ifconfig shows that the vboxnet1 IPv4 address has changed to 192.168.56.1 (same as vboxnet0). The client host only network is still configured for vboxnet1 but the network is inaccessible. The IPv6 address for vboxnet1 remains unchanged.

comment:13 follow-up: ↓ 14 Changed 4 years ago by frank

harrymc, I cannot reproduce your problem with VBox 3.1.6 on a Debian/unstable host nor the problem described by Enno. harrymc, to which host interface is your VM connected, only to vboxnet1 or to both vboxnet0 and vboxnet1?

comment:14 in reply to: ↑ 13 Changed 4 years ago by harrymc

Replying to frank: Hi Frank
I've sent a longer description but for now:
I only have Adapter 1 enabled and the failure occurs when the XP VM Adapter 1 is set to host-only vboxnet1 and the XP VM is then started from the VirtualBox GUI. I haven't been able to reproduce the fault when host-only vboxnet0 is selected.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use