Centos7 virtual machine after replication Nic problem Job for Network.service failed

Source: Internet
Author: User

The error "Job for Network.service failed" occurs when you run the "/etc/init.d/network restart" command. See ' systemctl status Network.service ' and ' journalctl-xn ' for Deta ', run ' cat/var/log/messages | grep Network command to view the network-related information that appears in the log, the following output statements are found:

Nov 11:31:16 OpenStack network:bringing up Interface Eth0:Error:no device found for connection ' eth0 '.

Nov 11:31:16 OpenStack Network: [FAILED]

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Network:rtnetlink answers:file exists

Nov 11:31:16 OpenStack Systemd:network.service:control Process exited, code=exited Status=1

Nov 11:31:16 OpenStack systemd:failed to start lsb:bring up/down networking.

Nov 11:31:16 OpenStack Systemd:unit Network.service entered failed state.

Workaround:

Open View/etc/sysconfig/network-scripts/ifcfg-eth0 file

1. Find that the MAC address is not the same as the MAC address of the ifconfig command output, for this case delete hwaddr this line or update this line to the Mac of ifconfig command output.

2. Complete the first step most people can solve the problem, if it is still an error, take a closer look at the file there is no device in this line, if there is to comment or delete, because this is the same as the MAC address is invalid.

[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0

# HWADDR=1A:E9:47:A5:75:C8

Type=ethernet

Bootproto=static

Defroute=yes

Peerdns=yes

Peerroutes=yes

Ipv4_failure_fatal=no

Ipv6init=yes

Ipv6_autoconf=yes

Ipv6_defroute=yes

Ipv6_peerdns=yes

Ipv6_peerroutes=yes

Ipv6_failure_fatal=no

ipaddr=192.168.1.79

Prefix=24

gateway=192.168.1.1

dns1=192.168.1.1

dns2=8.8.8.8

Name=eth0

Uuid=ba670f0c-201a-483b-8379-c8c72c03ab27

# device=en01677736

Onboot=yes

Centos7 virtual machine after replication Nic problem Job for Network.service failed

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.