How to set a static MAC address in VMware Environment?

How to set a static MAC address in VMware Environment?.

Quick tip today on a static MAC address assignement, How to set a static MAC address in VMware Environment? Or rather what to look after when having alarms showing VM MAC conflict. MAC address "Spoofing" if you prefer, is well known…. Sometimes you may need to "mess" with MAC address, and assign a static one, when for example using a software which is tighten to the MAC address. If not your license will be voided.

So far I had this case only once for some old software. If I remember right it was an Architecting software.  As you might know, the MAC addresses are assigned via vCenter server, they are generated for VM's NICs and VMkernel adapters. They are created automatically when youi create a VM, Add a NIC or Add a VMkernel adapter to a VM.

First few words about OUI. What is OUI? Each network adapter manufacturer is assigned a unique three-byte prefix called an Organizationally Unique Identifier (OUI). VMware has 3 different ways to allocate MAC addresses, where each one of those is with separate OUI.

  • Generated MAC Adresses – those addresses can be further be separated in two groups, where:
    • Group 1 – Assigned by vCenter server
    • Group 2 – Assigned by ESXi host
  • Manual – in this case you can define the value of the MAC address manually
  • Generated for legacy VMs – those VMs are no longer userd with ESXi.

MAC Address Change

The whole MAC address is composed of:

  • VMware OUI
  • A SMBIOS UUID or the unique ID of the host
  • Hash based on the name of the entity that the MAC address is being generated for.

When a MAC address conflicts occurs?

There might be a situation where you're using replication software to replicate your VMs. As the replicas do have the same VMX file, basically you'll have an alarms in your vCenter telling you that you have a MAC address conflict. The alert gets triggered on the initial run, after the collision is detected, vCenter Server changes the MAC address of the VM that's why it doesn't match with the original one.

VM MAC address conflict

VM MAC address conflict

As a solution to this problem you might want to specify a resolving event for this alarm, so once MAC address is changed, you no longer see this alarm in an opened state. For Veeam Backup for example,  the default suffix is "_replica". So If you add a trigger condition to each of the alarm triggers (VM MAC conflict, VM static MAC conflict) with as a value = "VM name" and operator = "does not end with", and Value = "_replica" you can get rid of the alarm without completely deactivating the MAC address conflict alarm. Thing that is not recommended, indeed.

When Multiple Static MAC addresses are used in your environment

If you do have two VMs with the same static MAC addresses, an alarm shows it off..

MAC Address Manually assigned generates an alarm

MAC Address Manually assigned generates an alarm

vCenter Instance ID – What is that?

If you're running multiple vCenters, make sure that you configure theme with the same vCenter server Instance ID, which is  a number between 0 and 63 that is randomly generated at installation time, but can be reconfigured after installation. If you deploy virtual machines from multiple vCenter Server systems to the same network, these vCenter Server systems must have unique instance IDs. When you change the vCenter Server Unique ID, the autogenerated MAC addresses are different.

When you change the vCenter Server Unique ID, the autogenerated MAC addresses are different.

Where to look for vCenter instance ID?

vCenter Instance ID

vCenter Instance ID

And then you see the value in the Runtime settings….

vCenter Instance ID

You must restart vCenter Server for the change to take effect.

You can also force vCenter Server to generate a new MAC address for the virtual network adapter of your VMs by configuring the virtual network adapter to use a Manual MAC address, and then reconfiguring it to Automatic.

Source: VMware KB – Virtual machine MAC address conflicts or have a duplicate MAC Address when creating a virtual machine

How to set a static MAC address in VMware Environment?

4.5 (90%) 2 votes

Video How to set a static MAC address in VMware Environment?

How to set a static MAC address in VMware Environment?


Source: www.bing.com< /a>
Images credited to www.bing.com and i.ebayimg.com


Related Posts To How to set a static MAC address in VMware Environment?


How to set a static MAC address in VMware Environment? Rating: 4.5 Posted by: Brot Trune

Search Here

Popular Posts

Total Pageviews

Recent Posts