13

When list virtual network interfaces, some of them are not anymore needed:

vboxnet1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:01 
vboxnet8: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:08 
vboxnet9: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:09 
vboxnet11: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:0b 
vboxnet12: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:0c 

How can I make them disable them for good?

Thierry Marianne
  • 9,193
  • 5
  • 28
  • 44

2 Answers2

16

It turns out VirtualBox comes natively with a special command dedicated to this need:

e.g. to remove the network interface vboxnet0, execute the following command

VBoxManage hostonlyif remove vboxnet0
Thierry Marianne
  • 9,193
  • 5
  • 28
  • 44
  • 1
    Via a script if there are dozens of them: `for i in {1..130}; do VBoxManage hostonlyif remove vboxnet$i ; done` (replace 130 as needed, this removes vbnoxnet1 to vboxnet130). – sup Jan 17 '17 at 11:57
  • 1
    Taht should have been `{0..130}` - Virtualbox starts numbering interfaces at zero. – sup Jan 17 '17 at 16:11
2

Using GUI,

Open Virtualbox, click File -> Preferences -> Network -> Host-only Network, remove Vboxnet#

Host-only Network

Using command line,

VBoxManage hostonlyif remove vboxnet#

(replace the '#' accordingly, in your case 1, 8, 9, 11, 12)

tk_
  • 13,042
  • 6
  • 71
  • 81