Vmware Mac Address Automatic Vs Manual

  1. Vmware Mac Address Automatic Vs Manual Download
  2. Vmware User Manual
Features | Documentation | Knowledge Base | Discussion Forums

MAC Addresses are created by using three parts, the VMware OUI, the SMBIOS UUID or the unique ID of the host and a hash based on the name of the entity that the MAC address is being generated for. For more information on MAC Address Generation, see: ESX 2.5 and earlier - See Setting a static MAC address for a virtual NIC. Aug 12, 2013  Unfortunately you cannot just edit an automatically generated MAC address, because the ranges for manually and automatically generated MAC addresses are different and enforced by VMware. If you want to ensure a MAC address remains the same at all times even if you switch virtual network adapters, you may assign a static MAC address to the VM.

  • You can manually assign a MAC address to a virtual machine. You might want to assign a MAC address to guarantee that the same address is assigned to a virtual machine every time it powers on, even it is moved, or to be sure that a unique MAC address is provided for each virtual machine in a networked environment.
  • Automatic Update to the Latest Version of VMware Tools 30. Workstation User’s Manual 6 VMware, Inc. Maintaining and Changing the MAC Address of a Virtual.

Maintaining and Changing the MAC Address of a Virtual Machine

When a virtual machine is powered on, VMware Workstation automatically assigns each of its virtual network adapters an Ethernet MAC address. MAC stands for media access control. A MAC address is the unique address assigned to each Ethernet network device.

The software guarantees that virtual machines are assigned unique MAC addresses within a given host system. In most cases, the virtual machine is assigned the same MAC address every time it is powered on, so long as the virtual machine is not moved (the path and filename for the virtual machine's configuration file must remain the same) and no changes are made to certain settings in the configuration file.

In addition, VMware Workstation does its best, but cannot guarantee, to automatically assign unique MAC addresses for virtual machines running on multiple host systems.

Avoiding MAC Changes

To avoid changes in the MAC address automatically assigned to a virtual machine, you must not move the virtual machine's configuration file. Moving it to a different host computer or even moving it to a different location on the same host computer changes the MAC address.

You also need to be sure not to change certain settings in the virtual machine's configuration files. If you never edit the configuration file by hand and do not remove the virtual Ethernet adapter, these settings remain untouched. If you do edit the configuration file by hand, be sure not to remove or change the following options:

ethernet[n].generatedAddress
ethernet[n].addressType
ethernet[n].generatedAddressOffset
uuid.location
uuid.bios
ethernet[n].present

In these options, [n] is the number of the virtual Ethernet adapter, for example ethernet0.

Note: To preserve a virtual Ethernet adapter's MAC address, you also must be careful not to remove the adapter. If you remove the adapter, then recreate it, the adapter may receive a different MAC address.

Manually Assigning a MAC Address

If you want to guarantee that the same MAC address is assigned to a given virtual machine every time, even if the virtual machine is moved, or if you want to guarantee a unique MAC address for each virtual machine within a networked environment, you can assign the address manually instead of allowing VMware Workstation to assign it automatically.

To assign the same, unique MAC address to any virtual machine manually, use a text editor to remove three lines from the configuration file and add one line. The configuration file has a.vmx extension at the end of the filename. On a Linux host, a virtual machine created with an earlier VMware product may have a configuration file with a .cfg extension.

Remove the three lines that begin with the following from the configuration file:

ethernet[n].generatedAddress
ethernet[n].addressType
ethernet[n].generatedAddressOffset

In these options, [n] is the number of the virtual Ethernet adapter — for example ethernet0.

Add the following line to the configuration file:

ethernet[n].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.

So long as you choose a value for XX:YY:ZZ that is unique among your hard-coded addresses (where XX is a valid hexadecimal number between 00h and 3Fh, and YY and ZZ are valid hexadecimal numbers between 00h and FFh), conflicts between the automatically assigned MAC addresses and the manually assigned addresses should never occur.

Active2 years, 5 months ago

I've run into the following problem on both VMware Fusion (for Macs) and with VMware ESXi/vSphere. Many of you are familiar with the problem, and it is described at VMware KB: 'Networking does not work in a cloned Linux virtual machine (2002767) .'

  1. Create a CentOS VM.
    • This is a bare-bones VM with a minimal set of software and a functioning network stack. The idea is that we take the minimal VM, clone it and add more software later.
  2. Clone that VM
  3. VMware Fusion or vCenter will assign a new MAC address to the network interface on the cloned VM.
  4. Linux doesn't know about this new MAC address and thus networking doesn't work. The file /etc/sysconfig/network-scripts/ifcfg-ethN has the MAC address of the interface on the first machine.
  5. To fix this, I need to find the MAC address of the new VM, edit ifcfg-ethN and add this MAC to the HWADDR= field. I can't simply cut and paste the MAC into the field, so this can be an error-prone task, especially if I forget my pen and paper to write down the MAC.
  6. (Bonus points) On the new VM, often eth0, eth1, etc. display in the wrong order. Fixing this involves an arcane dance around /etc/udev/rules.d

I can do this, but it's error prone and kind of a pain when I simply wanted to spin up a new VM to test something.

Is there a way to simplify this manual process? When you clone a new machine, how do you fix the MAC address problem?

Vmware Mac Address Automatic Vs ManualVmware Mac Address Automatic Vs Manual
Stefan Lasiewski
Stefan LasiewskiStefan Lasiewski
15.7k32 gold badges113 silver badges172 bronze badges

Vmware Mac Address Automatic Vs Manual Download

1 Answer

Since device persistence stuff is just getting in the way for these VMs, rip it out:

  • Completely remove the HWADDR and UUID lines from the ifcfg file, and
  • Delete /etc/udev/rules.d/70-persistent-net.rules before cloning

That should let the eth0 with a new MAC address actually use the ifcfg-eth0 on initial boot.

Stefan Lasiewski
15.7k32 gold badges113 silver badges172 bronze badges
Shane Madden

Vmware User Manual

Shane Madden
105k9 gold badges151 silver badges226 bronze badges

Not the answer you're looking for? Browse other questions tagged linuxnetworkingvirtualizationvmware-esxivmware-fusion or ask your own question.