Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] gentoo disk clone on virtualbox, udev eth0/eth1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
geta
Apprentice
Apprentice


Joined: 10 May 2003
Posts: 153

PostPosted: Wed Jan 09, 2008 9:50 am    Post subject: [solved] gentoo disk clone on virtualbox, udev eth0/eth1 Reply with quote

Hello,

I'm placing this under hardware because virtualbox is basically "hardware", albeit being virtual hardware only ;-)

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
_________________
geta - pronounced: "djetta"


Last edited by geta on Sun Jun 08, 2008 3:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
phsdv
Guru
Guru


Joined: 13 Mar 2005
Posts: 372
Location: Europe

PostPosted: Sun Jun 08, 2008 11:29 am    Post subject: Reply with quote

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:
Code:
# ignore VirtualBox virtual interfaces
ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"
Back to top
View user's profile Send private message
geta
Apprentice
Apprentice


Joined: 10 May 2003
Posts: 153

PostPosted: Sun Jun 08, 2008 3:55 pm    Post subject: Reply with quote

thanks alot
_________________
geta - pronounced: "djetta"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum