首頁 > 系統教程 > Linux > 主體

CentOS7上刪除virbr0網卡的步驟

王林
發布: 2024-01-15 12:24:05
轉載
1071 人瀏覽過

說明:之前在CentOS7下配置過bridge,現在講bridge模式改為普通模式後,查看網卡的時候還是可以看到很多垃圾信息,想徹底刪除自己不想要的網卡配置信息,操作如下:

[root@linux-node1 ~]# ip add list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
 valid_lft forever preferred_lft forever
inet6 ::1/128 scope host 
 valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:9b:7d:d6 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.11/24 brd 10.10.10.255 scope global eth0
 valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe9b:7dd6/64 scope link 
 valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 52:54:00:f4:24:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
 valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
link/ether 52:54:00:f4:24:05 brd ff:ff:ff:ff:ff:ff
登入後複製

查看網路清單:

[root@linux-node1 ~]# virsh net-list
 Name StateAutostart Persistent
----------------------------------------------------------
 defaultactive yes yes
登入後複製

使用「virsh net-destroy default」刪除

[root@linux-node1 ~]# virsh net-destroy default
Network default destroyed
登入後複製

從設定檔中剔除

[root@linux-node1 ~]# virsh net-undefine default
Network default has been undefined
登入後複製

重啟libvirtd服務

[root@linux-node1 ~]# systemctl restart libvirtd.service
[root@linux-node1 ~]# virsh net-list
 Name StateAutostart Persistent
----------------------------------------------------------
[root@linux-node1 ~]# ip add list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
 valid_lft forever preferred_lft forever
inet6 ::1/128 scope host 
 valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:9b:7d:d6 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.11/24 brd 10.10.10.255 scope global eth0
 valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe9b:7dd6/64 scope link 
 valid_lft forever preferred_lft forever
登入後複製

再次查看,發現不必要的資訊已經清除,清爽多了

以上是CentOS7上刪除virbr0網卡的步驟的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:jb51.net
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板