Latest Articles

Assign a static MAC Address to a Virtual Machine on VMware infrastructure.

A few days ago I was P2V’ing some servers for a customer. The servers had application license bound to the MAC address of the NIC adapter so I had to change the auto-generated MAC address to a static one.

Follow these steps to change the MAC address from auto-generated to static.

  1. First, remove the VM from the vCenter Server inventory.
  2. Open the datastore containing the VM and download the .vmx file. Optionally, make a back-up copy of this file for safe keeping.
  3. Open the .vmx file (I use Notepad++) and modify the following entries:
  4. Change the ethernet0.addressType to static: ethernet0.addressType = “static”
  5. Add the following line: ethernet0.checkMACAddress = “FALSE”
  6. Change the ethernet0.generatedAddress line to: ethernet0.Address = “<00:AA:BB:CC:DD:EE>” (enter the old MAC address here)
  7. You should end up with something similar to this:
  8. Next, save the .vmx file and upload it back to the datastore. Overwrite the existing file.
  9. Add the VM back to the vCenter Server inventory and power on the VM.
  10. Done πŸ™‚

You can verify the MAC address in the Windows VM by typing: C:\>ipconfig /all from the command prompt.

Cheers!

– Marek.Z

About Marek (288 Articles)
Marek is an IT professional with 15+ years of experience in the IT industry and is currently working as PSO Senior Consultant SDDC at VMware for the NEMEA region.

Leave a reply...