Ever change the Network MAC address setting in VMWARE and you can’t get the network to work?
Here’s a quick how-to on changing the MAC address on a Linux VM. This is useful if you want to clone an existing machine and want to have both machines running with network at the same time. I am using VMWARE Server 2.0. (free version)
1) Power down the VM that you want to change the MAC address on. (e.g. cloned computer)
2) On the VMWARE console, select your (cloned) VM machine on the left side. In the Summary tab, click on “Edit” in the Network adapter section. The MAC address needs to be set the “Manual”. In the textbox, set the MAC address. It will need to start with 00:50:56 and end with XX:XX:XX to a value between 00:00:00 and FF:FF:FF. For instance, you can use 00:50:56:FF:FF:FF as a MAC address. Click on OK.
3) If you are using Static IP address. Follow this step: On your VM console, click on the Summary Tab for the VM you changed the settings on. On the Network Adapter 1, click on “Edit”. Uncheck the box that says “Connect at power on” Click on OK.
Turn on Debian box. Login as root. If you are using static IP, you will first need to change the IP to a new one. Edit the “/etc/network/interfaces” file. On the “address” line of your network adapter (eth0, … eth5) change the IP. Shutdown computer. Go to VMWARE console, edit Network Adapter 1, check the network box that says “Connect at power on”.
4) Power on the VM. Login as root.
5) Go to /etc/udev/rules.d/
6) There should be a file called “70-persistent-net.rules”. Backup the file. Edit this file. Find the line that matches the MAC address that you entered in step 3. If you can’t find it (that maybe the problem), edit the last network device on the list. In the “ATTRS{address}==” section, enter the MAC address that you added. Note what NAME it is. It should be something like “eth0” or “eth….” Save the file.
7) Now edit /etc/network/interfaces file. Your will need to make sure the “eth” matches the NAME of the hardware device in step 8. For instance, if the name is eth0 — make sure the name of the interfaces is eth0 and the allow-hotplug line is eth0 as well.
8) Run the command “ifup [NAME]” for instance ifup eth0. You should get a status message whether the network works. If you get a conflict error, you are either using a MAC address that is on another VM or a static IP address of another computer. If its a conflict of IP, change the IP in step 3. To troubleshoot network device not working, stop the VM machine — look in the Network adapter field. Write down the MAC address. Go back to step 6.