# Gentoo guest, Win 7 host networking problems

## Mark Knecht

Hi,

   I'm doing a Gentoo amd64 install in Virtualbox-4.0.0 using a Windows 7 host. I run Gentoo native normally and have lots of successful installs. Using Vbox this way is a test to eventually help a friend get started with Gentoo.

   The install went easily and the virtual machine boots fine but so far I'm not getting any networking. There are no complaints when I run /etc/init.d/net.eth0 restart, I just don't connect to anything, cannot ping anything, etc.

   I followed the normal AMD64 install guide along with a 'Gentoo in Virtualbox' page here:

http://en.gentoo-wiki.com/wiki/Virtualbox_Gentoo_as_Guest

   What isn't covered on these pages is how the Virtualbox GUI should handle network settings. By default it came up NAT using the Intel PRO/1000 MT Desktop (82540OEM) setting. This is possibly OK as I am using the Pro/1000 adapter in Win 7 but there is another unsupported Intel PRO/100 adapter in the box which I use when the box is running Gentoo native. However that adapter isn't supported under Win 7.

   After the Virtualbox install in Win 7 I see a new network adapter called 'VirtualBox Host-Only Ethernet Adapter' listed under Device Manager, and in the Virtualbox GUI I see a few others like PCNet-PCI II, PCNet-Fast III and 'Paravirtualized NEtwork (virtio-net)' listed.

   Anyway, does anyone know what the trick is to getting this working? 

Thanks in advance,

Mark

----------

## kashani

I'm running the same setup on my laptop. Since I wanted to ssh it to it, I use Bridged Adapter so the Gentoo VM will get an IP from the DHCP server. Make sure the actual hardware device on the same screen is correct. On my laptop I have to switch it to the wireless card at home and the wired card at the office.

kashani

----------

## Hu

Does the guest understand that it has a network card?  My first thought would be that the emulated network card provided by VirtualBox is not understood by the kernel you are running in the guest.  Check by running ifconfig -a from the guest.  If you only see lo, then the guest does not understand how to operate the emulated card you have given it.

----------

## kashani

vbox gives you the option for what ether card it pretends to be though all of them are Intel. By default it should pick the one below and IIRC I just configure all the Intel cards e100, e1000, 8139, in make menuconfig. 

```
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
```

kashani

----------

## forkbomb

Virtualbox can emulate something like 4 different network cards and I think all of them are supported by the following (I went in-kernel rather than modularized). I just stick to using the Intel PRO/1000.

```
    [*] Network device support  --->

        [*] Ethernet (10 or 100Mbit)  --->

            [*] EISA, VLB, PCI and on board controllers

            <M>   AMD PCnet32 PCI support

        [*] Ethernet (1000 Mbit)  --->

            <M> Intel(R) PRO/1000 Gigabit Ethernet support

        [ ] Ethernet (10000 Mbit)  --->

```

Via http://en.gentoo-wiki.com/wiki/Virtualbox_Guest#Configuring_the_Kernel

Worked for me as far as Ethernet drivers go, though I had issues with getting device nodes for my hard disks (that page is outdated).   :Rolling Eyes: 

----------

## Mark Knecht

 *kashani wrote:*   

> I'm running the same setup on my laptop. Since I wanted to ssh it to it, I use Bridged Adapter so the Gentoo VM will get an IP from the DHCP server. Make sure the actual hardware device on the same screen is correct. On my laptop I have to switch it to the wireless card at home and the wired card at the office.
> 
> kashani

 

This was in fact the same solution I came up with on my own last evening. I ended up doing a Gentoo amd64 install under Win7 as well as one on my Gentoo server, just to see what the issues were. When I had the same networking problem on the Gentoo server I figured out it was the choices I was making, tried a few new ones and 'Bridged' worked as I wanted.

Thanks much kashani!

Cheers,

Mark

----------

