[root@centos7-master ~]# semanage fcontext -a -t openvswitch_rw_t "/etc/openvswitch(/.*)?"
libsemanage.dbase_llist_query: could not query record value (No such file or directory).
[root@centos7-master ~]# restorecon -Rv /etc/openvswitch
restorecon reset /etc/openvswitch context unconfined_u:object_r:etc_t:s0->unconfined_u:object_r:openvswitch_rw_t:s0
[root@centos7-master ~]# systemctl start openvswitch.service
[root@centos7-master ~]# systemctl enable openvswitch.service
[root@centos7-master ~]# ovs-vsctl -V
ovs-vsctl (Open vSwitch) 2.4.0
Compiled Feb 19 2016 03:41:32
DB Schema 7.12.1
Fix for:
sudo: ovs-vsctl: command not found
[root@centos7- master ~]#yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool
[root@centos7- master ~]# adduser ovs master ~]# su - ovs openvswitch. org/releases/ openvswitch- 2.4.0.tar. gz 2.4.0.tar. gz rpmbuild/SOURCES/ 2.4.0.tar. gz
[root@centos7-
[ovs@centos7-master ~]$ mkdir -p ~/rpmbuild/SOURCES
[ovs@centos7-master ~]$ wget http://
[ovs@centos7-master ~]$ cp openvswitch-
[ovs@centos7-master ~]$ tar -xvf openvswitch-
[ovs@centos7-master ~]$ sed 's/openvswitch- kmod, //g' openvswitch- 2.4.0/rhel/ openvswitch. spec > openvswitch- 2.4.0/rhel/ openvswitch_ no_kmod. spec 2.4.0/rhel/ openvswitch_ no_kmod. spec
[ovs@centos7-master ~]$ rpmbuild -bb --nocheck openvswitch-
[ovs@centos7-master ~]$ exit
[root@centos7- master ~]# mkdir /etc/openvswitch master ~]# yum localinstall /home/ovs/ rpmbuild/ RPMS/x86_ 64/openvswitch- 2.4.0-1. x86_64. rpm
[root@centos7-
[root@centos7- master ~]# semanage fcontext -a -t openvswitch_rw_t "/etc/openvswit ch(/.*) ?" dbase_llist_ query: could not query record value (No such file or directory). master ~]# restorecon -Rv /etc/openvswitch u:object_ r:etc_t: s0->unconfined_ u:object_ r:openvswitch_ rw_t:s0 master ~]# systemctl start openvswitch.service master ~]# systemctl enable openvswitch.service
libsemanage.
[root@centos7-
restorecon reset /etc/openvswitch context unconfined_
[root@centos7-
[root@centos7-
[root@centos7- master ~]# ovs-vsctl -V
ovs-vsctl (Open vSwitch) 2.4.0
Compiled Feb 19 2016 03:41:32
DB Schema 7.12.1