Heath SchweitzerHeath Schweitzer
← All posts

Fix Issues with Networking for Ubuntu VirtualBox Server

September 2, 2011|Heath Schweitzer|1 min read|29 views|Last Updated June 20, 2026

Linux

Networking stopped working for my Ubuntu VirtualBox Server (running on Mac OS X) and it couldn't seem to get it working again. Tried running:

sudo /etc/init.d/networking restart

only to get errors about "Failed to bring up eth0..." until I found a workaround on howtogeek.com, which worked to solve my issues like a charm!  Thanks How-To-Geek

Quick Summary:

Run this command to edit the interfaces file, and then change eth0 to eth1.

sudo vi /etc/network/interfaces

Run this command to restart networking and everything should likely start working again:

sudo /etc/init.d/networking restart

You should be able to run a ping command and validate the connection is working. One thing to note... this worked the first time the Virtual Machine was moved, but then I exported it again to another Mac and had to modify what I did slightly. I ran:

ifconfig -a

and noticed that the system now labeled the ethernet connection I needed to use as eth2, so I edited /etc/network/interfaces file one more time using eth2 as the interface.

If this post was useful, consider buying me a coffee ☕ with ₿itcoin — no account needed, any amount welcome.

Bitcoin tip QR code
⚡ Open in Wallet