My colleague and I have been using Vagrant for several months to run several VirtualBox VMs on a FreeBSD-11 host. Earlier this month, I ran 'sudo pkg upgrade' on the host. Without specifically intending to upgrade our VirtualBox installation, I upgraded that package. In the course of that upgrade, the attached message (pkg-upgrade-virtual-box-messages.txt) was displayed, but I did not immediately take any of the suggested actions.

Subsequently, when I next went to enter the VM with 'vagrant up && vagrant ssh' -- which I had used many times before -- I got the following error message:

#####
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "bb3f2c1d-15c1-4020-95ec-9d809211b4ab", "--type", "headless"]

Stderr: VBoxManage: error: The VMMR0.r0 module version does not match VBoxVMM.dll/so/dylib. If you just upgraded VirtualBox, please terminate all VMs and make sure that neither VBoxNetDHCP nor VBoxNetNAT is running. Then try again. If this error persists, try re-installing VirtualBox. (VERR_VMM_R0_VERSION_MISMATCH) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
#####

I know that the VM itself is still operating as expected, as a cron job it runs transmits an email once a day. But I will need to go into the VM in a few days to work with the results of an important monthly cron job. The regular sysadmin for the host is unavailable, so we have to figure out how to proceed.

Based on the message I got during 'pkg upgrade' with respect to virtualbox, and on a reading of the FreeBSD wiki page at https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-virtualbox.html, I believe that what we ought to do is the following:

##########
1. Add the following 3 lines to /boot/loader.conf:

#####
vboxdrv_load="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"
#####

2. Reboot the host:

#####
sudo shutdown -r now
#####

3. Run 'vagrant up' for each of the VMs we have installed on the host.
##########

Do those steps sound reasonable?

Thank you very much.
Jim Keenan

--
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/f63c8501-abb8-eb4e-bc1e-8adda259dfa4%40pobox.com.
For more options, visit https://groups.google.com/d/optout.
Message from virtualbox-ose-nox11-5.2.18_1:

=============================================================================

VirtualBox was installed.

You need to load the vboxdrv kernel module via /boot/loader.conf:

vboxdrv_load="YES"

You also have to add all users to your vboxusers group in order to use vbox.

% pw groupmod vboxusers -m jerry

Reboot the machine to load the needed kernel modules.

Bridging Support:
=================

For bridged networking please add the following line to your /etc/rc.conf:

vboxnet_enable="YES"


USB Support:
============

For USB support your user needs to be in the operator group and needs read
and write permissions to the USB device.

% pw groupmod operator -m jerry

Add the following to /etc/devfs.rules (create if it doesn't exist):

[system=10]
add path 'usb/*' mode 0660 group operator

To load these new rule add the following to /etc/rc.conf:

devfs_system_ruleset="system"

Then restart devfs to load the new rules:

% /etc/rc.d/devfs restart


Troubleshooting:
================

Running VirtualBox as non-root user may fail with a fatal error
NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file.

If you experience "Network: write Failed: Cannot allocate memory" errors
try to increase net.graph.maxdata in /boot/loader.conf

If you are using AIO, then increase these limits (PR#168298):
vfs.aio.max_buf_aio=8192
vfs.aio.max_aio_queue_per_proc=65536
vfs.aio.max_aio_per_proc=8192
vfs.aio.max_aio_queue=65536
To check if AIO is used use: kldstat -v | grep aio

Check wiki page for known issues and troubleshooting:
http://wiki.freebsd.org/VirtualBox

Please report any problems to emulation@. Thanks!

=============================================================================
Message from virtualbox-ose-additions-nox11-5.2.18_1:

=============================================================================

VirtualBox Guest Additions were installed.


You need to enable the vboxguest startscript to load the kernel module and
vboxservice to use host time synchronization.

vboxguest_enable="YES"
vboxservice_enable="YES"

You also have to add all X11 users that want to use any of the additional
features (clipboard sharing, window scaling) to the wheel group.

% pw groupmod wheel -m jerry

Reboot the machine to load the needed kernel modules.

For detailed informations please visit http://wiki.freebsd.org/VirtualBox


Reply via email to