When I vagrant up
with a basic Vagrantfile with only those 2 lines configured :
config.vm.box = "ubuntu/trusty32"
config.vm.network "forwarded_port", guest: 80, host: 8080
I see my virtual box opening, but then my vagrant log shows this line multiple times until timeout :
default: Warning: Connection timeout. Retrying...
Then, some time after the timeout, the virtual box box is finally asking me for a login, but that was too long!
So I log with vagrant/vagrant. Then on my physical machine, if I "vagrant ssh". Nothing happens, until this :
ssh_exchange_identification: read: Connection reset by peer
What's wrong ? Any idea ?
(btw my port 8080 is free, and I also tried vb.gui = true
,
and it's working with box hashicorp/precise32
)
If you have a computer that supports hardware virtualization, you need to enable it in the BIOS.
If you do not have a modern computer with a CPU that supports hardware virtualisation, like in your case, you will have to stick to 32 bits boxes. That box, trusty32, is 32 bits so it should work.
But if it does not, you can try any of the things Piotr Banaszkiewicz describes in his blog post here. The post is a little bit old (2012) but we are talking about an even older CPU here (2009), so it may still apply.
As a summary, quoting here:
- In the VirtualBox GUI select VM → Settings → System → Acceleration, then uncheck everything.
- Go to the directory containing your VirtualBox VMs, then to your VM’s directory, then edit *.vbox XML file. Within the CPU tag children (like HardwareVirtEx or PAE), replace every enabled="true" with enabled="false".
- Turn off hardware virtualization via Vagrantfile (config.vm.customize ["modifyvm", :id, "--hwvirtex", "off"])
- Check if number of CPUs for your Vagrant virtual machine is greater than 1. If so, go and change the count of CPUs in your *.vbox file to one.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With