Vagrant 2.2.9
Archlinux 5.7.9-arch1-1
ubuntu/focal64
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 22, host: 2222, host_ip: "127.0.0.1", id: 'ssh'
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
config.vm.box = "ubuntu/focal64"
end
https://gist.github.com/Tehada/ddcc23ea26a2432f7cb4a6ba557cd5c0
Expected vm to start.
Command vagrant up stuck at line default: SSH auth method: private key, then timeout happens with this error:
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.
vagrant init
vagrant up
https://github.com/hashicorp/vagrant/issues/8157
https://github.com/hashicorp/vagrant/issues/10045
I tried these suggestions from previous issues:
Add port 22 forwarding:
```
config.vm.network "forwarded_port", guest: 22, host: 2222, host_ip: "127.0.0.1", id: 'ssh'
Add cableconnect:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
As of virtualization, I use macbook air 2015 and it seems that it is enabled by default. At least I was able to run virtual machines in virtualbox before and several months ago vagrant also worked fine.
I use virtualbox 6.1.12-2. Also I noticed that while I wait for `vagrant up` to fail due to timeout virtualbox gui freezes if I try to click on vagrant's vm there. It only unfreezes as soon as I kill vm using this command:
vboxmanage startvm 3c32d31c-702a-482e-b886-2be0176b849f --type emergencystop
```
After this command I can open vm's settings in gui of virtualbox.
Also I noticed that Nested VT-x/AMD-V is disables in my log, so may be it is somehow related.
Hi there!
Thanks for opening an issue with Vagrant. There is a confirmed bug that causes some of the newer Ubuntu boxes to boot slowly, which is causing the SSH timeout in this case.
You can work around this by adding the following customizations to your Vagrantfile:
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
v.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
end
Cheers!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hi there!
Thanks for opening an issue with Vagrant. There is a confirmed bug that causes some of the newer Ubuntu boxes to boot slowly, which is causing the SSH timeout in this case.
You can work around this by adding the following customizations to your Vagrantfile:
Cheers!