CentOS7.4 刪除virbr0虛擬網卡

   在CentOS 7的安裝過程當中若是有選擇相關虛擬化的的服務安裝系統後,啓動網卡時會發現有一個以網橋鏈接的私網地址的virbr0網卡,這個是由於在虛擬化中有使用到libvirtd服務生成的,若是不須要能夠關閉後去掉:socket

 1、查看IP及網橋設備ip

複製代碼

[root@Node1 ~]# ip -4 addr    //查看IP地址
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    inet 192.168.10.7/24 brd 192.168.10.255 scope global ens33
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
[root@Node1 ~]# brctl show    //查看網橋
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.5254005caf00       yes             virbr0-nic
[root@Node1 ~]#

複製代碼

 2、刪除網橋get

[root@Node1 ~]# ifconfig virbr0 down   
[root@Node1 ~]# brctl delbr virbr0   //刪除網橋

 3、禁用開機服務ast

[root@Node1 ~]# systemctl disable libvirtd.service    //禁用libvirtd服務開機自啓動
Removed symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket.
[root@Node1 ~]# systemctl mask libvirtd.service        
Created symlink from /etc/systemd/system/libvirtd.service to /dev/null.

 4、驗證service

 

[root@Node1 ~]# ip -4 add   
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    inet 192.168.10.7/24 brd 192.168.10.255 scope global ens33
       valid_lft forever preferred_lft forever

 

 *****通過驗證,發現virbr0已經刪除****queue

相關文章
相關標籤/搜索