CENTOS7 Virtual Machine Network configuration after cloning (restart network failed solution)

Source: Internet
Author: User
Tags change settings error code

The clone source's Centos7_1 network address is 192.168.140.11, and I want to change the network address of the cloned centos7_2 to 192.168.140.12. Two places need to be changed: The network configuration of the virtual machine and the Centos7_2 configuration file.
If you don't know how to configure a static address, you can view the previous article:
1. Configure Virtual Network Editor
2. Set static IP
3. Use Xshell to connect virtual machine 1 cloned virtual machine configuration 1.1 edit-> Virtual Network editor-> Select vmnet8-> change settings-> select Vmnet8->nat Settings

1.2 Adding NAT mappings

The address I set here is 192.168.140.12.

2 cloned CENTOS7 configuration

The NIC name is ens33 after the ifconfig command is executed, but the network profile is still/etc/sysconfig/network-scripts/ifcfg-eno16777736. If you perform systemctl restart network now, the job for Network.service failed because the control process exited with error code will appear. Change the original network configuration filename ifcfg-eno16777736 to the name of the network card you queried (mine is ENS33): MV ifcfg-eno16777736 Ifcfg-ens33. Modify the Ifcfg-ens33 content to change the value of device and name to ENS33. Notice I don't have a MAC address set up here. Modify the IP address to 192.168.140.12.
Reboot the network, systemctl Restart Network, found the boot was successful. Ping the following Baidu – success.
3.xshell to connect

New Xshell link (direct with static IP link):

Address link after forwarding with port

The clone source system is then opened and the link test is performed.
Links were successful.

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.