Last updated on September 22, 2020 by Dan Nanni
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:
# cd vmfs/volumes/datastore1/[name-of-vm]
.vmx file with a text editor, and add the following fields. Replace the MAC address field with your own.
ethernet0.addressType = "static" ethernet0.checkMACAddress = "false" ethernet0.address = "00:0c:29:1f:4b:ac"
Now you should be able to launch a VM with the static MAC address you defined in
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.