Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on Vagrant Up on Linux

Tags:

I try to run vagrant on my Ubuntu 14.04. So for, I did these steps:

-Install vagrant -Install virtualbox -added box for provider

then I run the

vagrant up

command.

After running the command, I take these output and at the and there is an error message which I cannot figure out how can I solve and run it correctly.

Bringing machine 'default' up with 'virtualbox' provider...

==> default: Checking if box 'udacity/ud381' is up to date...

==> default: Clearing any previously set forwarded ports...

==> default: Clearing any previously set network interfaces...

==> default: Preparing network interfaces based on configuration...

default: Adapter 1: nat 

==> default: Forwarding ports...

default: 5000 (guest) => 5000 (host) (adapter 1)  default: 22 (guest) => 2222 (host) (adapter 1) 

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

Command: ["startvm", "0399f946-6a87-4310-a22d-c1a4525ae2f0", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'ud381_default_1463617458900_49294' has terminated unexpectedly during startup with exit code 1 (0x1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

What should I do to fix these error ?

like image 804
Batuhan B Avatar asked May 19 '16 01:05

Batuhan B


People also ask

How do I fix my Vagrant?

Ticket 16318 states that the fix is to uninstall VirtualBox, reboot your system, and then reinstall it. If you get some other error message, do the standard thing: use your favorite web engine to search for "vagrant key words from error message".

Can I run Vagrant on Linux?

Vagrant is an open source tool used for creating a portable virtual environment. Using Vagrant, developers and sysadmins can create any virtual environment instantly. Vagrant is extremely simple to use and configure.

Does Vagrant work on Ubuntu?

From the above guidelines, you can install and use Vagrant on Ubuntu 22.04 by first installing a virtual environment like VirtualBox and then using the command utility to add any OS in the virtual environment.


2 Answers

On Ubuntu 16.04 make sure to uninstall any previous versions of virtualbox:

sudo apt-get purge virtualbox virtualbox-dkms virtualbox 

The reinstall virtualbox as downloaded from virtualbox.org

sudo dpkg -i Downloads/virtualbox-5.1_5.1.22-115126-Ubuntu-xenial_amd64.deb 

This fixed the error for me.

like image 135
edlerd Avatar answered Sep 18 '22 18:09

edlerd


It has to help:

sudo /sbin/vboxconfig 

Then launch your virtual machine. It helped me ;-)

like image 28
Ailurus Avatar answered Sep 17 '22 18:09

Ailurus