Return to Snippet

Revision: 25038
at March 18, 2010 09:18 by pmaciver

Initial Code
Assuming you're not juggling multiple network interfaces and want the
default interface to remain eth0, the solution is to edit
/etc/udev/rules.d/rules.d/z25_persistent-net.rules to find the line
for eth0, replace the original MAC address with the new one and then
remove the newly-added line for eth1.

An even simpler solution is just to delete
/etc/udev/rules.d/rules.d/z25_persistent-net.rules and then regenerate
it by stopping and restarting udev:

rm /etc/udev/rules.d/rules.d/z25_persistent-net.rules
/etc/init.d/udev stop
/etc/init.d/udev start

Look at the file /etc/udev/persistent-net-generator.rules. There is
already a rule to ignore VMware interfaces from generating a
persistent rule. Just add after the VMware rule

# ignore VirtualBox virtual interfaces
ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"

Finally remove /etc/udev/z25_persistent-net.rules. Don't change
/etc/network/interfaces. Reboot your guest and the interface should be

Initial URL

Initial Description

Initial Title
Stop Virtualbox cloned machine using a different network interface

Initial Tags

Initial Language