Stop Virtualbox cloned machine using a different network interface

/ Published in: Bash
Save to your folder(s)

Copy this code and paste it in your HTML
  1. --8<--
  2. Assuming you're not juggling multiple network interfaces and want the
  3. default interface to remain eth0, the solution is to edit
  4. /etc/udev/rules.d/rules.d/z25_persistent-net.rules to find the line
  5. for eth0, replace the original MAC address with the new one and then
  6. remove the newly-added line for eth1.
  8. An even simpler solution is just to delete
  9. /etc/udev/rules.d/rules.d/z25_persistent-net.rules and then regenerate
  10. it by stopping and restarting udev:
  12. rm /etc/udev/rules.d/rules.d/z25_persistent-net.rules
  13. /etc/init.d/udev stop
  14. /etc/init.d/udev start
  15. --8<--
  17. --8<--
  18. Look at the file /etc/udev/persistent-net-generator.rules. There is
  19. already a rule to ignore VMware interfaces from generating a
  20. persistent rule. Just add after the VMware rule
  22. # ignore VirtualBox virtual interfaces
  23. ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"
  25. Finally remove /etc/udev/z25_persistent-net.rules. Don't change
  26. /etc/network/interfaces. Reboot your guest and the interface should be
  27. well-detected.
  28. --8<--


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.