Static MAC addresses with VMware VMs

Setting static MAC addresses on a VMs vNic(virtual NIC)

Going from this KB, and using the hex converter if need be, we can generate a static MAC outside of the autogenerated MAC that vCenter will assign to a virtual NIC. To generate a static MAC:

1)Generate a static address that’s not in use.
The range of addresses we can use, to stay out of vCenter’s autogenerated ones, are 00:50:56:00:00:00-00:50:56:3F:FF:FF. 00:50:56: is the OUI (Organizationally Unique Identifier) given to VMware for generated addresses so we will edit the last 3 bytes, the Network Interface controller specific bytes, and append to the end. So we can generate an address between (0-63) : (0-255) : (0-255).
Refer to the spreadsheet to make sure the static MAC isn’t in use and generate one now. Add the new MAC/Server name to the spreadsheet.
2)Remove the VM from vCenter’s inventory. If you miss this step then vCenter may revert your changes.
3)Download the .vmx file so you can edit it. Open the .vmx for the VM with a text editor and make the following changes.
4)Change the value for ethernet0.addressType from “vpx” to “static”
5)Change ethernet0.GeneratedAddress to ethernet0.Address
6)Change the current MAC to the MAC you generated
7)Rename the current .VMX file on the datastore to *.VMX.Backup
8)Upload the newly edited VMX file to the datastore/VM containier
9)Add the VM back to vCenter’s inventory
10)Power up the VM and ensure the newly assigned static MAC stuck by running ipconfig /all in a command prompt




Leave a Reply