Wednesday, November 5, 2008

Setting a Virtual Machine's MAC Address

If you ever have the need to manually set the MAC address for a virtual machine, be aware that there is a limitation. There are two pools of potential MAC addresses - one for automatic assignment and one for manual assignment.

we had a situation where - because we were using software that generated its key based on MAC address - we wanted to migrate to from a physical machine that had died to a vm and the software was so old that the company was no longer in business. the rub was that the licensing was based on MAC address.

our initial thought was to re-assign the existing MAC address as we were never going to use the old server as it was being trashed. however, when i built the new vm i and then tried to assign the MAC address (Virtual Center --> Edit Settings --> Network Adapter 1), i received the following warning:

The MAC Address entered is not in the valid range. Valid values are between XX:XX:XX:XX:XX:XX and XX:XX:XX:XX:XX:XX


this appears to be due to the fact that different ranges of MAC addresses are used depending on whether the address was generated with the vm or manually assigned.

So how to address - no pun intended?

well, i chose to edit the vm's vmx file directly. in the file there is a reference to the MAC address for the virtual NIC. Simply edit this value - with all the obvious warnings taken to heart about duplicate values - and restart the vm:

ethernet0.generatedAddress = "XX:XX:XX:XX:XX:XX"

You should be good to go from there...

No comments: