Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Vmware Clone centos modifies mac address

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Fault background:

After cloning the virtual machine, do not connect to the Internet, ifconfig check, found that the network card eth0 did not start, so ifconfig eth0 up started the eth0 network card, the result can not start, after entering / etc/sysconfig/network-scripts/ifcfg-eth0 view, found that the MAC address and IP address are the same as the original machine, so after modifying the IP, service network restart restarts the network service, and the discovery prompts Bringing up interface eth0: Device eth0 does not seem to be present, delayin initialization. So I decided to change the MAC address.

The cause of the failure:

Due to the cloning of the virtual machine, vmware only modifies the name of the virtual machine, but does not modify any information in the virtual hard disk, resulting in a discrepancy between the MAC address of the cloned network card and the mac address recorded in the operating system, resulting in the failure of eth0 startup. The operating system records the addition of a new network card. The name eth2,mac address of the new network card is the new mac address assigned by vmware.

Solution:

Enter / etc/udev/rules.d/70-persistent-net.rules file

Record the mac address of eth2 00:0c:29:31:9a:0a

# vim / etc/sysconfig/network-scripts/ifcfg-eth0

Modify HWADDR=00:0c:29:7b:4f:6b

The mac address of the modified eth2 for / etc/udev/rules.d/70-persistent-net.rules

HWADDR=00:0c:29:31:9a:0a

Change the name of the network card DEVICE to eth2, and configure an IP address that does not conflict with the original machine to save and exit.

Service network restart restarts the network service.

Ifconfig looks at IP to resolve the problem.

Note: the MAC address is changed according to the network card, and the address of each machine is different.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report