VMware Cloud Community
adithya_bhat
Contributor
Contributor
Jump to solution

how to Retrieve MAC address from migrated vm

Hi,

we have VM which got migrated to another host server. we have a application under this VM, which dependent on MAC. how do i find the old MAC address and is it possible to retain same MAC address for the same server.

will it take same MAC if we move back to it's previous host?

Regards,

Adithya

0 Kudos
1 Solution

Accepted Solutions
grasshopper
Virtuoso
Virtuoso
Jump to solution

Determine where your VMs are registered:

vmware-cmd -l

Determine previous MACs Assigned to a particular VM:

cat /path/to/your/vm/vmware*.log |grep MAC

Example Input/Output:

\# cat /vmfs/volumes/local_0/USATLVAPP02/vmware*.log |grep MAC

Jun 26 14:08:58.244: vmx| Ethernet0 MAC Address: 00:0c:29:cf:dc:6d

Jun 26 14:48:48.664: vmx| Ethernet0 MAC Address: 00:0c:29:cf:dc:6d

very low tech, but certainly gets what you're looking for.

View solution in original post

0 Kudos
7 Replies
MR-T
Immortal
Immortal
Jump to solution

You won't be allocated the same mac if it moves back.

To fix the MAC address you need to edit the vmx file and replace the ethernet0.addressType="vpx" with "static"

Then you need to add a MAC address from the range:

00:50:56:00:00:00-00:50:56:3F:FF:FF

To add your MAC address, edit the entry as follows:

ethernet0.address = 00:50:56:3F:FF:FF

Delete any other entries for generated addresses.

0 Kudos
adithya_bhat
Contributor
Contributor
Jump to solution

Thanks for your suggestion,

Please let me know if we can get its provious MAC address (may be from any logs / cache in the ESX where it was hosted earlier).

0 Kudos
oreeh
Immortal
Immortal
Jump to solution

You can try and check the older logs.

0 Kudos
jccoca
Hot Shot
Hot Shot
Jump to solution

Hi,

Try looking into Tasks & Events in Virtual Center.

0 Kudos
Rumple
Virtuoso
Virtuoso
Jump to solution

I always generate a MAC using the tool from vmguru.com and then I add it into the advanced settings of the network card so that windows controls the mac, not the vmx (incase i ever recreate the vmx file for whatever reason).

0 Kudos
grasshopper
Virtuoso
Virtuoso
Jump to solution

Determine where your VMs are registered:

vmware-cmd -l

Determine previous MACs Assigned to a particular VM:

cat /path/to/your/vm/vmware*.log |grep MAC

Example Input/Output:

\# cat /vmfs/volumes/local_0/USATLVAPP02/vmware*.log |grep MAC

Jun 26 14:08:58.244: vmx| Ethernet0 MAC Address: 00:0c:29:cf:dc:6d

Jun 26 14:48:48.664: vmx| Ethernet0 MAC Address: 00:0c:29:cf:dc:6d

very low tech, but certainly gets what you're looking for.

0 Kudos
adithya_bhat
Contributor
Contributor
Jump to solution

Hi grasshopper,

Thanks a lot. you suugestion worked. we are able to see the old MAC address from the logs and changed in VMX file. Our application is working fine now.

Thanks & Regards,

Adithya

0 Kudos