Issues when running vagrant in Ubuntu 14.04 - vagrant

When running vagrant with latest package of Ubuntu 14.04, I got the following error message. Is there any configuration for Virtualbox? The provider is Virtualbox, and not special configuration after apt-get install virtualbox. BTW, can not connect to this host by GUI :(.
# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' 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: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

Enable VT-x Virtualization Technology in BIOS and still your problem remains see issue vagrant issues 2157 and this issue.

Related

Vagrant error when running vagrant up on Git Bash on Window 10

I am having trouble with vagrant up on Git Bash.
I'm currently using Vagrant 2.2.19 and VirtualBox 6.1 version.
Whenever I put vagrant up on Bash to be able to open VirtualBox server on Git bash using vagrant ssh, it shows the following error.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20200304.0.0' is up to date...
==> default: Setting the name of the VM: profiles-rest-api_default_1644116739589_78823
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8000 (guest) => 8000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'unknown' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
What I have done so far
Visualization is enabled from BIOS
Install VirtualBox extension pack
Uninstall and reinstall VirtualBox and Vagrant several times
Also, when I put vagrant ssh after that error, it shows nothing, but the VirtualBox is running as this image. Can you guys help me figure out how to open the VirtualBox server on Bash, please? Thank you!
enter image description here
Welcome to stackoverflow! Please visit this useful link.
-Try to downgrade the vagrant version that you are using and try again.
-Also, try to use the command debug vagrant up in order to have debug logs available for a more precise description of the error message.
Finally, take a look at stackoverflow question too.
You need to downgrade the virtualbox version and the vagrant version (they need to be both on convenient versions)

Linux Vagrant Box compatible with VirtualBox version 6

I have been trying to install various Vagrant Boxes from Hashicorp's Vagrant Box Catalog but none seem to be compatible with:
Vagrant version: 2.2.9
VirtualBox versions: 6.0.x or 6.1.x
Host: Mac Catalina
I have tried multiple workarounds shared online and either the Guest Additions don't match or there are none available.
Both the plugin and the manual addition of guest additions also doesn't work.
Everything seems to work fine except for the shared folders syncing. Looking to get a workaround to fix the shared folder sync or a standard Linux Vagrant Box that is compatible with the VirtualBox guest additions.
The issue was fixed by manually mounting the Guest Additions VBoxGuestAdditions.iso file as CD-ROM in the VirtualBox.
Despite this, the Vagrant boxes may fail to sync shared folders via VirtualBox provider and instead use rsync for the same.
This can be fixed by updating the Vagrantfile by explicitly setting the provider type to VirtualBox in the config.
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
After this vagrant reload and the shared folder sync should work as expected.
$ vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => /Users/hemanik/vm/
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
Not sure if it was able to find the guest additions default: Checking for guest additions in VM... or if the previous tweaking with the guest additions took effect but the shared folder sync works as expected.
Just for an update, reinstalled Vagrant and the current working versions are as follows:
Vagrant version: 2.2.10
VirtualBox Version: 6.0.24 r139119

Windows/Vagrant:There was an error while executing `VBoxManage`,

I vagrant box file that was packaged on a Macbook. I transferred the file into Windows on my Surface Book and getting some permission error.
To fix this, other people suggested to enable virtualization and disable Hyper-V, which I have done already. After I tried this, I'm still getting the same problem, my VM can't be power on.
Please also see my attached screen capture.
jacky#DESKTOP-F0E0NKI MINGW64 ~/vm
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: 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", "47187f36-41f2-4941-9f1d-3930bc011f0f", "--type", "headless"]
Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file /Users/yuh8/vm/ubuntu-xenial-16.04-cloudimg-console.log (VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
jacky#DESKTOP-F0E0NKI MINGW64 ~/vm
$
Don't remove .vagrant, always use vagrant destroy or vagrant destroy -f to start from the scratch.
Disable HyperV.
Reinstall Virtualbox (repair installation).
Reinstall Vagrant (repair installation).
Go to C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv → right click on VBoxDrv.inf → select Install.
Execute sc start vboxdrv
Execute vagrant up.

VirtualBox not starting after windows 10 creators update

I am using vagrant with virtual box. After the windows 10 creator update, the vagrant startup is failing.
[# madhukar] vagrant up
Bringing machine 'vpnbox' up with 'virtualbox' provider...
==> vpnbox: Checking if box 'ubuntu/trusty64' is up to date...
==> vpnbox: Clearing any previously set forwarded ports...
==> vpnbox: Clearing any previously set network interfaces...
==> vpnbox: Preparing network interfaces based on configuration...
vpnbox: Adapter 1: nat
==> vpnbox: Forwarding ports...
vpnbox: 80 (guest) => 8080 (host) (adapter 1)
vpnbox: 22 (guest) => 2222 (host) (adapter 1)
==> vpnbox: 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", "716b386e-6fd3-4100-a576-25ffd53511f4", "--type", "headless"]
Stderr: VBoxManage.exe: error: The virtual machine 'vagrant_vpnbox_1476445010924_89306' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
I tried to start Oracle Virtual Box separately, buts it is also failing. It isn't showing any errors but Virtual Box is not starting up as well.
My Virtual Box (Version 5.1.6) is probably having some compatibility issue with windows-10 update. I updated Virtual box to 5.1.22 and this seems to have fixed the issue.
My Virtual box was on version 5.1.6 . I upgraded it to the latest version 5.1.30 available as of today. This fixed the issue. I was able to launch the VMs installed in the virtual box.

Is there a bug with Vagrant? How exactly does one successfully use Vagrant on Mac OSX?

I have pored through pages of Stack Overflow and find tons of answers that do not solve my inability to get "vagrant up" successfully...well, up on my Mac. Here is what happens:
ldco2016#DCortes-MBP-3 ~ $ vagrant init hashicorp/precise32 [ruby-2.3.0]
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
ldco2016#DCortes-MBP-3 ~ $ vagrant up [ruby-2.3.0]
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise32' 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: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
Vagrant works properly on Mac OS X. The problem you described does seem to be a bug in Vagrant, nor your mistake.
Vagrant does not really perform complicated tasks related to virtual machines itself, but sets the options and runs other programs.
In this case Vagrant ordered VirtualBox to create and start a new virtual machine and then periodically checked that machine's status to connect when it got into a "running" state. Instead Vagrant was informed that the machine had been powered off:
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state.
This indicates a problem with your VirtualBox (installation, settings, resources) and you should look there.
First run the Oracle VM VirtualBox Manager, right-click on the machine entry and choose "Show log..."; check if you can start the machine yourself; check the memory and CPU settings in VirtualBox.
Side note: Sometimes a tweak in Vagrantfile for OS X is required (mainly for disk sharing between the guest and host), but this is not the case with hashicorp/precise32. Using the two commands you ran, the machine started properly on El Capitan, Vagrant 1.8.4, VirtualBox 5.0.16.
hashicorp/* are pretty old boxes (generally older than 2 years).
You would want to use ubuntu/precise32 in your case, which are the official boxed maintained by folks from hashicorp

Resources