Hello Everyone,
We are in the process of migrating from 2.5.3 to 3.0.1. I have a couple of VMs that have software that is dependant on the MAC address of the VM. Is there a way to force the VM to keep the same MAC address?
Thank you in advance
How can I set a static MAC address for my VM?
This is useful for software that is licensed by the MAC address of the server it is running on or if you migrate a physical server to virtual and want to keep the same MAC address. A VMs MAC address will change if the location of the VM changes, ie. different path on the same host. During a hot migration (Vmotion) the location of the VM does not change, this is also true of a VM that changes hosts due to HA/DRS migration. During a cold migration the location of the VM does change so the MAC address of the VM will change.
MAC addresses are hex values and consist of six groups of hex numbers. The first 3 octets of the MAC address is a unique code assigned to each NIC vendor, this is also called the Organizationally Unique Identifier (OUI), VMwares OUI is 00:50:56. The last 3 octets are assigned to all of the NICs for that vendor. Each MAC address must be unique to avoid conflicts with other network devices. You do not have to use the Vmware assigned range (00:50:56) for your NICs. If you are coming from a physical server you can use the previous NICs range instead, (ie. HP/Compaq NICs use 00:08:02) as the first 3 octets. Just make sure the physical NIC and virtual NIC with the same MAC address are not active on the same physical network at the same time. There are several methods for setting a static MAC address on a VM which are listed below. If you use the first method you must stay inside Vmwares allowed MAC addresses (00:50:56:00:00:00 00:50:56:3F:FF:FF) or the VM will not start
Editing the VMX file of the VM:
Edit the VMX file of the VM
Change the following line from ethernetN.addressType="vpx" to ethernetN.addressType="static" (N is the number of your ethernet adapter, usually 0)
Next change the line ethernetN.GeneratedAddress to ethernetN.address and then change the current MAC address to 00:50:56:XX:YY:ZZ (again N is the number of your ethernet adapter and XX is a valid hex number between 00 and 3F, and YY and ZZ are valid hex numbers between 00 and FF. The value for XX must not be greater than 3F in order to avoid conflict with MAC addresses that are generated by the VMware Workstation and VMware GSX Server products.)
Power your VM back on. Login to the OS, go to the CMD prompt and type ipconfig /all, your manually assigned MAC address should be listed for the NIC that you changed
Setting the NIC properties in Windows
Edit the Local Area Connection propeties for the NIC you want to change
Click the Configure button next to the NIC name
On the Advanced tab select NetworkAddress
In the Value field enter a new value for the MAC address, enter only numbers or letters, no spaces, dashes or colons. This MAC address can be any valid hex numbers between 00 and FF for any of the octets
Click OK and thats it, the new MAC address takes effect immediately and will override any MAC address set by Vmware
Hi, I have a software license that depends on the MAC address. I had this installed on a physical machine and I virtualized it.
I tried to change the generated mac and use the physical mac instead, following this steps
"Setting the NIC properties in Windows" . But there is a message saying that the mac address range must be:
00:50:56:00:00:00 00:50:56:3F:FF:FF
so I can't use the physical mac! why it can be?
The vm guest OS is Win 2003 standard ed.
Thanks
There's a workaround:
add a second vNIC to the guest, this vNIC doesn't need an actual connection to a pNIC
modify the MAC address inside the VM and make sure you allow forged MAC addresses on the vSwitch level
Do you mean,
create a new vSwitch without pNic, and create the second vNic and attach it to this no-networking-vSwitch?
or
use the same vSwitch that has a pNic attached on it (the one used by the first vNic) and just maintain disconnected from the network?
Will this second vNic have an ip Address?
Thanks
It really doesn't matter...
If you use the first approach the forged MACs setting only affects a non-reachable vNIC AND the old physical system still can be connected to the network (if desired).
On the other hand this (vSwtich without a pNIC attached) could lead to vMotion issues.
In any case (using a pNIC or not) I would use a dedicated vSwitch (due to the security implications).
If the VM has an IP bound to the NIC shouldn't matter since the licensing checks for the MAC address and not the IP.
Ok, this is what I did
I created a vSwitch without physical Adapter, I created the second vNic and attached this to the vSwitch.
In vSwitch's properties, I have Mac Address Changes = Accept and Forged Transmits = Accept
It's all this configuration right to do what I need to do?
Thanks
Looks good. Now you only have to modify the MAC from within the VM.
And of course test the licensing software...
Ok, I let you know about the results.
Thanks a lot!
Do I have to change something in the vm .vmx file before changing the MAC?
Not that I'm aware of