No network card on virtualbox

Issues related to configuring your network
Post Reply
Pierrick584
Posts: 2
Joined: 2011/12/14 02:19:50

No network card on virtualbox

Post by Pierrick584 » 2011/12/14 02:23:13

Greetings, i am running as a host ubuntu 11.10, centos 6.1 as a guest (problem happend on 32 and 64 bit) both minimal iso (only needed CLI anyway)

No matter how i configure the virtual machine network wise, all that ifconfig output is the "lo" interface, needless to say it is quite hard to access the internet ><

anyone got an idea?

User avatar
TrevorH
Forum Moderator
Posts: 23042
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: No network card on virtualbox

Post by TrevorH » 2011/12/14 09:56:17

Does `ifconfig -a` show anything? What sort of virtual ethernet card have you configured for this VM?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

No network card on virtualbox

Post by pschaff » 2011/12/14 11:53:29

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

See also [url=http://wiki.centos.org/FAQ/CentOS6#head-b67e85d98f0e9f1b599358105c551632c6ff7c90]CentOS-6 FAQ#2[/url].

Pierrick584
Posts: 2
Joined: 2011/12/14 02:19:50

Re: No network card on virtualbox

Post by Pierrick584 » 2011/12/14 17:26:44

With the -a argument, i do see an eth0, yet no IP associated to it. the virtualbox is currently configured with bridged adapter, but i did tried NAT also without sucess.

The promiscuous mode is to "deny" i gotta say i have no clue what it is so aint sure its the best setting :S

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: No network card on virtualbox

Post by pschaff » 2011/12/14 18:19:39

Did you try following the advice in the FAQ?

panpan
Posts: 10
Joined: 2011/05/30 14:08:42

Re: No network card on virtualbox

Post by panpan » 2012/01/25 00:37:13

hello,
the command ifconfig -a will show you the name of the interface lets say eth0,
then do
vi /etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=08:00:27:62:5b:b9
NETMASK=255.255.255.0
IPADDR=192.168.1.212
GATEWAY=192.168.1.211
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes



this configuration working for me with virtualbox.
ensure that you have to select this model of eth card on virtualbox. It has some issues with the net cards. This cards is working for me in bridging mode.
also change the HWADDR with the value ifconfig shows.

Thanks.

BlackHeart
Posts: 1
Joined: 2012/10/18 09:29:56

Re: No network card on virtualbox

Post by BlackHeart » 2012/10/18 09:42:43

I recently installed CentOS-6.3-x86_64-minimal on virtualbox with a Win7 host and ran into the same problem. I am taking a Linux class and my instructor told us to read over the release notes for CentOS 6.3. There I found out that:

[quote]2. Why does my Ethernet not work unless I log in and explicitly enable it?

.. and why are the interface names all "messed up" compared to prior practice? This violates the Unix rule of "not breaking expectations".

Upstream has changed the default configuration to use NetworkManager and interfaces are (somewhat inexplicably in the case of Ethernet) not enabled by default. This can be worked around at install time where, after the installer asks for your language and keyboard and Basic or other storage devices, it runs "Examining Devices" then it presents a screen "Please name this computer..." On this screen is a button labeled "Configure Networking". Clicking that button will launch NetworkManager. Select the Ethernet connection which is probably listed as "System eth0" and edit the settings. If you select the check box by "Connect Automatically" networking will start on boot in the future. You can also make this change with NetworkManager (System; Preferences; Network Connections or right click on the little network icon in the notification area and Edit Connections...) after the installation is complete.

If you are not using NetworkManager the same result can be obtained by editing the configuration file for the network interface ( normally /etc/sysconfig/network-scripts/ifcfg-eth0 ) and changing: ONBOOT=no to ONBOOT=yes Some setups seem to also require the addition of a line: BOOTPROTO=dhcp where a DHCP setup is in play; Static IP setups would take: BOOTPROTO=static of course

The ONBOOT edit may be performed (as root) and assuming the relevant device is eth0:
# cd /etc/sysconfig/network-scripts/
# sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0

As to "breaking expectations": The foregoing example uses a 'traditionally' named network device of: eth0 Other device names are also possible, including for example: em1 or p3p1 and such. Like it or not, this change in approach in interface naming is the future path for Linux. It was previewed in in the upstream's "testing distribution". See also the materials at: Dell's writeup and a blog post from an insider there.[/quote]

[url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.3]CentOS 6.3 Release Notes[/url]

After following these simple instructions my internet worked perfectly.

Post Reply