ovs自定義啟動


用戶可以根據自己的需求,使用特定選項分別啟動/停止守護進程。

場景一:僅啟動ovsdb守護進程,不啟動ovs-vswitchd守護進程
$ ovs-ctl --no-ovs-vswitchd start

場景二:僅啟動ovs-vswitchd守護進程,不啟動ovsdb守護進程
$ ovs-ctl --no-ovsdb-server start

場景三:配置本機OVS使用的ovsdb-server數據庫文件,手動啟動所有守護進程。
$ mkdir -p /usr/local/etc/openvswitch

$ ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema

$ mkdir -p /usr/local/var/run/openvswitch

$ ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \

--remote=db:Open_vSwitch,Open_vSwitch,manager_options \

--private-key=db:Open_vSwitch,SSL,private_key \

--certificate=db:Open_vSwitch,SSL,certificate \

--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \

--pidfile --detach --log-file

$ ovs-vsctl --no-wait init

$ ovs-vswitchd --pidfile --detach --log-file

 

[root@kunpeng82 ~]# ps -elf | grep ovsdb
1 S root      6448     1  0  70 -10 -   270 do_wai 08:48 ?        00:00:00 ovsdb-server: monitoring pid 6449 (healthy)
1 S root      6449  6448  0  70 -10 -   275 do_sys 08:48 ?        00:00:00 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
0 S root      6716  5082  0  80   0 -  1730 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# kill -9 6449
[root@kunpeng82 ~]# ps -elf | grep ovsdb
0 S root      6720  5082  0  80   0 -  1729 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# ps -elf | grep ovsdb
0 S root      6724  5082  0  80   0 -  1729 pipe_w 09:33 pts/1    00:00:00 grep --color=auto ovsdb
[root@kunpeng82 ~]# ps -elf | grep ovsdb

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM