After cloning CentOS, the virtual machine network configuration

Source: Internet
Author: User

Recently, to use Nginx to build a virtual experimental environment of reverse proxy after cloning in the virtual machine, the cloned system does not correctly access the network.

The troubleshooting was found because the cloned environment changed the location of the network card, so the MAC address is incorrect.

Share a lazy way


The first step:

Delete/etc/udev/rules.d/70-persistent-net.rules file Here's an old MAC address.

Step Two:

Reboot let the system automatically generate a new 70-persistent-net.rules file

Step Three:

Vi/etc/udev/rules.d/70-persistent-net.rules record the new MAC address

Fourth Step:

CD/ETC/SYSCONFIG/NETWORK-SCRIPTS/MV ifcfg-eth0 ifcfg-eth1vi ifcfg-eth1 replace HWADDR to modify IP for new MAC address for new IP

Fifth Step

Service Network restart

OK to complete the configuration here, ping the original CentOS IP, no problem.

After cloning CentOS, the virtual machine network configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.