The "ifrename" tool seems to be the solution to my problem, but 1) my distribution of Ubuntu server doesn't seem to have the tool installed (apt-get install ifrename yielded nothing), and 2) I'd like for this to be done automagically for the people who download my VM, so is there any way to make something like ifrename work on ONLY the first boot of a new VM, to capture the necessary the MAC addresses and edit /etc/iftab the first time?
<br><br><div><span class="gmail_quote">On 2/22/07, <b class="gmail_sendername">Michael Matthews</b> <<a href="mailto:erobererunc@gmail.com">erobererunc@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does anybody know how to take 2 new MAC addresses for newly attached NIC's and make them the default /etc/iftab eth0 and eth1?  That is, I think I need to repopulate the /etc/iftab file with the new network interface names (eth0 and eth1) mapped to the new MAC addresses instead of old MAC addresses that are no longer attached.  Since this is a VMWare virtual machine guest OS, doing this manually is not an optimal solution, since I can't depend on the people downloading my VM to do this correctly.  Right now, the only option that I can see is to make a personal script for this, but I just keep getting the feeling that one already exists for this exact situation.
<br><br>So, my problem is that VMWare changes the MAC addresses whenever a new guest OS is downloaded and started up.  In Ubuntu, this results in the new network interfaces being named eth2 and eth3 (in my situation), instead of eth0 and eth1.  Of course, this means that /etc/network/interfaces has no record of of what to do with these interfaces, namely using DHCP to get eth0 an IP address.....so the result is that I can't connect to the network with this new guest OS.
<br><br>What I need to fix this is a way to make the new virtual NICs into eth0 and eth1 instead of eth2 and eth3.  I GUESS that means editting /etc/iftab, but like I said, these will be guest OSes downloaded by other users, and I can't rely on them to do this correctly.  Any suggestions? =)
<br><br>Thank you in advance for any help!  Please let me know if I have misidentified the problem as well, if you know something better.<br>
</blockquote></div><br>