Changing MAC address and HOSTNAME on VMWare

mix it up

How to change MAC address and HOSTNAME on Centos 6.5 VMWare virtual machine

I use VMWare quite a lot and every now and then have to clone from a clean virtual machine image. When doing so you could end up with a mac address conflict especially if you have some firewall rules and policies attached to the mac address. The simplest way to change this is via the virtual machine settings in VMWare workstation. This is being done using VMWare Workstation and CentOS server 6.5.

Another way to do it is listed below, which I have had to do a few times. First check your current config using the following

Then deleted the following file

This is a cache of network interface names and you can regenerate it using udev or it is regenerated on reboot anyways. You can use either of the two commands to do so.

You can also use the following command ONLY after you have deleted the existing file if the above two don’t work

Then check the following file and delete some values from it.

Finally check and change the hostname.

For the HOSTNAME to survive a reboot you can try the following

If you want to broadcast the HOSTNAME for example to your router

That’s it you are done. Now you can reboot. This is how you can change MAC Address and HOSTNAME on CentOS server 6.5 on VMWare Workstation.