How to make VMware ESX use the hardware MAC address

networkingvmware-esx

VMware ESX 3.5 and 4.0 create software NICs that are bridged to the physical interface. I'm deploying ESX in a DHCP environment with assigned addresses, so the install is done with a set DHCP address. When the install completes, ESX creates the software NIC with a fake MAC address and thus does not grab the intended DHCP assigned address for the box.

Is there a way to subvert this behavior without messing up guest networking? Is this recommended or does it go against the use model for ESX?

Best Answer

It is hard to tell from your description, but I think what you are seeing is that the MAC address of the service console is different than the MAC address used by the server during the installation. ESX can also have assigned IP addresses for VMotion/VKernel services.

It sounds to me like you should adjust your DHCP configuration post-install to give the proper IP address to the new MAC address because the physical interfaces in ESX could be used for multiple purposes (VM networking, iSCSI, service console, VMotion, etc)

If adjusting the DHCP configuration isn't what you are looking for, you can change the MAC address of a virtual interface by editing the /etc/sysconfig/network-scripts/ifcfg-vswif0 file at the service console and restarting networking (at least in 3.5)

NOTE: The vsiwf# may be different in your environment so be sure you are editing the correct file for your configuration.

Related Topic