WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Does vCenter Server recycle VM MAC Addresses after Cross vCenter vMotion?

Does vCenter Server recycle VM MAC Addresses after Cross vCenter vMotion?

10.22.2021 by William Lam // 7 Comments

I recently received a question from a customer who was concerned that after a VM has been migrated from one vCenter Server to another using Cross vCenter vMotion, that the original source VM MAC Address could potentially be recycled and re-used at a later point. Back in 2015, I actually wrote about this very topic and the concerns around VM MAC Address duplication after a Cross vCenter vMotion, which I highly encourage folks to check out if you have not seen this article already.

While re-reading the article, I realized that the article had primarily focused on vCenter Servers that were in Linked Mode or under the same vSphere Single Sign-On (SSO) domain and although I did mention the Cross vCenter vMotion across across different vSphere SSO domains scenario, it looks like the details were a tad bit light.

To quickly summarize, when a VM is migrated from a source vCenter Server to the designation vCenter Server, the VM's MAC Address is added to a MAC Address "block list" on the source vCenter Server. This ensures that the VM MAC Address will not be reallocated by the source vCenter Server which would cause a network conflict. This has been the default behavior since vSphere 6.0 and no additional configuration change is required by customers.

What is not clear is whether this behavior also occurs for a VM that has been migrated across vCenter Servers that are not  part of the same vSphere SSO Domains or basically vCenter Servers not part of Linked Mode? The easiest way to verify the behavior was to simply test this in the lab! Before doing so, we can also check what MAC Addresses are currently in the "block list" by using a private vSphere API, which is accessible via the vSphere MOB called fetchRelocatedMACAddress

This API will return the list of MAC Addresses that is currently blocked by the given vCenter Server. To view the list, simply open the browser to following URL: https://[VCSA_FQDN]/mob/?moid=networkManager&method=fetchRelocatedMACAddress and authenticate with an administrative user. To invoke the API, click on the Invoke Method button and you will either see no results, which means you have not performed any Cross vCenter vMotion or a list of VM MAC Addresses which have been blocked.


Now we can perform a Cross vCenter vMotion and upon completing the operation, we can now re-run the vSphere API on the source vCenter Server and what we should see is that the VM that was migrated, its MAC Address has now been added to the block list, as shown in the screenshot below.


We can now definitively confirm that regardless of the vCenter Server(s) vSphere SSO domain configuration, once a VM has been migrated, the source vCenter Server will automatically add the VM MAC Address to its block list to ensure it is not reused again. If the VM is migrated back to the source vCenter Server, the block list will automatically be updated as mentioned in the original blog post. I still find it amazing that I can still learn something new every day, even for a feature that is over 6 years old!

More from my site

  • Duplicate MAC Address concerns with xVC-vMotion in vSphere 6.0
  • vMotion across different VDS version between onPrem and VMC
  • Bulk VM Migration using new Cross vCenter vMotion Utility Fling
  • When to use Move-VM cmdlet vs xMove.ps1 script for performing Cross vCenter vMotions?
  • Uniquely identifying VMs in vSphere Part 3: Enhanced Linked Mode & Cross VC-vMotion

Categories // Automation, vSphere, vSphere 6.0, vSphere 6.5, vSphere 6.7, vSphere 7.0 Tags // Cross vMotion, mac address, xVC-vMotion

Comments

  1. *protectedRaj says

    10/22/2021 at 10:11 am

    I think it it keep its MAC address. MAC address doesn’t change . I used HCX.

    Reply
  2. *protectedarunabhatech says

    10/22/2021 at 11:26 am

    Nice article 👍

    Reply
  3. *protectedJohn Admin says

    10/22/2021 at 1:23 pm

    Very nice post indeed... is there any way to grab the block list via PowerCLI?

    Reply
    • William Lam says

      10/22/2021 at 1:36 pm

      See https://williamlam.com/2016/07/how-to-automate-vsphere-mob-operations-using-powershell.html 🙂

      Reply
  4. *protectednneul says

    10/22/2021 at 6:40 pm

    Is there any endpoint to add to that list of relocated mac addresses? Such as if we were trying to coordinate avoiding mac addr conflicts between a pair of non-linked vcenters sharing same network?

    Reply
    • William Lam says

      10/22/2021 at 6:52 pm

      No

      Reply
  5. *protectedJD says

    01/13/2022 at 12:26 pm

    Does the Fling Utility or the now built-in vSphere functionality do any prechecks to confirm a duplicate MAC address does not exist in the target Vcenter? Or is there still a chance that a XVCVmo can cause a duplicate MAC when it reaches the target Vcenter?

    Thanks!

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...