MAC addresses are assigned at the bootup of a virtual machine. But there is a way to assign a fix hardware address to a vmware network interface by editing the virtual machine with Vi.

Simply connect with SSH to your ESXi and go to /vnfs/datastore1 or anywhere you put your vm.

If your virtual machine is called vm1, go to /vmfs/datastore1/vm1

Open the file vm1.vmx using Vi.

Around the end of the file there will be the configuration of the network interfaces.

You should see things like:

ethernet0.virtualDev = “e1000”
ethernet0.networkName = “VM Network”
ethernet0.addressType = “generated”

Add a line at the end of this section:

ethernet0.address = 00:50:56:00:00:80

If you have more than one NIC, replace ethernet0 by the appropriate value.

I chose 00:00:80 for this vm but you can choose anything with that patern:

00:50:56:XX:YY:ZZ

Start or restart your VM and you should see the changes.

Leave a Reply

Your email address will not be published. Required fields are marked *