ETH2 becomes ETH4

Discussions about using Linux guests in VirtualBox.
Post Reply
javadude
Posts: 1
Joined: 26. Jan 2010, 14:20
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: Ubuntu

ETH2 becomes ETH4

Post by javadude »

Hi !
just installed Ubuntu 9.10 Server (from ISO) as guest running von VB 3.2.1 on Ubuntu 9.10 Desktop as host.
The network is setup with a bridged adapter (1) and a host-only adapter (2). Starting the guest Ubuntu it comes up with eth1 and eth2 (same configured in /etc/network/interfaces)

Code: Select all

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp
Then export as appliance and import into another Ubuntu desktop (different box but same Ubuntu version), the network would not start up because eth3 and eth4 are as interface available only.
Then I would need to reconfigure the interfaces file to match that. This is not my intention. I need the guest system to be running without anyone touching it.

How does Ubuntu (as guest) gets the interfaces ? Or why does it create eth3 and 4, not 1 and 2 ?

Thanks for any tips
Sven
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: ETH2 becomes ETH4

Post by Perryg »

There is a Linux (feature) that is causing this. When the Linux OS detects a change in the MAC address it ups the network naming to protect the original settings.
You can edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot.
Post Reply