linuxvagrantvirtualbox

Error on Vagrant Up on Linux


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 ?


Solution

  • Important pre-amble:

    Please note that I wrote this answer back in 2015/2016 and targeted VirtualBox and Vagrant and Ubuntu headless 14.04.

    Your mileage may vary after a while.

    If you have a similar problem but for a different version, feel free to edit this answer and append your answer above my answer for Ubuntu 14.04 Let's help everyone to progress together.

    I myself will do the same and update this answer for newer versions when I start to use them.

    Answers:

    Ubuntu 14.04 Headless with Vagrant and VirtualBox

    I found this page when I had the same issue.

    Now I have solved mine. I hope that my solution can help you.

    Download the latest AMD64 for virtualbox and install

    1. Go https://www.virtualbox.org/wiki/Linux_Downloads
    2. Choose the AMD64 which is a deb because I am trying to run vagrant on a 64 bit Ubuntu 14.04 server 64-bit edition (My original problem was that I had used the i386)
    3. Then as root, dpkg -i whatever_is_the_latest_version_virtualbox.deb
    4. apt-get -f install This will install the dependencies

    Download the latest AMD64 for vagrant and install

    1. Go https://www.vagrantup.com/downloads.html
    2. Choose Debian 64 bit
    3. Then as root, dpkg -i whatever_is_the_latest_version_vagrant.deb
    4. apt-get -f install This will install the dependencies

    Then do the rest of your vagrant box setup.

    It should work now.