说明:之前在centos7下配置过bridge,现在讲bridge模式改为普通模式后,查看网卡的时候还是可以看到很多垃圾信息,想彻底删除自己不想要的网卡配置信息,操作如下:
[root@linux-node1 ~]# ip add list1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:0c:29:9b:7d:d6 brd ff:ff:ff:ff:ff:ffinet 10.10.10.11/24 brd 10.10.10.255 scope global eth0 valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fe9b:7dd6/64 scope link valid_lft forever preferred_lft forever4: virbr0: mtu 1500 qdisc noqueue state DOWN qlen 1000link/ether 52:54:00:f4:24:05 brd ff:ff:ff:ff:ff:ffinet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 valid_lft forever preferred_lft forever5: virbr0-nic: mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000link/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 defaultNetwork default destroyed
登录后复制
从配置文件中剔除
[root@linux-node1 ~]# virsh net-undefine defaultNetwork 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 list1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:0c:29:9b:7d:d6 brd ff:ff:ff:ff:ff:ffinet 10.10.10.11/24 brd 10.10.10.255 scope global eth0 valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fe9b:7dd6/64 scope link valid_lft forever preferred_lft forever
登录后复制
再次查看,发现不必要的信息已经清除,清爽多了
以上就是CentOS7上删除virbr0网卡的步骤的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2206530.html