|
Once we moved to VMWare ESX 3.+ we ran into a very annoying issue. The issue was that if you have multiple NICs from Multiple vendors, VMWare will reorder your NICs and cause havoc to you guys who use PXE boot/Kickstart. So I had to come with a work around that will alleviate this issue. I went ahead and created this script and I injected it in the post section of our kickstart profile and had it run after rebooting 3 times. Since After the third reboot the VMWare is done with its configuration, after the third reboot the script will run and then delete itself. Once all said and done your NICs will be in the proper order.
Some of you might just use it as a once shot deal manually and some of you might use it as I did, but I did not realize how many f you are having the same issue as I did. Since I posted this script it has ad close to 3000 hits. So for those of you who have used it and appreciated the work I have done or for those of you who have modified it and added to it. Please leave some feed back weather in the form of comments or in the forums.
Could you believe that VMWare says that a feature of there software will reorder your NICs after the kickstart??? So if this was the order of our NICS 03:02.0 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01) 03:02.1 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01) eth0 == 03:02.0 eth1 == 03:02.1 When VMWare comes up it will reorder them so that vmnic0 will point to 03:02:01 when it should be 03:02:00 Now this only happens when you have a box with multiple nics from multiple vendors. This script will take care of it for you.
Here are some instructions on how to run this script and what you should do before and after you run this script on your ESX Server..
- run esxcfg-nics -l (keep the ouput so you can compare it to the new ouput after the script has done its job)
- copy this script in any directory you want... for instance ( /tmp/esx_nic_fix.py )
- Reboot your ESX server and once it comes up ESXwill reboot again to apply the nic changes.
- run esxcfg-nics -l and compare the new output to the old output.... ( The order should be correct now ).
- Leave me a comment on how my script helped you and digg this article. ( I would appreciate it ).
I have received numerous request on how to count reboots so that this script can run effectively right at the right moment. This is not an exact science and the number of reboots might have to be tweaked on a per environment basis, but here is what we use..
count=`last -x|grep "reboot" |wc -l` if [ $count -ge 3 ]; then python /usr/local/bin/esx_nic_fix.py chmod 644 /etc/rc.d/rc.local reboot exit 0 fi
You can download the Script here, but you must become a member first before you download. Membership is free PLease post any support related questions here http://www.linuxdynasty.org/forums/Virtualization/virtualization/esx_nic_reordering_script_help
Download Vmware ESX NIC Reordering FIX Script | | File Title: | Vmware ESX NIC Reordering FIX Script (Details) | | File Type: | py | | File Version: | 2.0 | | File Size: | 2.75 Kb | | License: | Copyright (C) 2008 Allen Sanabria
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | | File Author: | Allen Sanabria | | File HomePage: | http://www.linuxdynasty.org/ | | Downloads: | 524 | | Rating: | ( Votes) | | Your Vote: | |
| |

|