VMware Cloud Community
santosh42
Enthusiast
Enthusiast

mac address of Vmware VM changes after migration ?

Hi,

I wanted to understand if the vmware VM's mac addresses change if the machine is migrated during hot migration or vmotion ?

Any thoughts please ?

Thanks

Reply
0 Kudos
16 Replies
Troy_Clavell
Immortal
Immortal

no, the MAC address will not change.

AndreTheGiant
Immortal
Immortal

MAC address will change if you make a clone of the VM.

But not if you use the vCenter / migrate function.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
santosh42
Enthusiast
Enthusiast

thanks folks.

Is it documented by vmware anywhere that the mac address is preserved with a hot migration ?

i am really finding it difficult to search for such kind of a document on the vmware website.

If you can provide me a link for the documentation, that would be really great.

Thanks.

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

The MAC address is written in the vmx file (also with the VM UUID).

So vMotion or a host migration does not move this file and for this reason does not change it.

A datastore migration will move the file, but also will keep as-as (it's a move operation).

But a clone operation is a copy plus a modification of the vmx file (to have different MAC address and unique UUID).

For this reason if you make a manually copy and then add the vmx to the inventory and power-on the VM you will prompt for a message asking if you have copy or moved the VM.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

a vMotion is a move of the memory state of a guest from one ESX(i) Host to the other.  Therefore, it has no impact on the MAC address of the guest.


Below is an example of how vMotion works

http://www.vmware.com/files/pdf/VMware-VMotion-DS-EN.pdf

Reply
0 Kudos
santosh42
Enthusiast
Enthusiast

so does that mean a storage vMotion will change the mac address of the VM ?

Reply
0 Kudos
a_p_
Leadership
Leadership

No, neither vMotion nor Storage vMotion or cold migration will change the VM's network settings.

André

Reply
0 Kudos
bulletprooffool
Champion
Champion

Hi santosh.

Under no circumstances does Mac address change, during the lifespan of a VM.

the mac address is stored in the .vmx file and the vmx file is the identifier/config file for this VM.

vMotion // Storage vMotion / HA etc all simply reference and use the original file and do not amned the file in any way.

Even if you removed the VM from inventory, move the files somewhere else and then re-import the VM from the .vmx file, you will not change the Mac.

The only time it will change is if you have either cloned the VM(creating a new .vmx file) or whhen importing a VM been promted as to whether you had copied or moved the VM and chose the 'copied' option (Of couse if you say you had copied a VM, it assumes that this is a new .vmx file and so sees it as a new machine)

Lastly, it is possible to right click a VM and manually selct your MAC address if you like - by default it can be any address in the following format:

00:50:56:xx:xx:xx

Good luck

One day I will virtualise myself . . .
santosh42
Enthusiast
Enthusiast

thanks a lot.

So, if i import a VM from Vmware Workstation to VMware ESX server, then does that change the mac address ?

I would have tried myself this use case but i currectly don't have access to a vmware workstation so that i can perform a import.

Please help with answers.

Thanks.

Reply
0 Kudos
bfperez
Contributor
Contributor

Moving between hosts in an HA cluster with shared  (iSCSI) storage, i've not seen a MAC address change in thousands of migrations-hot and cold.

BUT, in a test environment with two 4.1u1 hosts sharing only a network, using local storage, a cold migration (host and datastore) did change the MAC.  When the guest OS came up, the two network adapters previously in the machine were replaced with two new ones.

The event log showed two entries like this:

Changed MAC address from  to XX:XX:XX:XX:XX:XX for adapter VM Network warning 5/18/2011 8:16:46 PM MACHINE

(MAC address changed to X's and VM name was changed to MACHINE for this post)

We don't be moving them much like this, but it was pretty irritating to have happen.  I confirmed that the vSwitches had the same name and there were no issues with validation when doing the migration

Reply
0 Kudos
gdevelek
Contributor
Contributor

I find some of the answers quite bizzare, because just yesterday, on an ESX 4.0 system, using the Vcenter GUI client, I migrated a VM to a new datastore withing the same ESX host, and the MAC address changed and completely messed me up, because a licensed product that relies on the MAC address stopped working (obviously).

I didn't do any manual work, I just used the GUI, it worked nicely and fast, but when I booted the migrated VM, the nightmare started, as this is a production system:

  • The virtual card had a new MAC address
  • Linux (Suse) had an eth1 interface, in place of the previous eth0
  • The host was inaccassible via Ethernet, we had to use the console to work on it.

We couldn't force the VM to use the previous MAC address through the "edit VM settings" page, because it was outside the allowed range for manually entered addresses.

An associate at some point made a syntactic error in the .vmx file, and miraculously the system at boot time assigned the previous desired address, and the problem was thus solved out of mere coincidence, at 2am.

Gurus, please englighten me/us... Smiley Wink

Reply
0 Kudos
NeilRHunter
Enthusiast
Enthusiast

I was under the impression that MAC addresses change during a host upgrade.....or at least may.

I'm sure I read that in the documentation.  If I find it then I will post it in here.

Reply
0 Kudos
goppi
Enthusiast
Enthusiast

Did you find I solution?

I have the same problem with VShpere 4.1u1.

I simply choose Migrate VM from VCenter and choose to only change datastore.

The migration went properly however after powering up I had to notice that

the MAC address of the machine changed which messed up the software installed.

Cheers.

Reply
0 Kudos
nancy31
Enthusiast
Enthusiast

Hello goppi,

I just want to ask if just let it that way.  MAC address of the machine changed which messed up the software installed.  Or you did another attempt to correct the error.  I just want to know what you did so that i can take notes and use your procedures if ever it will happen to me.

Thanks http://imagicon.info/cat/5-59/1.gif

Reply
0 Kudos
Rbriones8128200
Contributor
Contributor

Mac address, change when you do vmotion, because you have a switch either distributed or standard from a different version, the switch you can have between the hots esx or vmware workstation are different. I hope the answer helps, is what happened to me and the only way to solve it is to let you change the mac on a non-productive schedule, or edit the .vmx file for applications that hunt with the mac address.

Regards

Reply
0 Kudos
vijayrana968
Virtuoso
Virtuoso

So I am about to migrate bunch of servers to from old vcenter to new. I will clone those servers and after mounting old lun to new esxi hosts on new vCenter I am gonna select 'I have moved this vm' for migrated cloned VMs. Since the new MAC will already generated on existing vCenter where I will do cloing...My question is.

Do I need to change MAC address to existing one (generated on cloned VMX on old vcenter) before registering on new vCenter ? I am going to check with application vendor if application is MAC aware. along side this I also want to check that is it mandatory to change it existing one for OS network connectivity or the new assigned MAC will work !

Reply
0 Kudos