SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/05/01 14:08 2 Comments
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

clonedslesvmnic

Cloned SLES Virtual Machine NIC

After cloning a Linux VM, you might find your network interface is no longer named eth0, taking on eth1 instead. This will work and cause no functional impact, however, for several reasons you might want to change it to eth0 anyway. SLES for VMware/SLES 11 SP1, uses udev to provide persistence to various devices. While this model is a big step forward from the semi-random device name assignments of the past, one side-effect is that a new MAC address, which will happen when you clone a virtual machine, is regarded as an additional interface and not a replacement. Which means a newly-cloned SLES VM powers up with eth1 as the NIC name, and not eth0. Fortunately, this situation is easy to fix. Log into the VM and edit:

/etc/udev/rules.d/70-persistent-net.rules

Scroll down to the bottom of the line to see the configuration:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:b9:00:33", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:b9:00:34", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

The first line contains the MAC address of the original template VM while the second line is the new MAC address for the new card.

There are two ways to fix this issue:

  • Completely delete the file — it will be created again on boot and the first NIC will be assigned eth0
  • Delete the line containing the old entry that references eth0 and change “eth1″ to “eth0″ in the remaining line.

Make this change before you assign IP addresses. If you already have assigned IP addresses you'll also have to edit /etc/sysconfig/network/ifcfg-eth0 and /etc/sysconfig/network/route accordingly.
Don't forget to reboot the VM and check the configuration.

You could leave a comment if you were logged in.
clonedslesvmnic.txt · Last modified: 2013/04/20 12:42 by sjoerd