Aug 14, 2014 How to set a static MAC address on VMware ESXi virtual machine. Posted on August 14, 2014 by Dan Nanni 4 Comments. MAC statically. I couldn't use a different mac address, as I was forced by a license on the vm to use this specific one. You really saved me a lot of time and nerves ?. Jul 20, 2016 Quick tip today on a static MAC address assignement, How to set a static MAC address in VMware Environment? Or rather what to look after when having alarms showing VM MAC conflict. MAC address “Spoofing” if you prefer, is well known. Sometimes you may need to “mess” with MAC address. Assign a Static MAC Address with the vSphere Web Client. You can assign static MAC addresses to a powered-down virtual machine's virtual NICs. In the MAC Address section, select Manual from the drop-down menu. Type the static MAC address and click OK. When the Mac address changes option is set to Reject, ESXi does not honor requests to change the effective MAC address to a different address than the initial MAC address. This setting protects the host against MAC impersonation. The port that the virtual machine adapter used to send the request is disabled and the virtual machine adapter does.
ESXI 5.5 static mac address “conflicts with VMware reserved MACs”
▼
▲
You may see above error in ESXI 5.5 after changing dynamically generated MAC address to STATIC mac address dueto application MAC bind restriction.
In new ESXI 5.5 , new policies have been added where the statically assigned MAC addresses can only be in the range 00:50:56:xx:xx:xx series, If you try to change it to something else and then power on the guest machine, you may see above error.
Few days before, a friend of mine upgraded his ESXI from ver 5.0 to 5.5. One of his guest application was binded with the MAC address and the new esxi 5.5 doesn’t allow to use that specific series mac address. So I googled and found following solution that worked (at least for me ? )
☺
To RESOLVE this issue, follow this.
1- Enable SSH in ESXI Server Configuration
2- Turn off the target guest machine and change the mac address as per your requirements for the required interface.
3- Turn off the V-Sphere ESXI client.
3- Login to ESXI server via SSH using any ssh client like PUTTY
4- Goto your datastore / guestmachine folder and open the VMX file.
.
For example I have guest machine with ‘123‘ name. So I used following
~ # cd /vmfs/volumes/
/vmfs/volumes # ls
/vmfs/volumes # ls
52a18cdd-49376389-86aa-000c29d1de32 61031d71-0233e8da-be74-f942274c16c3
52a18ce5-9d0863e6-e50b-000c29d1de32 8901537a-ad66db83-fd1f-38ac926cce01
52a18ce7-bd9d6e2a-dacf-000c29d1de32 datastore1
/vmfs/volumes #
52a18ce5-9d0863e6-e50b-000c29d1de32 8901537a-ad66db83-fd1f-38ac926cce01
52a18ce7-bd9d6e2a-dacf-000c29d1de32 datastore1
/vmfs/volumes #
/vmfs/volumes # cd datastore1/
/vmfs/volumes/52a18ce5-9d0863e6-e50b-000c29d1de32 # ls
123
/vmfs/volumes/52a18ce5-9d0863e6-e50b-000c29d1de32 # ls
123
/vmfs/volumes/52a18ce5-9d0863e6-e50b-000c29d1de32 # cd 123
/vmfs/volumes/52a18ce5-9d0863e6-e50b-000c29d1de32/123 # ls
/vmfs/volumes/52a18ce5-9d0863e6-e50b-000c29d1de32/123 # ls
123-flat.vmdk vmware-14.log
123.nvram 123.vmxf vmware-15.log
123.vmdk vmware-11.log vmware-16.log
123.vmsd vmware-12.log vmware.log
123.vmx vmware-13.log
123.nvram 123.vmxf vmware-15.log
123.vmdk vmware-11.log vmware-16.log
123.vmsd vmware-12.log vmware.log
123.vmx vmware-13.log
As showed in the image below . . .
↓
Now open the VMXfile of the guest machine.
for example
now press I and add this line anywhere.
(Change the ethernet0 to match your local ethernet number)
Now save and exit it by pressing :wq
Now start V-Sphere ESXI client and start the machine as you normally do ?
Congrats you are UP with new MAC address activated ?
↓
SAMPLE .VMX FILE FOR STATIC MAC address
Following is an sample of working .vmx file for static mac address.
▼
▼
♥
Regard’s
Syed Jahanzaib
Syed Jahanzaib
24.85100067.008300
Question: I want to assign a static MAC address to a virtual machine (VM) on VMware ESXi. However, when I attempt to start a VM with a static MAC address, the VM fails to start and throws an error '00:0c:29:1f:4a:ab is not an allowed static Ethernet address. It conflicts with VMware reserved MACs'. How can I set a static MAC address on VMware ESXi VMs?
When you create a VM on VMware ESXi, each network interface of the VM is assigned a dynamically generated MAC address. If you want to change this default behavior and assign a static MAC address to your VM, here is how to do it.
As you can see above, VMware's vSphere GUI client already has a menu for setting a static MAC address for a VM. However, this GUI-based method only allows you to choose a static MAC address from 00:50:56:xx:xx:xx, which is VMware-reserved MAC address range. If you attempt to set any arbitrary MAC address outside this MAC range, you will fail to launch the VM, and get the following error.
Then what if I want to assign any arbitrary MAC address to a VM?
Fortunately, there is a workaround to this limitation. The solution is, instead of using vSphere GUI client, editing .vmx file of your VM directly, after logging in to the ESXi host.
First, turn off the VM to which you want to assign a static MAC address.
Enable SSH access to your ESXi host if you haven't done it already. Then log in to the ESXi host via SSH.
Move to the directory where your VM's .vmx file is located:
Open .vmx file with a text editor, and add the following fields. Replace the MAC address field with your own.
Now you should be able to launch a VM with the static MAC address you defined in .vmx file.
Download this article as ad-free PDF (made possible by your kind donation):
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Support Xmodulo
In Esxi Mac Address Manual Vs. Automatic Which One Is Preferred Account
Did you find this tutorial helpful? Then please be generous and support Xmodulo!