View previous topic :: View next topic |
Author |
Message |
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Tue Jan 29, 2013 7:34 am Post subject: kernel config for bridged adapter of virtualbox |
|
|
In order to use bridged adapter of virtualbox 4.2.6 , how to config kernel ?
I upload my kernel config.
Now I can not use bridged adapter function of virtualbox.
I think the matter is about kernel config.
http://dpaste.de/1EOJz/
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs
Last edited by waterloo2005 on Wed Jan 30, 2013 1:26 pm; edited 1 time in total |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 874
|
Posted: Tue Jan 29, 2013 9:42 am Post subject: |
|
|
i didn't to read thru your whole kernel-config but you need at least CONFIG_BRIDGE and CONFIG_TUN.
also i think it's necessary to install net-misc/bridge-utils.
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Tue Jan 29, 2013 11:20 am Post subject: |
|
|
I could be wrong, but IIRC there is no special config necessary for bridging - everything should be handled by vbox-net (or so) module.
The config itself is handled by the virtualbox gui - just change the network adapter settings.
V. _________________ read the portage output!
If my answer is too concise, ask for an explanation. |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Tue Jan 29, 2013 4:56 pm Post subject: |
|
|
Some wiki says we do not need CONFIG_BRIDGE and CONFIG_TUN for vbox>=2.1.
My now version is 4.2.6.
I also try enable CONFIG_BRIDGE and CONFIG_TUN and install bridge-utils . But I still can not use bridged adapter .
In ubuntu12.04, I can use bridged adapter in network config .
I think if there are other kernel settings I ignore .
But I see the official manual , with no finding about other kernel config.
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Wed Jan 30, 2013 1:08 am Post subject: |
|
|
The problem is that Virtualbox has a hard-coded path to /sbin/ifconfig but that program is no longer available there. As a workaround, you could symlink /bin/ifconfig back to /sbin/ifconfig. Alternately, file a bug and request that it be fixed properly. Please note that placing a symlink is only a workaround, not a real fix to the problem, and you should only do that if you will remember to remove the symlink when the problem is fixed.
If you do not understand how to do the workaround or if you have any doubts, please just file a bug and be patient. It is considered poor practice to manually modify things in /sbin, which is why I label this as a workaround and not a fix. |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Wed Jan 30, 2013 4:34 am Post subject: |
|
|
kurly wrote: | The problem is that Virtualbox has a hard-coded path to /sbin/ifconfig but that program is no longer available there. As a workaround, you could symlink /bin/ifconfig back to /sbin/ifconfig. Alternately, file a bug and request that it be fixed properly. Please note that placing a symlink is only a workaround, not a real fix to the problem, and you should only do that if you will remember to remove the symlink when the problem is fixed.
If you do not understand how to do the workaround or if you have any doubts, please just file a bug and be patient. It is considered poor practice to manually modify things in /sbin, which is why I label this as a workaround and not a fix. |
I run sudo ln -s /bin/ifconfig /sbin/ifconfig , but the problem still exists.
Do I need CONFIG_BRIDGE and CONFIG_TUN and bridge-utils ?
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Wed Jan 30, 2013 7:29 am Post subject: |
|
|
waterloo2005 wrote: | kurly wrote: | The problem is that Virtualbox has a hard-coded path to /sbin/ifconfig but that program is no longer available there. As a workaround, you could symlink /bin/ifconfig back to /sbin/ifconfig. Alternately, file a bug and request that it be fixed properly. Please note that placing a symlink is only a workaround, not a real fix to the problem, and you should only do that if you will remember to remove the symlink when the problem is fixed.
If you do not understand how to do the workaround or if you have any doubts, please just file a bug and be patient. It is considered poor practice to manually modify things in /sbin, which is why I label this as a workaround and not a fix. |
I run sudo ln -s /bin/ifconfig /sbin/ifconfig , but the problem still exists.
Do I need CONFIG_BRIDGE and CONFIG_TUN and bridge-utils ?
Thanks |
I do not have those. Are you sure that the vboxdrv, vboxnetadp, and vboxnetflt modules are loaded? |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Wed Jan 30, 2013 11:54 am Post subject: |
|
|
kurly wrote: | waterloo2005 wrote: | kurly wrote: | The problem is that Virtualbox has a hard-coded path to /sbin/ifconfig but that program is no longer available there. As a workaround, you could symlink /bin/ifconfig back to /sbin/ifconfig. Alternately, file a bug and request that it be fixed properly. Please note that placing a symlink is only a workaround, not a real fix to the problem, and you should only do that if you will remember to remove the symlink when the problem is fixed.
If you do not understand how to do the workaround or if you have any doubts, please just file a bug and be patient. It is considered poor practice to manually modify things in /sbin, which is why I label this as a workaround and not a fix. |
I run sudo ln -s /bin/ifconfig /sbin/ifconfig , but the problem still exists.
Do I need CONFIG_BRIDGE and CONFIG_TUN and bridge-utils ?
Thanks |
I do not have those. Are you sure that the vboxdrv, vboxnetadp, and vboxnetflt modules are loaded? |
I have loaded the 3 modules and run sudo ln -s /bin/ifconfig /sbin/ifconfig, the problem still exists.
Code: | $ lsmod
Module Size Used by
vboxnetadp 17703 0
vboxnetflt 15699 1
vboxdrv 1810981 3 vboxnetadp,vboxnetflt
uvcvideo 72132 0
videobuf2_vmalloc 2677 1 uvcvideo
ath9k_htc 55999 0
videobuf2_memops 2651 1 videobuf2_vmalloc
videobuf2_core 23196 1 uvcvideo
videodev 96117 2 uvcvideo,videobuf2_core
nvidia 9094010 0
lpc_ich 10677 0
ath9k_common 1889 1 ath9k_htc
ath9k_hw 326156 2 ath9k_common,ath9k_htc
ath 15514 3 ath9k_common,ath9k_htc,ath9k_hw
|
_________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Wed Jan 30, 2013 1:04 pm Post subject: |
|
|
As far as I know, CONFIG_BRIDGE isn't needed, although I have it enabled in my kernel
CONFIG_TUN definitely isn't needed, and nor are bridge-utils.
Will |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Thu Jan 31, 2013 3:38 am Post subject: |
|
|
cwr wrote: | As far as I know, CONFIG_BRIDGE isn't needed, although I have it enabled in my kernel
CONFIG_TUN definitely isn't needed, and nor are bridge-utils.
Will |
So strange.
I also cancel CONFIG_BRIDGE and CONFIG_TUN support, and do not install bridge-utils.
Why bridged adapter can not work in my machine ?
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Thu Jan 31, 2013 5:56 am Post subject: |
|
|
Hi,
for bridgeing a tun/tap interface you need a tap interface. For creating a tapinterface, you need the following package installed:
Code: | * sys-apps/usermode-utilities
Available versions: *20070815-r3 {{fuse}}
Homepage: http://user-mode-linux.sourceforge.net/
Description: Tools for use with Usermode Linux virtual machines |
this will install the tunctl command. For the bridge you need the following package
Code: | * net-misc/bridge-utils
Available versions: *1.2 ~1.4 ~1.5
Homepage: http://bridge.sourceforge.net/
Description: Tools for configuring the Linux kernel 802.1d Ethernet Bridge |
both together will help you create a working bridge with a tun/tap interface. If you need further help for creating a bridge in /etc/conf.d/net, just ask.
greets, bb _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Thu Jan 31, 2013 6:56 am Post subject: |
|
|
bbgermany wrote: | Hi,
for bridgeing a tun/tap interface you need a tap interface. For creating a tapinterface, you need the following package installed:
Code: | * sys-apps/usermode-utilities
Available versions: *20070815-r3 {{fuse}}
Homepage: http://user-mode-linux.sourceforge.net/
Description: Tools for use with Usermode Linux virtual machines |
this will install the tunctl command. For the bridge you need the following package
Code: | * net-misc/bridge-utils
Available versions: *1.2 ~1.4 ~1.5
Homepage: http://bridge.sourceforge.net/
Description: Tools for configuring the Linux kernel 802.1d Ethernet Bridge |
both together will help you create a working bridge with a tun/tap interface. If you need further help for creating a bridge in /etc/conf.d/net, just ask.
greets, bb |
I also try what you said . But the problem still exists.
Now I have tried all method above(including ln -s /bin/ifconfig /sbin/ifconfig) , the problem still exists.
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Fri Feb 01, 2013 7:37 am Post subject: |
|
|
Can you post the output of "ls -la /dev/net/*" I think you dont have the correct permission set for the tun/tap devices. Also which user do you use for trying to access the "bridge".
greets, bb _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Fri Feb 01, 2013 11:50 am Post subject: |
|
|
Be aware that you don't need TUN/TAP for VirtualBox. I'm not sure that you even
need the kernel CONFIG_BRIDGE, and you certainly don't need bridge-utils,
although you used to a few years ago. VirtualBox does it all itself, these days.
Emerge virtualbox[ and virtualbox modules and add:
Code: |
# VirtualBox 4.1.22 modules.
modules="vboxdrv vboxnetadp vboxnetflt vboxpci"
|
to /etc/conf.d/modules and you should be good to go.
Will
(You will need to re-emerge virtualbox-modules if you rebuild the kernel.) |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Fri Feb 01, 2013 2:23 pm Post subject: |
|
|
bbgermany wrote: | Can you post the output of "ls -la /dev/net/*" I think you dont have the correct permission set for the tun/tap devices. Also which user do you use for trying to access the "bridge".
greets, bb |
Code: | $ ls -la /dev/net/*
crw-rw-rw- 1 root root 10, 200 Feb 2 2013 /dev/net/tun |
I use a ordinary user to run vbox.
If I cancel CONFIG_TUN in kernel config, I find no /dev/net/tun.
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Mon Feb 04, 2013 8:18 am Post subject: |
|
|
waterloo2005 wrote: |
Code: | $ ls -la /dev/net/*
crw-rw-rw- 1 root root 10, 200 Feb 2 2013 /dev/net/tun |
I use a ordinary user to run vbox.
If I cancel CONFIG_TUN in kernel config, I find no /dev/net/tun.
Thanks |
As you can see, you dont have permissions to access the tun device. thats why you need the usermode-utilities. This provides the tunctl tool for changeing permissions while creating the necessary devices. Check this wiki entry for the netconfig:
http://en.gentoo-wiki.com/wiki/KVM#Preparations
There you will find a bridge config with the correct settings for creating you tap devices although its for KVM instead of vbox.
greets bb _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Wed Mar 06, 2013 6:51 am Post subject: |
|
|
Today I update my kernel to gentoo-sources 3.7.10 .
Now every time I run xp guest in vbox, it says : finding an ethernet controller .
I open network connection in xp guest , there is nothing .
Because I can not connect internet in xp guest , so I can not install the ethernet controller driver .
What is the matter ?
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Sat Mar 09, 2013 5:19 am Post subject: |
|
|
I also try use kernel config of ubuntu12.04, that makes bridged adapter network config in vbox work.
But I do not how to find that critical item in kernel config. _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|