# [solved] gentoo disk clone on virtualbox, udev eth0/eth1

## geta

Hello,

I'm placing this under hardware because virtualbox is basically "hardware", albeit being virtual hardware only  :Wink: 

I've stumbled across an interesting problem in VirtualBox. I've created my base gentoo image on a virtual box machine. Everything works fine on that machine, including networking, emerging new versions, etc.

I then proceeded to create a hard disk image clone (VBoxManage clonevdi) and created a second virtual machine. I then booted off that "new" harddisk. There is one minor problem with this - it won't start the network properly. The message to "/etc/init.d/net.eth0 start" is "network interface eth0 does not exist".

Looking at dmesg reveals why:

"udev: renamed network interface eth0 to eth1"

Seems to be logical, udev writes down the MAC address of the cards it had discovered up to that point, and virtualbox creates a new MAC address for each new virtual machine. I know I could go editing the file /etc/udev/rules.d/70-persistent-net.rules (example 'echo "" > /etc/udev/rules.d/70-persistent-net.rules'), but is there a cleaner way to get this flowing - some master "clear udev device id cache" command or something similar?

Cheers,

geta

----------

## phsdv

Yes, a cleaner way exists. I found it here: http://forums.virtualbox.org/viewtopic.php?t=1616&sid=1e4745f23d30e60c6f2dd4cc18b576dc

In file /etc/udev/rules/75-persistent-net-generator.rules I have added:

```
# ignore VirtualBox virtual interfaces

ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end" 
```

----------

## geta

thanks alot

----------

