The Centos7 NIC needs to be written to the MAC address or it won't start.
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.
From the error "Error:no device found for connection ' eth0" can determine the problem with the configuration file eth0 , open view /etc/ Sysconfig/network-scripts/ifcfg-eth0 file found mac address and ifconfig command output The address is different, as follows:
[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
Onboot=yes
[Email protected] ~]# ifconfig
Eth0:flags=4163<up,broadcast,running,multicast> MTU 1500
inet 192.168.1.79 netmask 255.255.255.0 broadcast 192.168.1.255
Inet6 fe80::8081:a6ff:fe9d:5887 Prefixlen ScopeID 0x20<link>
ether 82:81:a6:9d:58:87 Txqueuelen (Ethernet)
RX packets 3426 Bytes 394042 (384.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets bytes 9578 (9.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
So simply change the value of the HWADDR variable in the ifcfg-eth0 to the MAC address shown in the ifconfig command.
Source: http://my.oschina.net/u/1169607/blog/345921
From for notes (Wiz)
The NIC is having problems job for Network.service failed