vSphere 5.1 and later provides several schemes for automatic allocation of MAC addresses in vCenter Server. You can select the scheme that best suits your requirements for MAC address duplication, OUI requirements for locally administered or universally administered addresses, and so on.
The virtual NIC connects to a standard or distributed port group. Select the port group for the virtual NIC to connect to from the Network label drop-down menu. Advanced settings. The virtual NIC connects to a specific port on a vSphere distributed switch. This option appears only when a vSphere distributed switch is available. When a virtual machine is powered on, VMware Workstation automatically assigns each of its virtual network adapters an Ethernet MAC address. MAC stands for media access control. A MAC address is the unique address assigned to each Ethernet network device. The software guarantees that virtual machines are assigned unique MAC addresses within a given host system.
The following schemes of MAC address generation are available in vCenter Server:
![Port Port](/uploads/1/2/6/8/126892964/126002393.png)
![Get vm mac address Get vm mac address](/uploads/1/2/6/8/126892964/168346714.png)
- VMware OUI allocation, default allocation
- Prefix-based allocation
- Range-based allocation
After the MAC address is generated, it does not change unless the virtual machine's MAC address conflicts with that of another registered virtual machine. The MAC address is saved in the configuration file of the virtual machine.
Note:If you use invalid prefix- or range-based allocation values, an error is logged in the vpxd.log file. vCenter Server does not allocate MAC addresses when provisioning a virtual machine.
Preventing MAC Address Conflicts
The MAC address of a powered off virtual machine is not checked against the addresses of running or suspended virtual machines.
When a virtual machine is powered on again, it might acquire a different MAC address. The change might be caused by an address conflict with another virtual machine. While this virtual machine has been powered off, its MAC address has been assigned to another virtual machine that has been powered on.
If you reconfigure the network adapter of a powered off virtual machine, for example, by changing the automatic MAC address allocation type or setting a static MAC address, vCenter Server resolves MAC address conflicts before the adapter reconfiguration takes effect.
Get Vm Id
For information about resolving MAC address conflicts, see the vSphere Troubleshooting documentation.