maandag, april 02, 2007

VMware: configuring a static MAC address in a VM

Sometimes it can be necessary to configure a static MAC address in a VM. A typical issue during P2V is an application that has its licensing based on the MAC address.

VMware has defined that VirtualCenter does not use the following range: 00:50:56:00:00:00 to 00:50:56:3F:FF:FF where 00:50:56 is the OUI.

The steps:

  1. Power off & remove the server from the VirtualCenter inventory. This is a necessary step, because VC will overwrite your settings during Power On!
  2. Edit the .vmx file and locate the following generated MAC address:
    Ethernet0.addressType =
    Ethernet0.generatedAddress =
  3. Change the value for ethernet0.addressType from “vpx” to “static”
  4. Change ethernet0.GeneratedAddress to ethernet0.Address
  5. Change the current MAC to a MAC address in the following range:
  6. In VirtualCenter, select an ESX host and go to storage
  7. Browse the data store & locate your VM
  8. Right-click on the .vmx file, and select Add to inventory
  9. Power On the server. Issue the command ipconfig /all and locate the VMware NIC. Your manually assigned MAC address should be there.

I know you can set your MAC address inside Windows, but I would avoid this.

4 opmerkingen:

Jase zei

You are correct that VirtualCenter will overwrite your settings.

However, if you start the VM from the command line on the ESX host, VirtualCenter will not overwrite the .vmx settings.

Also, you can force this setting from inside VirtualCenter.

With the VM powered off, choose Edit Settings, choose Options, choose Advanced, choose Configuration Parameters, then Add Row, you can enter the ethernet0.addresstype and ethernet0.address values.

Once added, they will disappear the next time you look at the Configuration Parameters window, but the changes will be there.

Good post though.


Cova zei

Or you could use the tool I wrote to automate this. Our environment requires a fixed MAC address for every server, and I got sick of doing them manually.

It is currently hosted over at - you can get it here:

Vincent Vlieghe zei

I do agree with Rob: when you have to do it x-times, use his VirtualMACTool. Tried, tested & working :)

budzy zei

Changing the physical address in windows is fine.