Hide Forgot
Description of problem: After running sys-unconfig on a VM with 1 NIC (eth0) running RHEL6.1, I'm creating a template from it. Then, I create a new VM from this template. When I boot the newly created VM - it can't start eth0. When I check the /etc/sysconfig/network-scripts/ifcfg-eth0 file - the "HWADDR=" line still has the old MAC. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Prepare a VM with 1 NIC running RHEL6.1 2. Make sure eth0 is UP. 3. Run sys-unconfig and create a template from this VM. 4. Create a new VM from this template. 5. Check the status of the interfaces. Actual results: eth0 is down and can't be brought up. Expected results: eth0 is UP. Additional info:
Removing the udev rules file (or just fixing its entries) doesn't fix the "HWADDR=" line.
Created attachment 531514 [details] rc.sysinit patch Suggested patch to initscripts, untested.
Tried it - doesn't work. The udev still tries to create ifcfg-eth1 and ifcfg-eth0 fails to start. What will do the trick though (obviously... and tested to be on the safe side) is the following: for f in /etc/sysconfig/network-scripts/ifcfg-*; do rm -f $f # sed -i -e '/^HWADDR=/d' "$f" done IMHO, sys-unconfig implies reconfiguration of all adapters, so this should be fine....
In the previous comment I meant ethX (not ifcfg-ethX). Thanks.
Surely if you want to 'reconfigure all adapters', you'd remove the ifcfg files entirely, and therefore the X configuration, modprobe.conf.d files, and so on.
Since RHEL 6.2 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
That patch implies that the only use of it is your usage case, though. I'd expect the case where someone who wants to unconfigure their system wants the entirety of network config to go away to be roughly as common.
(In reply to comment #15) > That patch implies that the only use of it is your usage case, though. I'd > expect the case where someone who wants to unconfigure their system wants the > entirety of network config to go away to be roughly as common. I can understand that point, but there currently doesn't appear to be any way to configure new network devices on the next boot when we run system-config-network-tui. In RHEL 5 I seem to remember kudzu scanning for new devices on boot and prompting the user to configure them, but nothing like this happens in RHEL 6 as far as I can see. Udev creates a new persistence rule, but the user is left having to write ifcfg files from scratch.
(In reply to comment #16) > In RHEL 5 I seem to remember kudzu scanning for new > devices on boot and prompting the user to configure them, but nothing like this > happens in RHEL 6 as far as I can see. Udev creates a new persistence rule, > but the user is left having to write ifcfg files from scratch. This is exactly what I reported in bug 750386. It seems to me that sys-unconfig isn't cleaning up as much as it should. It should be cleaning out udev rules and old ifcfg files so that new ones will be generated on next boot.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
*** Bug 786538 has been marked as a duplicate of this bug. ***
I am not sure if we can handle this properly in initscripts, best way would be to completely regenerate ifcfg files, but these are created in anaconda.
This bug was reported for VMs and we have now tool virt-sysprep which should do mentioned job, so I will close this bug. Does anyone have any objections?