VMware Cloud Community
BarryDE
Contributor
Contributor

Standardised approach renaming NIC assigning IP across w2k3/w2k8/w2k12

Hi all,

I really wasn't sure where to post this, hopefully it's ok here - if not please feel free to move.

I'm converting w2k3/w2k8/w2k12 servers to a different VLAN, which requires an IP change on all 3 network cards we have per server.  To speed up and bring some standardization and eliminate human error I have a script which renames network cards, add new IP details - this all works great and isn't really the main reason i'm here.

As I mentioned we use 3 network cards, during the conversion process i select "none" for network, meaning once its on the other side we add new network cards, but only after running devcon to remove the previous cards - Which I do to ensure that when the new network cards are added start at "local area connection, local area network connection 2 and local area network connection 3" or for w2k12 "Ethernet, Ethernet 2 and Ethernet 3" within the OS - The script will look for each of these connections, rename and assign the correct IP based on this,

The problem i have and i want to see how others deal with this (or have recommendations), is as follows.

After doing the above we go to  "VM > edit settings" and add 3 network cards, please note that the Network Labels that must be in a particular order here and this is where i have problems - If i add all 3 network cards in one go windows seems to randomly assign with becomes the lowest label - i.e. the first card I add in "VM > Edit settings" may not be the first network connection within the OS - The work around is obviously add one network card, assign network label and apply, go back in add second etc etc - but this isn't ideal.

Anyone have any suggestions on how i can ensure the first network card/label added in "VM > Edit Settings" is the lowest network label within the OS?

for clarity, i am asking this because the script i have requires the lowest network connection to be the one assigned in "VM > Edit Settings" to ensure the NIC is renamed correcty, and the correct IP details are applied with netsh commands.

Thanks
B

2 Replies
POCEH
VMware Employee
VMware Employee

Very interesting question despite it's not for this forum, try in ESX and/or VC ones because they are capable for hardware changes of VM including network cards add and remove.

My $0.02: try to configure your networks with sysprep.exe - you need only MAC addresses of cards to configure them.

HTH

BarryDE
Contributor
Contributor

Thanks Poceh! - sorry for such a later reply Smiley Happy - things been a little busy.

This is still an open question for me, i have a manual workaround (steps in a work instruction) which is ok for now, but prone to human error.

If i ever find anything out, ill post a reply.

Thanks

0 Kudos