Cannot use Vagrant and Virtualbox in network namespace

Viewed 15

We have VMs defined in Vagrant that are used both for development (IDE etc) and for running integration tests. The integration tests take very long and can leave the VMs in a broken state. Also, Vagrant and Virtualbox's global state prevent me from running and debugging integration tests for different parameters in parallel.

Thus I'm trying to create isolated environments for the integration tests. I created an isolated home folder and a network namespace and called vagrant up in that environment. I get

Command: ["hostonlyif", "ipconfig", "vboxnet12", "--ip", "192.168.60.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: The host network interface named 'vboxnet12' could not be found

When I open the VirtualBox GUI from the new namespace and then "Host Network Manager", I see no interfaces. When I try to create one, it calls it vboxnet13. In my default network namespace, there exist vboxnet1 to vboxnet12. So it seems my isolation is not good enough and virtualbox in the custom network namespace somehow seems to be aware of the interfaces in the default namespace, but cannot use them. I wonder what is missing to successfully isolate Vagrant + Virtualbox.

0 Answers
Related