[root@OpenStack-1 network-scripts]# cat ifcfg-enp0s3
DEVICE=enp0s3
HWADDR="08:00:27:8E:EA:56"
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes
-
[root@OpenStack-1 network-scripts]# cat ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.1.3
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.254
ONBOOT=yes
网络重启时出现此错误。
systemctl restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
查看日志:
-- Unit network.service has begun starting up.
Oct 15 18:01:47 OpenStack-1.openstack.internal.srvhost.com network[3105]: Bringing up loopback interface: [ OK ]
Oct 15 18:01:47 OpenStack-1.openstack.internal.srvhost.com network[3105]: Bringing up interface br-ex: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device br-ex does not seem to be present, de
Oct 15 18:01:47 OpenStack-1.openstack.internal.srvhost.com /etc/sysconfig/network-scripts/ifup-eth[3219]: Device br-ex does not seem to be present, delaying initialization.
Oct 15 18:01:47 OpenStack-1.openstack.internal.srvhost.com network[3105]: [FAILED]
Oct 15 18:01:48 OpenStack-1.openstack.internal.srvhost.com network[3105]: Bringing up interface enp0s3: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device enp0s3 does not seem to be present,
Oct 15 18:01:48 OpenStack-1.openstack.internal.srvhost.com /etc/sysconfig/network-scripts/ifup-eth[3250]: Device enp0s3 does not seem to be present, delaying initialization.
Oct 15 18:01:48 OpenStack-1.openstack.internal.srvhost.com network[3105]: [FAILED]
Oct 15 18:01:48 OpenStack-1.openstack.internal.srvhost.com network[3105]: Bringing up interface eth0: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: [ OK ]
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com network[3105]: RTNETLINK answers: File exists
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com systemd[1]: network.service: control process exited, code=exited status=1
Oct 15 18:01:49 OpenStack-1.openstack.internal.srvhost.com systemd[1]: Failed to start LSB: Bring up/down networking.
这一切都是在 Hyper-V 下虚拟化的,我做错了什么吗?
答案1
第一个问题:您的 openvswitch 是否已安装并正在运行?如果没有,请通过发出以下命令确保它已安装并正在运行:
yum -y install openvswitch
service openvswitch start
chkconfig openvswitch on
另外,尝试手动创建桥接器和端口,然后重新启动服务器:
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex enp0s3
reboot
让我知道事情的后续 !。
更多信息请点击这里:
https://github.com/tigerlinux/openstack-mitaka-installer-centos7/blob/master/DOCS/NOTES.txt
答案2
看来您的enp0s3
网络配置中有无效设备。它可能来自以前的安装。只需删除这些文件并重新启动网络即可。
rm -f /etc/sysconfig/network-scripts/ifcfg-enp0s3
rm -f /etc/sysconfig/network-scripts/ifcfg-br-ex