Ethernet device becomes eth1 for VMs in Pool
When I create a pool of EL6 desktops the ethernet device of the VMs in the pool becomes eth1.
The VM which I used to create the template has an ethernet device of eth0.
In order to make this work, I modified and renamed the ifcfg-eth0 file just before making the template.
Responses
I hit this same issue during my testing yesterday. Are you saying you renamed ifcfg-eth0 to ifcfg-eth1 before creating the template (and changed content, obviously)?
Why does this happen? i.e. why does the ethernet device become eth1 instead of eth0? I only actually tested with one VM created from a template; did you find that all subsequent VMs got eth1?
R.
Do you create the VMs from a specifically prepared template (SSH keys removed, MACs removed etc) or from just a normal VM turned into a template without preparation?
Dan,
I just followed the steps listed in Lab 2 in the Evaluation Guide, ie.
touch /.unconfigured
rm -rf /etc/ssh/ssh_host_*
poweroff
R.
So, after doing this (and rebooting), the old ifcfg-eth0 file is still there, and still contains the old MAC address?
There's a little more to do - if it's not covered in the eval guide then we should fix that.
Remove the mac address in /etc/sysconfig/network-scripts/ifcfg-eth0
Remove the entry for that nic in /etc/udev/rules.d/70-persistent-net.rules
It will look something like
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*your mac address*"
You can just remove that line.
Yes, I believe so.
Is that why the actual device is assigned eth1? And is the "fix" here to remove ifcfg-eth0 (or at least change the Mac address) before using it as a template?
R.
In case you miss Andy's comment:
Remove the mac address in /etc/sysconfig/network-scripts/ifcfg-eth0
Remove the entry for that nic in /etc/udev/rules.d/70-persistent-net.rules
It will look something like
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*your mac address*"
You can just remove that line.