Error running Vagrant on Ubuntu 12.04 on EC2 - vagrant

I am using Ubuntu Server 12.04.2 LTS installed on Amazon EC2, architectue x86_64 with m1.medium machine type.
To install virtualbox I did
sudo apt-get install virtualbox
Now,
vagrant init precise32 http://files.vagrantup.com/precise32.box
vagrant up
always halts saying
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise32' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 8240k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise32' with provider 'virtualbox'!
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...

I also see the same result ("Booting VM" forever). Looks like this is not an option for vagrant: https://github.com/mitchellh/vagrant/issues/1631

I don't see an error. It pulls down the box from the URL you gave, imports it, and starts to boot. Once it finishes booting, you should be able to vagrant ssh into the VM.

If I understand the question correctly then vagrant is stuck at "Booting VM" and never actually starts?
Try setting an environment variable to enable logging
$ VAGRANT_LOG=DEBUG vagrant up
http://docs-v1.vagrantup.com/v1/docs/debugging.html
Also, try using a different image. The precise32 image might have an older version of virtual box guest additions.

Related

Chef Kitchen Vagrant box will not start when adding additional disks

Development is happening on Mac OSX
Writing a cookbook to partition, format, mount drives dynamically based on drives that are not partitioned, mounted, or formatted, May have been taken out of single drive raid-0 configuration, or may not have been configured through raid controller yet...
While working on writing test cases for cookbook. I am having the following issues.
.kitchen.yml file:
driver:
name: vagrant
# ssh:
# insert_key: false
customize:
cableconnected1: 'on'
createhd:
- filename: /tmp/disk1.vdi
size: 128
storagectl:
- name: SATA Controller
portcount: 4
storageattach:
- storagectl: SATA Controller
port: 0
device: 0
type: hdd
medium: /tmp/disk1.vdi
privileged: true
Command: kitchen verify
Gets stuck at the following
Output:
-----> Starting Kitchen (v1.20.0)
$$$$$$ Deprecated configuration detected:
require_chef_omnibus
Run 'kitchen doctor' for details.
-----> Creating <default-centos-7>...
(erb):173: warning: constant ::Fixnum is deprecated
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-7' is up to date...
==> default: Setting the name of the VM: default-centos-
7_default_1526333511693_18382
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (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:2200
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Will not proceed any further. The adding disk code was taken directly from the kitchen-vagrant documentation for adding a disk.
I can remove the createhd, storagectl, & storageattach sections, at which point the vagrant box works as intended.
I have verified that the /tmp/disk1.vdi file is created, I also have to delete the file between runs, after a kitchen destroy else I get the following error:
-----> Starting Kitchen (v1.20.0)
$$$$$$ Deprecated configuration detected:
require_chef_omnibus
Run 'kitchen doctor' for details.
-----> Creating <default-centos-7>...
(erb):173: warning: constant ::Fixnum is deprecated
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-7' is up to date...
==> default: Machine not provisioned because `--no-provision` is
specified.
Waiting for SSH service on 127.0.0.1:2200, retrying in 3 seconds
It will continue being stuck on retying in 3 seconds indefinitely until I escape the command.
I have tried with and without:
ssh:
insert_key: false
I have tried different formats of files that vagrant is supposed to support as a disk, including .vdi, .vmdk
I have ensured that SATA Controller is the appropriate controller available for the box.
This seems issue with vagrant and virtualbox versions. You can find a similar issue here
The reason for this is that kitchen/vagrant tries to bind the OS disk to port 0 of your controller. So the reason it doesn't boot is because there is no boot disk bound!
If you change port: 0 to port: 1 in your example it should boot as expected.

Vagrant - Failed to mount folders in Linux Guest using Puphpet and SMB mounting

I'm trying to set up Vagrant on Windows 10.
I have Vagrant 2.0.1, Virtual Box 5.2.4 and Guest Additions 5.2.4.
I had issues whilst Virtual Box and Guest Additions were not the same versions, but now I've bought them inline with each other I still get an error.
I am running Git Bash as Administrator too. Here is the output from git bash.
The vagrantfile is generated through Puphpet and I didn't really change much within puphpet setup. I added SMB for the shared folders as it recommended this. I did not supply a username or password, and when prompted for both during vagrant up I just leave them both blank.
I've seen and read the other articles on SO and not had any luck with them.
$ vagrant up Bringing machine 'machine1' up with 'virtualbox' provider...
==> machine1: Importing base box 'bento/ubuntu-16.04'...
==> machine1: Matching MAC address for NAT networking...
==> machine1: Checking if box 'bento/ubuntu-16.04' is up to date...
==> machine1: Setting the name of the VM: Ubuntu_machine1_1517300867334_22288
==> machine1: Preparing SMB shared folders...
machine1: You will be asked for the username and password to use for the SMB
machine1: folders shortly. Please use the proper username/password of your
machine1: Windows account.
machine1:
machine1: Username:
machine1: Password (will be hidden): Error! Your console doesn't support hiding input. We'll ask for input again below, but we WILL NOT be able to hide input. If this is a problem for you, ctrl-C to exit and fix your stdin.
machine1: Password (will be hidden):
==> machine1: Clearing any previously set network interfaces...
==> machine1: Preparing network interfaces based on configuration...
machine1: Adapter 1: nat
machine1: Adapter 2: hostonly
==> machine1: Forwarding ports...
machine1: 22 (guest) => 5741 (host) (adapter 1)
machine1: 22 (guest) => 2222 (host) (adapter 1)
==> machine1: Running 'pre-boot' VM customizations...
==> machine1: Booting VM...
==> machine1: Waiting for machine to boot. This may take a few minutes...
machine1: SSH address: 127.0.0.1:2222
machine1: SSH username: vagrant
machine1: SSH auth method: private key
==> machine1: Machine booted and ready! [machine1] GuestAdditions 5.2.4 running --- OK.
==> machine1: Checking for guest additions in VM...
==> machine1: Setting hostname...
==> machine1: Configuring and enabling network interfaces...
==> machine1: Mounting SMB shared folders...
machine1: E:/Simon/Sites => /var/www Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was:
PASSWORDHIDDENmPASSWORDHIDDENoPASSWORDHIDDENuPASSWORDHIDDENnPASSWORDHIDDENtPASSWORDHIDDEN PASSWORDHIDDEN-PASSWORDHIDDENtPASSWORDHIDDEN PASSWORDHIDDENcPASSWORDHIDDENiPASSWORDHIDDENfPASSWORDHIDDENsPASSWORDHIDDEN PASSWORDHIDDEN-PASSWORDHIDDENoPASSWORDHIDDEN PASSWORDHIDDENuPASSWORDHIDDENiPASSWORDHIDDENdPASSWORDHIDDEN=PASSWORDHIDDEN3PASSWORDHIDDEN3PASSWORDHIDDEN,PASSWORDHIDDENgPASSWORDHIDDENiPASSWORDHIDDENdPASSWORDHIDDEN=PASSWORDHIDDEN3PASSWORDHIDDEN3PASSWORDHIDDEN,PASSWORDHIDDENmPASSWORDHIDDENfPASSWORDHIDDENsPASSWORDHIDDENyPASSWORDHIDDENmPASSWORDHIDDENlPASSWORDHIDDENiPASSWORDHIDDENnPASSWORDHIDDENkPASSWORDHIDDENsPASSWORDHIDDEN,PASSWORDHIDDENdPASSWORDHIDDENiPASSWORDHIDDENrPASSWORDHIDDEN_PASSWORDHIDDENmPASSWORDHIDDENoPASSWORDHIDDENdPASSWORDHIDDENePASSWORDHIDDEN=PASSWORDHIDDEN0PASSWORDHIDDEN7PASSWORDHIDDEN7PASSWORDHIDDEN5PASSWORDHIDDEN,PASSWORDHIDDENfPASSWORDHIDDENiPASSWORDHIDDENlPASSWORDHIDDENePASSWORDHIDDEN_PASSWORDHIDDENmPASSWORDHIDDENoPASSWORDHIDDENdPASSWORDHIDDENePASSWORDHIDDEN=PASSWORDHIDDEN0PASSWORDHIDDEN6PASSWORDHIDDEN6PASSWORDHIDDEN4PASSWORDHIDDEN,PASSWORDHIDDENvPASSWORDHIDDENePASSWORDHIDDENrPASSWORDHIDDENsPASSWORDHIDDEN=PASSWORDHIDDEN3PASSWORDHIDDEN.PASSWORDHIDDEN0PASSWORDHIDDEN,PASSWORDHIDDENsPASSWORDHIDDENePASSWORDHIDDENcPASSWORDHIDDEN=PASSWORDHIDDENnPASSWORDHIDDENtPASSWORDHIDDENlPASSWORDHIDDENmPASSWORDHIDDEN,PASSWORDHIDDENcPASSWORDHIDDENrPASSWORDHIDDENePASSWORDHIDDENdPASSWORDHIDDENePASSWORDHIDDENnPASSWORDHIDDENtPASSWORDHIDDENiPASSWORDHIDDENaPASSWORDHIDDENlPASSWORDHIDDENsPASSWORDHIDDEN=PASSWORDHIDDEN/PASSWORDHIDDENePASSWORDHIDDENtPASSWORDHIDDENcPASSWORDHIDDEN/PASSWORDHIDDENsPASSWORDHIDDENmPASSWORDHIDDENbPASSWORDHIDDEN_PASSWORDHIDDENcPASSWORDHIDDENrPASSWORDHIDDENePASSWORDHIDDENdPASSWORDHIDDENsPASSWORDHIDDEN_PASSWORDHIDDENbPASSWORDHIDDEN6PASSWORDHIDDEN5PASSWORDHIDDEN0PASSWORDHIDDENcPASSWORDHIDDEN4PASSWORDHIDDEN2PASSWORDHIDDEN2PASSWORDHIDDENePASSWORDHIDDEN5PASSWORDHIDDEN5PASSWORDHIDDENbPASSWORDHIDDEN2PASSWORDHIDDENcPASSWORDHIDDENfPASSWORDHIDDEN1PASSWORDHIDDEN4PASSWORDHIDDENfPASSWORDHIDDENaPASSWORDHIDDEN0PASSWORDHIDDEN5PASSWORDHIDDENcPASSWORDHIDDEN1PASSWORDHIDDEN8PASSWORDHIDDEN6PASSWORDHIDDENfPASSWORDHIDDEN0PASSWORDHIDDEN3PASSWORDHIDDEN4PASSWORDHIDDEN7PASSWORDHIDDEN3PASSWORDHIDDENcPASSWORDHIDDEN PASSWORDHIDDEN/PASSWORDHIDDEN/PASSWORDHIDDEN1PASSWORDHIDDEN9PASSWORDHIDDEN2PASSWORDHIDDEN.PASSWORDHIDDEN1PASSWORDHIDDEN6PASSWORDHIDDEN8PASSWORDHIDDEN.PASSWORDHIDDEN1PASSWORDHIDDEN.PASSWORDHIDDEN7PASSWORDHIDDEN0PASSWORDHIDDEN/PASSWORDHIDDENbPASSWORDHIDDEN6PASSWORDHIDDEN5PASSWORDHIDDEN0PASSWORDHIDDENcPASSWORDHIDDEN4PASSWORDHIDDEN2PASSWORDHIDDEN2PASSWORDHIDDENePASSWORDHIDDEN5PASSWORDHIDDEN5PASSWORDHIDDENbPASSWORDHIDDEN2PASSWORDHIDDENcPASSWORDHIDDENfPASSWORDHIDDEN1PASSWORDHIDDEN4PASSWORDHIDDENfPASSWORDHIDDENaPASSWORDHIDDEN0PASSWORDHIDDEN5PASSWORDHIDDENcPASSWORDHIDDEN1PASSWORDHIDDEN8PASSWORDHIDDEN6PASSWORDHIDDENfPASSWORDHIDDEN0PASSWORDHIDDEN3PASSWORDHIDDEN4PASSWORDHIDDEN7PASSWORDHIDDEN3PASSWORDHIDDENcPASSWORDHIDDEN PASSWORDHIDDEN/PASSWORDHIDDENvPASSWORDHIDDENaPASSWORDHIDDENrPASSWORDHIDDEN/PASSWORDHIDDENwPASSWORDHIDDENwPASSWORDHIDDENwPASSWORDHIDDEN
The error output from the last command was:
mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Thanks!
So after reading closer, the username/password it asks for is your windows username and password. Now, that doesn't help in windows 10 if you have run through the setup process and created a Windows account online. If you have the same problems as me, make sure to check your account settings under account management, and "switch to local account" to create a local account for yourself. You'll be prompted to supply a password (needed, as PIN didn't work either). Log in to this user, and try again supplying your new credentials.
I hope this helps someone.

No Intel® Virtualization Technology (VT-x): Vagrant stumbles even with 32-bit images

CPU: Intel® Core™2 Quad CPU Q8200 # 2.33GHz × 4
Host OS: Ubuntu 16.04.2 64-bit
Vagrant: 1.9.7
Virtualbox: 5.1.24
I do:
$ vagrant init precise64 http://files.vagrantup.com/xenial32.box
...
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (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:2200
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Well, I tried xenial64.box as well. And precise32.
Here is some discussion "vagrant up" it stops at SSH auth method: private key
This seems to connected somehow with Intel Virtualization Technology.
Well, this CPU doesn't support it.
I will be satisfied with a 32 bit virtual machine. But how can I organize it? Well, I'd like just to start it. With or without SSH, or something. But just start.
Could you give me a kick here?

I can't open Virtual Box on windows 10 after the Microsoft update on 9/21/2016

I can't open Virtual Box on windows 10 after the Microsoft automatic update on 9/21/2016.
I get this error with vagrant up:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'scotch/box' 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: Adapter 2: hostonly
==> 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
'aborted' 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.
Trying to start VM with the windows app and it does nothing. No errors, no VM
Does anyone else have this problem?
Is there a way to update VM on windows with re-installing?
This worked for me, finally, though I don't think it is a long term solution.
uninstall virtual box
delete .vagrant directory (..../vagrant/.vagrant)
re-install virtual box version 5.0.20 (this is an older version)
vagrant up

vagrant up timing out on Windows 10

I'm trying to boot up a vagrant instance but it seems to hang at the default: SSH auth method: private key part no matter what I do. I'm new to vagrant so it's entirely possible that there's something I haven't done but should have.
System info:
Windows 10 build 10586.420
Vagrant 1.8.4
VirtualBox 5.0.22 r108108
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' 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...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
I had a look around for similar issues and people have suggested making sure Hyper-V is disabled (which it is) and enabling the virtualbox GUI to see if there are any other errors that aren't being put in the command line.
When I open the virtualbox GUI, I see a username/password prompt (see below):
I've tried entering the default vagrant username/passwords and these work but the vagrant up script still hangs and eventually crashes.
Any help would be much appreciated.
Thanks.

Resources