How to Modify the MAC Address of a Virtual Machine

How to Modify the MAC Address of a Virtual Machine

Sometimes when using a virtual machine, you need to modify the MAC address of the virtual network card. If you only need to make ordinary modifications, you can do it in many ways after entering the operating system, but it is not so easy to fundamentally modify (physical network card It needs to be rewritten with a programmer), and in the VMware virtual machine, it is easy to modify the physical address of the network card.

(1) First open the virtual machine directory, find the configuration file xxx.vmx, and open it with "Notepad". If you do not know the path and file name of the configuration file, you can open the virtual machine where you want to modify the MAC address of the network card in the main window of VMware Workstation, and see it behind "Configuration file (configuration file)", as shown below.

(2) In the opened file, find the following three lines:

ethernet0.addressType = "generated" 
ethernet0.generatedAddress = "00:0c:29:8d:04:61" ethernet0.generatedAddressOffset = "0"

Modify to the corresponding configuration:

ethernet0.addressType = "static" ethernet0.address="00:50:56:11:22:33"

Among them, the MAC address "00:50:56:11:22:33" takes a value in the following range 00:50:56:00:00:00--00:50:56:3F:FF:FF, if To modify the MAC addresses of multiple virtual machines, be careful not to repeat them.

In the above modification, note: ethernet0.generatedAddress is modified to ethernet0.addressType

Delete the line ethernet0.generatedAddressOffset = "0"

The first three digits of the MAC address of the modified network card are 00 50 56

After modification, the 4th digit of the network card MAC address can be selected between 00~3F, and the 5th and 6th digits can be selected between 00~FF.

Save and exit after modification.

(3) Restart the virtual machine and enter the "ipconfig /all" command at the command prompt to check that the MAC address has changed.

[Note] (1) If the host is Windows XP Professional SP3, then in the version of VMware Workstation 6.0~6.04, modifying the MAC address according to the above method cannot succeed. But it works with VMware Workstation 6.5 Beta.

(2) When the host is Windows XP Professional SP2, Windows Server 2003, and the virtual machine version is VMware Workstation 5.x, the test is successful.

(3) When the host is Windows Server 2003, Windows Server 2008, and the virtual machine is VMware Workstation 6.5 Beta, the test is successful.

Guess you like

Origin blog.csdn.net/qq_42700289/article/details/131383100