Vagrant: Guest machine default name too long with VirtualBox 5.2.8 (VERR_CFGM_NOT_ENOUGH_SPACE)


The error

When you try to start a vm with vagrant up, you get the error:

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

Command: ["startvm", "aaaaaaaa-bcccc-e07e-8888-43220fe45e6", "--type", "headless"]

Stderr: VBoxManage: error: The specified string / bytes buffer was to small. Specify a larger one and retry. (VERR_CFGM_NOT_ENOUGH_SPACE) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole eval(ez_write_tag([[970,250],'tutorials_technology-medrectangle-3','ezslot_2',114,'0','0'])); Cause After Virtualbox 5.8.2 virtual machine names has a maximum size.

Solution 1

This could be caused by the virtualbox kernel modules loaded are not matching the virtualbox client/UI version installed:

sudo /sbin/vboxconfig

You can also try to execute vboxreload

Solution 2

You can try to do a clean install of virtualbox with:

sudo dpkg -l | grep virtualbox sudo dpkg --purge

Where are the packages listed by the previous command. Then you can install the new version of virtualbox.

Solution 4

You could try to remove the package virtualbox-dkms and then reinstall virtualbox-dkms:

sudo apt-get autoremove virtualbox-dkms sudo apt-get install build-essential linux-headers-uname -r dkms virtualbox-dkms

Solution 3

Change your Vagrantfile on the virtualbox provider block, add the following line:

eval(ez_write_tag([[336,280],'tutorials_technology-medrectangle-4','ezslot_1',137,'0','0'])); vb.customize ["modifyvm", :id, "--audio", "none"]