networking problem

Discussions related to using VirtualBox on Linux hosts.
Post Reply
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

networking problem

Post by satimis »

Hi all,

Host ubuntu 16.04
VM ubuntu 16.04
Oracle VirtualBox

I clone VM1 creating VM2
Reinitialize the MAC address of all network cards
Full clone

Start VM2
$ ifconfig

Code: Select all

....
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:3a:4a:33  
          inet addr:192.168.8.2  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::8233:e300:c42f:18f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9654 (9.6 KB)  TX bytes:6988 (6.9 KB)
....
eth0 changed to enp0s3 and unable to connect Internet.

I encountered this problem before but forgot how to fix it. Please help.

TIA

satimis
Elizine
Posts: 34
Joined: 19. May 2015, 10:49

Re: networking problem

Post by Elizine »

The solution is quite simple. Just edit /etc/network/interfaces
Change all "eth0" to "enp0s3"
Reboot VM

Then it works able to connect Internet.

But above solution doesn't work on "ubuntu-16.04.1-desktop-amd64.iso"

Just install "ubuntu-16.04.1-desktop-amd64" on a VM.

Solution: on terminal run;
Code:

Code: Select all

sudo ifconfig enp0s3 192.168.x.x netmask 255.255.255.0
"192.168.x.x" is the fixed IP

Reboot VM, then Internet can be connected.
bodHOST
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: networking problem

Post by satimis »

Elizine wrote: - snip -
But above solution doesn't work on "ubuntu-16.04.1-desktop-amd64.iso"

Just install "ubuntu-16.04.1-desktop-amd64" on a VM.

Solution: on terminal run;
Code:

Code: Select all

sudo ifconfig enp0s3 192.168.x.x netmask 255.255.255.0
"192.168.x.x" is the fixed IP

Reboot VM, then Internet can be connected.
Hi,

Thanks for your advice.

Code: Select all

sudo ifconfig enp0s3 192.168.x.x netmask 255.255.255.0
Didn't solve the problem. After reboot I have to run this command again.

Finally I found that I haven't installed bridge-utils on VM. After having it installed and on /etc/network/interfaces renaming all eth0 to enp0s3 reboot VM. Problem gone.

satimis
Post Reply