How to get network working under virtualbox?

I'm trying to get FreeBSD 9-RC2 running in VirtualBox and during the install (using the net install iso), I am able to get a network connection and the install works.

After rebooting and loading up the newly installed system, I am unable to get a network connection.

The system automatically added to /etc/rc.conf:

Code:
ifconfig_em0="DHCP"

So what is the BSDinstall application running to configure the network during install that I need to do to get a connection after the install?
 
bigtoque said:
I'm trying to get FreeBSD 9-RC2 running in VirtualBox and during the install (using the net install iso), I am able to get a network connection and the install works.

After rebooting and loading up the newly installed system, I am unable to get a network connection.

Could you be more specific about what you mean by that? What errors? If you're testing with ping... well, pings don't make it through VirtualBox's NAT. So try another protocol.

The system automatically added to /etc/rc.conf:

Code:
ifconfig_em0="DHCP"

That should work, although I prefer SYNCDHCP.

So what is the BSDinstall application running to configure the network during install that I need to do to get a connection after the install?

Could it be that when bsdinstall ran, the VirtualBox networking kernel module had been loaded manually, but now it's after a reboot of the host? That would apply if you have the VM set to bridged networking.
 
I didn't know an easy way to post the output of dmesg, so I just stitched together a few screenshots:

http://imageshack.us/photo/my-images/526/dmesg.png/

To be more specific, the virtual network device in FreeBSD gets an IP address of 10.0.2.15, and when you do something like ping a website (which I know doesn't work), it knows the destination IP address.

I can't run a command like
Code:
pkg_add -r xorg
because it can't find any external addresses.
 
The zoom on that image doesn't work for me. The question is what error message is returned from the pkg_add. RC2 needs to have the PACKAGESITE variable set or it won't find any packages.

That it gets an IP address and DNS says the network is working.
 
Setting the packagesite fixed the issue.

Thanks for the help. Out of curiosity, was this information posted somewhere that I should have checked first?
 
Back
Top