如何防止 virtualbox 创建无用的网络接口

如何防止 virtualbox 创建无用的网络接口

我使用的是基于 ubuntu 的发行版(linux lite),每次我使用虚拟盒时,它都会创建许多无用的连接,并且它们将在下次启动时删除。
我怎样才能阻止 virtualbox 创建这些连接?

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: em1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether b8:ca:3a:c9:6e:b8 brd ff:ff:ff:ff:ff:ff
13: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
14: vboxnet1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff
15: vboxnet10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:0a brd ff:ff:ff:ff:ff:ff
16: vboxnet11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:0b brd ff:ff:ff:ff:ff:ff
17: vboxnet12: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:0c brd ff:ff:ff:ff:ff:ff
18: vboxnet13: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:00:27:00:00:0d brd ff:ff:ff:ff:ff:ff

答案1

启动 VirtualBox GUI 并单击File/Host network manager

在出现的窗口中,您可以将这些网络一一删除,选择它们并单击“删除”图标。

或者

使用 cli 删除这些接口:

$ vboxmanage hostonlyif remove vboxnet0 
$ vboxmanage hostonlyif remove vboxnet1
...

相关内容