For FreeBSD guests, Virtualbox can sometimes report the private network
interface IP address as "0.0.0.0". This will cause an invalid NFS
exports file to be generated for FreeBSD and OS X hosts.
Fixed by not allowing Virtualbox to report a guest IP address of
"0.0.0.0".
Previously, we required a host-only interface with a static IP for NFS
to work in VirtualBox, because we needed access to the guest's IP in
order to properly configure mount commands.
After boot, VirtualBox exposes the IP addresses of a guest's network
adapters via the "guestproperty" interface.
This adds support for reading VirtualBox guest properties to the
VirtualBox driver and utilizes that support to prepare NFS settings,
which removes the necessity for a static IP for NFS to work.
In this commit we also start building out scaffolding for unit testing
vbox actions and drivers.
Test plan:
- Prepare a Vagrantfile with the following:
* private network with type: :dhcp
* synced folder with nfs: true
- Boot a VM from this Vagrantfile using the virtualbox provider
- Machine should boot successfully with working synced folder
when up-ing several boxes at once, VBoxManage modifyvm gets cranky and throws random lock errors. this adds the existing retryable logic to
the customize and sane_defaults actions, both of which fire a bunch of
modifyvm commands, all of which are fine to run multiple times.