we're in a situation where we need to remove the first 2 vNICs from ~1000 Linux VMs for a migration (to conform to policy).
All guests currently have 4 NICs (in vSphere these show as "Network interface 1", "Network interface 2" ... up to 4).
However, when removing the desired vNICs 1&2 (it's the same ones on all VMs), I am left with "Network interface 3" and "Network interface 4" in vSphere.
- created a snapshot on a machine with 4 vNICs to easily revert changes
- removed vNIC 1 & 2
- left over vNICs show as "Network Interface 3" and "Network Interface 4" but should be "Network Interface 1" and "Network Interface 2"
The team whose VMware cluster this is migrated to demands the vNICs to be named "Network Interface 1" and "Network Interface 2".
Is there a way to change the vNIC number on several machines/in an automated manner with the network staying online? (I guess it would be possible to remove all vNICs and readd them with the same MACs, but this requires downtime)
I haven't tested this without a snapshot yet, so it could very well be, that the vNIC numbers change accordingly when there are no "lingering" vNICs which might get re-added when restoring to a snapshot.
If anyone has the means to test this, be my guest
Thanks for reading!
Moderator: On the basis that the most likely solution is to use PowerCLI I am moving this thread to that area.
The same occurs without a snapshot.
The original label is kept. Which makes sense in a way I guess.
Afaik, there is no way, short of remove/add the vNICs, to change the number in the label.
A funny observation, you can change the label in the device via the API ReconfigVM method.
But although it runs without error, the label in the Web Client doesn't change.
Also, an unregister/register of the VM doesn't change the number in the vNIC label.
Thanks for your help After showing this to the receiving team they did not make the vNIC label numbers a hard requirement and we can follow through without changing the vNIC labels to 1 & 2.