删除虚拟网桥时报bridge virbr0 is still up; can‘t delete it

问题起因:

不小心错误地在虚拟机里开了一个桥接接口并设定了接口设备和配置文件,导致虚拟机网络不通

解决办法:

接口在工作时是删除不了的,需要先关闭网络接口

ifconfig virbr0 down

[root@localhost ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.525400dd2625       yes             virbr0-nic
[root@localhost ~]# brctl delbr virbr0
bridge virbr0 is still up; can't delete it
[root@localhost ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.525400dd2625       yes             virbr0-nic
[root@localhost ~]# ifconfig virbr0 down
[root@localhost ~]# brctl delbr virbr0
[root@localhost ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
[root@localhost ~]#

 

你可能感兴趣的:(linux)