0

I am using Ubuntu 15.10 64bit on a Core i3. I have installed Vagrant 1.8.1 and VirtualBox.

I did the following:

$ vagrant box add ubuntu/trusty32 
$ vagrant init ubuntu/trusty32
$ vagrant up

After doing vagrant up, I get the below shown error. If I open VirtualBox, I can see that the system has booted up and waiting for username and password.

Note: I don't have any issues in getting the hashicorp/precise32 running in Vagrant. I have issues only with ubuntu/trusty32.

~/vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Setting the name of the VM: vagrant_default_1459678892518_13508
==> 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 again gave $ vagrant up and this is what I got

~/vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: VirtualBox VM is already running.

I also tried $ vagrant ssh and I got the following.

~/vagrant$ vagrant ssh
ssh_exchange_identification: read: Connection reset by peer

This is my Vagrantfile

Could anyone let me know what is the issue ?

robomon
  • 269
  • 2
  • 16

2 Answers2

1

You can try

$ vagrant reload

or

$ vagrant halt && vagrant up

And see if you have better luck.

I just tried your exact series of steps and it worked for me. Also, the default timeout on the box is 300 seconds (5 minutes), so there is something strange going on. You can try booting it through the VirtualBox interface if the above commands don't work, or by changing your Vagrantfile to have the GUI be displayed as follows...

Change this:

# config.vm.provider "virtualbox" do |vb|
#   # Display the VirtualBox GUI when booting the machine
#   vb.gui = true
#
#   # Customize the amount of memory on the VM:     
#   vb.memory = "1024"
# end

To this:

config.vm.provider "virtualbox" do |vb|
  # Display the VirtualBox GUI when booting the machine
  vb.gui = true

#   # Customize the amount of memory on the VM:     
#   vb.memory = "1024"
end

And try $ vagrant up again. The new window/gui that shows up may have additional information.

If all of the above fails, you can try

$ vagrant up --debug > vagrant_up.log 2>&1 && vagrant halt

Which will boot the machine with a debug flag and output the contents to the file vagrant_up.log in your vagrant directory before shutting the machine down again. You can then post the resulting log here.

EDIT

After more troubleshooting through the comments of this answer, this image was posted:

vb.gui

Which indicates Virtualbox/vagrant is waiting for a network adapter to continue the boot sequence.

You can resolve this by modifying your Vagrantfile once more to enable a network interface.

Adding a line such as the one below to the config section of your Vagrantfile should allow the machine to boot:

config.vm.network "private_network", ip: 192.168.30.10
Brian Brownton
  • 1,313
  • 14
  • 31
0

I was also facing the same problem. I tried changing the bios to enable virtualization and it works for me.

Arjun Singh
  • 677
  • 6
  • 18