Main Menu

vSphere – Problems with licencing and MAC addresses after 5.1 ESXi host upgrade

After upgrading an ESX cluster from vSphere 5.0 to vSphere 5.1 a VM failed to reboot.. Instead, an error message was issued:

Failed to start the virtual machine.  Module DevicePowerOn power on failed.  Could not set up “macAddress” for ethernet0. Invalid MAC address specified.  00:0C:29:A0:B0:1D is not an allowed static Ethernet address. It conflicts with VMware reserved MACs.

Troubleshooting

The VM used to run on VMware Server and was transferred later to the ESX infrastructure. It acts as a license server. The services installed are tied to the MAC address of the LAN adapter, Therefore, in the past, the virtual MAC address was assigned statically. Unfortunately the selected MAC address was in the range of VMware’s dynamically assigned addresses. That wasn’t a problem for previous ESX versions, although the method is not recommended. Since version 5.1 addresses in the range 00:0c:29:x:x:x are strictly reserved for dynamic allocation. In the VMX file of the VM, however, was the following entry:

I first put the adapter address in the vSphere Client to “dynamic” and on the next reboot I got an address from the range 00:50:56:x:x:x. The VM did start, but the license service stopped working. So I shut down the VM and edited the VMX file, by entering the original value for the MAC address.

ethernet0.address = "00:0C:29:A0:B0:1D"

Bug exchange

So I got a new error:

“00:0c:29:xx:xx:xx is not an allowed VPX assigned Ethernet address. Invalid MAC address specified. Failed to configure ethernet0.”

The problem was, that the changing from “static” to “dynamic” in the virtual machine settings the addresstype changed to “vpx” automatically.

ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:0c:29:xx:xx:xx"

At this point one has to understand, how addresses are generated.

  • generated : automatically generated by the MUI (MAC address starts with 00:0c:29)
  • vpx : generated automatically by vCenter (MAC address starts with 00:50:56)
  • static : manually assigned MAC address

A correct configuration must look like this:

ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:xx:xx:xx"

(*) Please replace xx:xx:xx with desired bytes. Don’t enter xx:xx:xx into your VMX file! (Thanks for the hint, Al) :-)

After that, you can boot the VM normally again. If you look at the settings, you’ll see the correct MAC address.

MAC is still being generated

In some cases I could see, the correct MAC in the VM settings (while the VM was powered off) in the first place (as shown above), but after starting the VM the MAC has been regenerated. This was due to the UUID of the VM.

Here you have to adjust the last three bytes of uuid.bios to the last three bytes of the desired MAC address. On next boot of the VM you may be asked, whether you have copied or moved the VM. Here you have to choose the “I moved it” selection, because otherwise a UUID and a MAC will be generated on random.

The easiest way to fix the issue is to make a copy of the VMX file with the VM still running on a non upgraded host. Update the copy of the VMX file with the ethernetX.addressType, ExthernetX.generatedAddress and the uuid.bios values (for all the vNics attached), shut down the VM, upload the new VMX, and power the VM back on. This will have your licencing VM off for a very small amount of time.

Once powered up, you can vMotion it over to a 5.1 host and then upgrade the 5.0 host at leisure.

 

(credits to www.elasticsky.de for some of the content)

One Response to vSphere – Problems with licencing and MAC addresses after 5.1 ESXi host upgrade

  1. Ahmed December 23, 2014 at 12:01 am #

    Very very thanks

    Working nice.

    I am very happy :)))))

Leave a Reply