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 ?
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.
It has to help:
sudo /sbin/vboxconfig
Then launch your virtual machine. It helped me ;-)
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:
I found this page when I had the same issue.
Now I have solved mine. I hope that my solution can help you.
dpkg -i whatever_is_the_latest_version_virtualbox.deb
apt-get -f install
This will install the dependenciesdpkg -i whatever_is_the_latest_version_vagrant.deb
apt-get -f install
This will install the dependenciesThen do the rest of your vagrant box setup.
It should work now.
I did following steps and it get fixed.
http://www.sysprobs.com/disable-enable-virtualization-technology-bios
https://askubuntu.com/questions/410813/how-to-enable-virtualization-on-booting-ubuntu-13-10
http://ubuntuhandbook.org/index.php/2015/07/install-virtualbox-5-0-ubuntu-15-04-14-04-12-04/
Add v.gui = false at below line in Vagrantfile
override.vm.network :private_network, ip: machine_type['ip']
v.gui = false
Restart the Vagrant:
vagrant reload
Hope it works.
On my ubuntu 14.02 I switch to virtualbox-5.0 worked for me
sudo apt-get install virtualbox-5.0
The best solution :
sudo /sbin/vboxconfig
to fix the Error:
homestead up Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: A newer version of the box 'laravel/homestead' is
available! You currently
==> homestead-7: have version '1.0.1'. The latest is version '3.0.0'. Run
==> homestead-7:vagrant box update
to update.
==> homestead-7: Clearing any previously set network interfaces...
There was an error while executingVBoxManage
, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp
On Mac OS 10.12, reinstalling Virtual Box fixed this for me (Vagrant 2.0.0 and Virtual Box 5.1.28).
Install all available plugins to container.
vagrant plugin list
It will list all the plugins available.
vagrant plugin install
once done issue vagrant up
On my ubuntu 16.04
, I was using virtualbox-5.1
with BOSH-LITE same error came while doing
vagrant up --provider=virtualbox
I uninstall virtualbox-5.1
and install virtualbox-5.0
then it is working now.
Just to add something new to this discussion, in my experience, this error gets thrown when trying to launch a non-headless VM in non-graphic capable terminal. Wrapper scripts like vagrant and packer tend to go for the simplest options and so by default it seems often their VMs (or boxes) launch a GUI unless it doesn't have one. Fix the graphic terminal problem (say with x11 forwarding) and everything works as expected.
After upgrading the OS on my MAC, things stopped working with the same error as the OP. I upgraded all the other components as well.
I had this environment: - MacOS Mojave v10.14 - Vagrant 2.0.1 - VirtualBox-5.2.20-125813-OSX.dmg - VBoxGuestAdditions_5.2.20.iso
After that, I did "vagrant box update" to get the latest version of the box.
After that I was able to spin new VMs. If you have VMs already created, you may have to deal with Guest Additions version mismatch between Host and Guests.
You probably have virtualization disabled in your bios. To enable virtualisation follow the guide here for different laptop types/makes.
User contributions licensed under CC BY-SA 3.0