davidjerwood
Enthusiast
Enthusiast

VM MAC's Change when migrating to DR

Jump to solution

Hi All,

I have 6 ESX 3.5 Servers, 3 on our live site and 3 on our DR site. They are connected to NetApp Storage with is snapmirrored to our DR site which is connected to our 3 ESX Servers at DR.

I have noticed that when we flip to DR the virtual machines mac address change.

Today I am testing, I have shutdown all vm's on datastore1 (Test Datastore), run a snapmirror quiesce and snapmirror break imported the vm's on the dr site from the dr snapmirror, importeted a vm into the inventory, it asks if I want to keep the uuid (I accept), the machine boots fine and works. But the mac address has changed.

This is causing me issues for several reasons, but mainly we used reserved mac addresses allocated to mac address.

Does anyone have any ideas on how to resolve this issue. We are flipping all our production to DR this friday and this needs to be resolved.

0 Kudos
1 Solution

Accepted Solutions
doctormiru
Enthusiast
Enthusiast

Hi

Edit the settings of your VMs and add the following value under General Options / Advanced Settings.

uuid.action = keep

You can also script this for all your VMs by using the command: vmware.cmd setconig

This will prevent the VMs to create a new UUID and thus also a new MAC address if running on different HW or storage.

regards

-


drmiru

see my blog: www,miru.ch

-


View solution in original post

0 Kudos
10 Replies
Monoman
Enthusiast
Enthusiast

Have you tried hard coding the MACs in the client OSs?

0 Kudos
Yattong
Expert
Expert

You need to set the mac address to static in the .vmx file.

www.vmware.com/pdf/vi3_301_201_server_config.pdf page 65-67

Good Luck

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points ~y
kjb007
Immortal
Immortal

The problem is that you are technically adding the vm to a "different" vm, and so your mac will be regenerated, although it appears it should not be. To force the mac to stay the same, change it in your .vmx file. If you don't change your accept forged transmits and accept address changes, then modifying the mac address in the OS can cause your vSwitch to reject those packets.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
davidjerwood
Enthusiast
Enthusiast

Thanks for everyone's help.

I downloaded the virtual mac tool to assist me changing all my vm's to static mac's. But I have another related issue now.

Currently I have approx 160 vm's all dynamic mac's. All of these have dhcp reservations linked to MAC. So obviously changing the mac to the static range would be a huge issue as the dhcp reservation would be incorrect.

So I thought I would just assign the dynamic mac to each vm statically, but after testing on one get the following message "Invalid MAC address specified. Failed to configure". So I am assuming it has to be from the static range.

Is there a way around this issue. What can I do?

0 Kudos
kjb007
Immortal
Immortal

Haven't used the assist tool, but it probably does some internal checks to see if you are in the "valid" range. I would try changing one .vmx file by hand to see if that allows you to do it. Then run a script to update the other files. I believe powershell vi toolkit allows you to do this as well, but I'm not sure if it also will do a check to see if you are in the valid range.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
Yattong
Expert
Expert

Hey Dave,

Trying following the instructions on Xtravirt, then you'll prob know what needs to be done and script it as kjb says.

http://virtrix.blogspot.com/2007/04/vmware-configuring-static-mac-address.html

Good Luck

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points ~y
davidjerwood
Enthusiast
Enthusiast

Sorry if it was not clear. The tool works great. But when I try to power on the machine is errors. So I assume the actual vm completed a check to ensure that the mac is in the static mac range.

0 Kudos
davidjerwood
Enthusiast
Enthusiast

That article would work, to change the dynamic mac to a static mac from the static range, just the same as the tool I use does.

The problem is I don’t want to change mac address due to my dhcp reservations. So i want to set a static mac address but from my dynamic range. So basically the mac is the same but static.

0 Kudos
kjb007
Immortal
Immortal

Yes, static mac's do have to be in that range. In that case, though, you'll have to change your virtual switch policy and allow mac address changes, and then set MAC in your OS as monoman suggested. Make sure those policies are allowed, and the OS configured mac should work.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
doctormiru
Enthusiast
Enthusiast

Hi

Edit the settings of your VMs and add the following value under General Options / Advanced Settings.

uuid.action = keep

You can also script this for all your VMs by using the command: vmware.cmd setconig

This will prevent the VMs to create a new UUID and thus also a new MAC address if running on different HW or storage.

regards

-


drmiru

see my blog: www,miru.ch

-


0 Kudos