Everyone knows the physical address (MAC address) of a network adapter must be unique, this condition is also true for virtual network adapters, if two or more virtual machines have the same MAC address, you are going to see Event ID 28, Source: VMSMP often appears in event view of the Hyper-V host. This is a real problem because one of the machines lose network connectivity affecting services.
Microsoft has ownership of the MAC addresses that begin by 00-15-5D. This address scope is reserved for Hyper-V. If you run the command IPCONFIG /ALL in a virtual machine and the MAC address starts with 00-15-5D know that this virtual machine is running on Hyper-V. Did you know that? For you to see which address scope Mac Address, open Hyper-V, right click the server name and select Virtual Switch Manager, then select MAC Address Range in the category Global Network Manager. I did this on my server and look down the start and end addresses.
There are a range of initial and final that known as minimum and maximum respectively address. Note that both the minimum and maximum address 00-15-5D begin with and the last address begins with 00 and ends with FF. Let's convert the address 00 and FF hex to decimal.
00 hexadecimal = 00 decimal
FF hexadecimal = 255 decimal
That means we have 254 available MAC addresses on Hyper-V, the first virtual machine created will have the MAC address 00-15-5D-00-03-01, the second one 00-15-5D-00-03-02 and so on until you reach the 00-15-5D-00-03-254 address. But as the addresses 00-03 were created? If you run the command ipconfig on the host Hyper-V you will have the answer. The third and the fourth octet of the IP address 172.16.0.3 were converted from decimal to hexadecimal
00 decimal = 00 hexadecimal
03 decimal = 03 hexadecimal
Gilson you're saying that the range of MAC address of Hyper-V physical server is created based on the IP address of the server? Yes, that's right, it uses the third and fourth IP address. This information is stored in the following registry key
When you change the IP of the server and restarts the service of Hyper-V the range of MAC address does not change. Have you noticed that if another Hyper-V server has even temporarily the 172.16.0.3 IP address, it will have the same range of MAC address and the virtual machines have the same MAC address that a conflict will occur? Carefully before installing the Hyper-V in Windows make sure that the IP address used was never used on another Hyper-V server before, because there is a possibility of generating a conflict problem in the environment.
If you have two or more Hyper-V servers with the same range of MAC address, you have a problem, you must remove the two registry keys on one of the Hyper-V servers, remove the MaximumMacAddress and MinimumMacAddress keys and restart the service Hyper-V (no need to restart the server), In my lab I changed the address of the Hyper-V 172.16.0.3 to 172.16.0.4. After that, restart the service below:
Observe that MAC address range on Hyper-V was changed from 00-03 to 00-04
And the virtual machines that already had the old MAC address 00-03 with conflict? they will be dynamically changed to 00-04? The answer is no, only new virtual machines created. To solve the existing MAC addresses on virtual machines 00-03 to 00-04, you need to remove the virtual network and add a new one.
After all this, take a look at the new MAC virtual machine and make sure that the address was changed to the 00-04 range, making these changes the IP address is lost, you need to configure it again.
For finished this post, don’t forget that System Center Virtual Machine Manager 2008/2012 takes a different approach when managing virtual machines and MAC addresses by using static MAC addresses from a defined pool. This pool is used across all hosts. By default the pool is in the range of 00-1D-D8-B7-1C-00 to 00-1D-D8-F4-1F-FF for 3,998,719 available MAC addresses
When my Hyper-V servers are configured as a cluster and i do not use SCVMM, what happens when i move a VM from one Server to another. Will the VM change its MAC or not?
Thank You Gilson
Hi Eric, I believe is not change MAC at VM when change host.
awesome, thank you.
Good job Gilson. Thanks.