I’ve made a new VM - it’s the first time I’ve done one from scratch, so it’s very simple. Host is Windows 11, guest is Debian 12. The first time I did vagrant up
it worked fine (but I don’t know how long it took, as I wasn’t watching). I successfully did vagrant ssh
and installed some stuff. But the second time it timed out with this output:
C:\dev\Debian>vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Checking if box ‘debian/bookworm64’ version ‘12.20230723.1’ 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…
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.
Unfortunately there are no errors to be those “good hints” - it just stops progressing after the “SSH auth method” line and sits there. But the computer is not idle at all - Task Manager shows “VirtualBox Headless Frontend” chewing up about 20-30% of the CPU, even after the boot times out! I have a second VM (an old CentOS 7 one I’m trying to replace), but it behaves fine - it boots quickly and uses no CPU when not being asked to do something.
vagrant status
says the timed-out VM is running, so even though the boot process didn’t complete, I have to do vagrant halt
. When I do, I get this:
C:\dev\Debian>vagrant halt
==> default: Attempting graceful shutdown of VM…
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
==> default: Forcing shutdown of VM…C:\dev\Debian>
As suggested, I increased the timeout value to 600 seconds. The next time it booted, it took a long time but succeeded before 10 minutes. But since then I have not been able to boot it within 10 minutes. I could increase the timeout even more and perhaps get a better batting average, but there is clearly something wrong.
The only uncommented lines in my Vagrantfile are as follows:
Vagrant.configure("2") do |config|
config.vm.box_download_options = {"ssl-revoke-best-effort" => true}
config.vm.box = "debian/bookworm64"
config.vm.boot_timeout = 600
config.vm.network "private_network", ip: "192.168.56.100"
config.vm.synced_folder "c:/dev/www", "/var/www", owner: "www-data", group: "www-data"
end
With no feedback, I don’t know what’s going on. Any suggestions for how to troubleshoot this?