Tuesday, June 12, 2007

VMWare Static MAC addresses

Today I needed to create a VM where the Ethernet MAC address does not change when the VM is moved to another machine or copied. I'm working with NeoWare's Device and Image Manager software. Their licensing is tied to the machine's MAC address. After a bunch of googling and trial and error, discovered how to set a static MAC address in VMWare workstation 6.

The VMWare document on this is a bit wordy and leaves a little bit to trial and error. http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=507

Here's what you need to know. The VM must be powered down and VMware must be closed.

You will need to locate and edit (notepad) the VM's .vmx file.
All references to ethernetN should be changed to match the ID of the Ethernet address who's MAC address you are setting. This is probably ethernet0

Remove the two lines that begin with the following from the configuration file:
ethernetN.generatedAddress
ethernetN.generatedAddressOffset

Change the line:
ethernetN.addressType = "generated"

to:
ethernetN.addressType = "static"


Add the following line to the configuration file:

ethernetN.address = 00:50:56:XX:YY:ZZ

In this line, XX must be a valid hexadecimal number between 00h and 3Fh, and YY and ZZ must be valid hexadecimal numbers between 00h and FFh. Because VMware Workstation virtual machines do not support arbitrary MAC addresses, you must use the above format.

Start the VM and you are done.

No comments:

Post a Comment