So I found adding
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet0"]
end
will set it to what I want. However doing a vagrant reload results in a disaster:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["showvminfo", "76fd613f-aa40-4a2d-b515-018c856f6c3d", "--machinereadable"]
Stderr: VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "GetBootOrder(i, &bootOrder)" at line 615 of file VBoxManageInfo.cpp
What am I doing wrong?