VMware Cloud Community
GLink
Contributor
Contributor
Jump to solution

Set MAC address to auto from PowerCLI / Duplicate MAC

We are having a duplicate MAC address problem when we move a server from one vCenter server to the other. Our method for moving the server is to disconnect the server from the one vCenter server  then attach it to the other vCenter server. For some reason the MAC address on guest does not change when it is attached. I would assume vCenter would regenerate a unique MAC address based on the vCenter unique ID but it does not seem to . Then the old vCenter seems to assign the old MAC address again on the next guest created therefore creating duplicate address.

We are trying to automate the process of moving a guest from vCenter to vCenter through PowerCLI. One of the fixes for duplicate MAC addresses is to set it to manual then back to automatic ( http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html )The problem comes in when we want to set the MAC address to a manual MAC back to automatic. The setting of the manual MAC address is no problem but we can not seem to figure out how to set the MAC address back to auto via PowerCLI. Anyone know of a solution?

Thank you in advance for any help provided.

Zac

We are running vCenter server 4.1 & ESXi 4.1 U1.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Have a look at Switch MAC address to automatic generated with Set-NetworkAdapter.

That might do what you're after.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

Did you check that both vCenter Servers have a unique vCenter Server instance ID? Because this id is used to generate a unique MAC address.

To view or change the vCenter Server instance ID:

  1. Log in to vCenter Server using the vSphere Client, and select Administration > vCenter Server Settings.
  2. Select Runtime Settings.
    The vCenter Server Unique ID text box displays the current vCenter Server instance ID.
  3. If this ID is not unique, enter a new value between 0 and 63 in the vCenter Unique ID text box and click OK.
  4. If you changed the vCenter Server instance ID, you must restart vCenter Server for the change to take effect.


Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
LucD
Leadership
Leadership
Jump to solution

Have a look at Switch MAC address to automatic generated with Set-NetworkAdapter.

That might do what you're after.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
GLink
Contributor
Contributor
Jump to solution

We do have separate ID's. We actually have a total of 3 vCenter servers. The only thing I can figure is that the way we are moving guests is causing a problem. I wish there was a built in way to move guests between vCenter servers. Thanks for the response.

Zac

vcenter-dr.PNG

vcenter-prod.PNG

vcenter-test.PNG

0 Kudos
GLink
Contributor
Contributor
Jump to solution

Thanks for the answer. I did not see that post. It got us going in the correct direction.

Zac

0 Kudos