On Tue, 7 Oct 2008, manoharvanga_225 wrote:

> I'm using VirtualBox to run Gentoo on my computer at the moment. I
> have a hard disk image with Gentoo installed on it and I load it using
> VirtualBox to run Gentoo. My problem is that networking is not working
> and I am unable to do much without internet access on Gentoo.
>
> Can anyone help me set this up?
>

Hi Manohar:

i'm trying to repro your case by seting up VirtualBox 1.5.6-33.1 
on my OpenSuSe 11 box. Guess you are using the same version.

Here are some observations as the installation goes on:

  . The installer seems to download 'kernel-default' 2.6.25.5-1.1
    which is about 21.6 MB size.

  . xorg-x11-driver-virtualbox-ose is also installed (essentially
    drivers for mouse and video).

  . kernel-kmp-ose is installed (kernel module for virtualbox).

To manage the VM environment, i installed virtualbox-ose-guest-tools.

A reboot is required, so i rebooted the system. Looks like a got a new
kernel on my P4 with PAE.
  Original kernel is : 2.6.25.5-1.1
  Updated  kernel is : 2.6.25.16-0.1

Looks like there is a 'vboxusers' group created and i'm not part of
this. So run the 'usermod' command

[EMAIL PROTECTED]:~> sudo /usr/sbin/usermod -G vboxusers saifi

Check the entry in the '/etc/group' file.

Next, i created a directory to store all the Virtualbox files
  /home/saifi/workarea/vm

Using the 'Create New Virtual Machine' wizard, i configured for
  . Gentoo2008-r1
  . Linux 2.6
  . 512 MB base memory
  . gentoo2008-r1hdd.vdi virtual disk image

In the properties, i specified the path to the gentoo
livecd-i686-installer-2008.0-r1.iso

Networking as shown in properties is basic NAT'ing which is fine for
client-side connections. However, for server setup it won't do !

  Startup the VM and it crashes !!!

Looks like vboxdrv does not work ! Explicit modprobe does not work
either.

Restart the system and select '2.6.25.5-1.1' kernel in grub menu.

load the 'vboxdrv' kernel driver by logging in as root and running the
commad - '/etc/init.d/vboxdrv setup

To verify, run the commnd, 'lsmod | grep vbox' and it should show the
driver name with some size information.

Again, go back to Menu --> System --> VirtualBox OSE and start the VM.
This time we got lucky and it seems to start off fine.

Once the Gentoo system comes up, i check for networking.

The IP address shown is incorrect and so is the gateway information !

We need to fix the networking part.

This requires us to setup Networking via "host bridging", wherein the
interim network devices will be simulated in software.

Here are the steps to follow:

1. Software to install using YaST
    . bridge-utils
    . tunctl

2. login as root on a terminal
    su - root

3. create a TAP interface for user 'mvanga' and bring up the interface

    # tunctl -t tap0 -u mvanga

    # ifconfig tap0 0.0.0.0 up

4. Create a new instance of ethernet bridge

    # brctl addbr br0

5. Each bridge has a number of ports attached to it. Each interface
    we want to bridge needs to be made into a port

    # brctl addif br0 eth0 tap0

6. Now we start a DHCP client on the bridged interface

    # dhcpcd br0

    # ifconfig br0 up

    In case you are running a static ip based system, use the ifconfig
    command to create a assigned ip.

7. Run a few checks on the setup so far

    show the interfaces connected on the bridge
    # brctl show

    ensure that all interfaces that are members of bridge have their ip
    address removed
    # ifconfig eth0 0.0.0.0

8. Load up the VirtualBox user interface and make the following changes
    to Network settings
    . in the drop down list select "Attached to: Host Interface"
    . in the host interface settings, give name as "tap0"

9. Bootup Gentoo Linux and when you are on the root prompt, configure
    the network.

    # net-setup eth0
       - network is wired
          - dhcp

    or

    # dhcpcd eth0

10. To verify run the command 'ifconfig' and 'netstat -nr'

     Run 'ping www.twincling.org' to run the traffic.

        Congrats, you just setup the network !

Manohar these are the steps to follow. Let me know how it goes.

Hope this helps.

thanks
Saifi.

Reply via email to