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