Link to home
Start Free TrialLog in
Avatar of apunkabollywood
apunkabollywoodFlag for United States of America

asked on

eth0 renamed as eth1 on vmware -when cloning using template Linux machine

Hi All Please help me with the solution apart from Udev rules editing for this problem so that I dont need to edit udev rules for solve this issue...

VMware - when creating a rhel machine using template this issue came and eth0 renamed as eth1 i want to resolve it so that no need to change it after installation..pls advice
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

This is a SOFTWARE Bug which exists when an Linux VM is CLONED in ALL Hypervisors.

This is not specific to VMware.

At present, apart from editing the udev rules, and clearing the file, it as is.

if you look at the rules, you will see why eth1 is created because the MAC address has been changed.
Avatar of apunkabollywood

ASKER

So there is no any alternative for it ...because i need to create lotz of Machines and its now headache to change it every time :( from script or etc
the issue is the MAC Address, we created a script to erase the created udev rules, and then clone the server without the udev rules created.

then at runtime, first clone power-on the udev rules run, map the correct MAC address, and you get a single eth0 with correct MAC Address.

So try and create your Golden Image, then Delete the Rules, and then Convert to CLONE.

Deploy Clone.
Would you please help with that script ...if you have? plese
Hello Han ..please m little bit confuse about ur above steps..if you could give me step by step procedure of it ...it would be great ...:)
1. Create a Linux VM, Power On, Make all your changes, just before you Power Off, delete the udev, rules -

(udev rules are run automatically re-run at startup, and maps MAC Address to eth(x).)

2. CLONE

3. At startup the CLONE will have new MAC Address, Udev rules will run for first time, MAC address will Map to correct eth0.

the reason it fails is because you have an older udev rule, with original MAC address...

so you end up with eth0, eth1...
Same problem is coming :(
I think rules are same as they before ...

what i have tried:

1. Creating fresh machine using DVD than delete that UDEV rules only 70-Presistent-net file
and than making clone of it -  BUT SAME ISSUE

2. Creating machine with same issues - Did all the work like changing mac and 70-presistent file and solve that issue than delete those udev rules and clone it -BUT Issue remain same

I am trying on RHEL 6.2
if the rules do no exist, at machine power-up, the udev will be created with the correct mac address.
want to confirm what do you mean by udev rules :

All files under /etc/udev shud deleted or only 70-persistent-net under /etc/udev/rules.d/ shud deleted?
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for ur Help Hanccocka for your help but dont know it still taking same MAC :(
Its done finally Thank you :)