Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant up is not able to to boot vm #13318

Open
andresbott opened this issue Jan 2, 2024 · 2 comments
Open

Vagrant up is not able to to boot vm #13318

andresbott opened this issue Jan 2, 2024 · 2 comments

Comments

@andresbott
Copy link

Issue: Vagrant up is not able to to boot vm

When running vagrant up with a virtualbox image, vagrant fails with error message and never boots the VM

The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

it seems some people already did some troubleshooting here:

Like mentioned in one of the issues: Downgrading Virtualbox to 6.1 and Vagrant 2.3.0. is a workaround for now

Debug output

https://gist.github.com/andresbott/8289f41421751b9d6345628c299ef925

Expected behavior

vagrant up should start the VM
NOTE: if using virtualbox GUI to boot the machine, the boot works without any problem

Actual behavior

vagrant is unable to start the VM

Reproduction information

Vagrant version

  • Vagrant 2.4.0

Host operating system

Guest operating system

Reproduced with

  • "ubuntu/focal64"
  • "debian/bookworm64"

Steps to reproduce

$ vagrant init
$vagrant up

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/focal64"
end
@chrisroberts
Copy link
Member

Hi there,

I have tested the ubuntu focal box and it boots as expected:

➜ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/focal64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/focal64'
    default: URL: https://vagrantcloud.com/api/v2/vagrant/ubuntu/focal64
==> default: Adding box 'ubuntu/focal64' (v20231207.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/focal64/versions/20231207.0.0/providers/virtualbox/unknown/vagrant.box
Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/focal64' (v20231207.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/focal64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/focal64' version '20231207.0.0' is up to date...
==> default: Setting the name of the VM: vagrant-test_default_1704316701705_83488
==> 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: 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:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 6.1.38
    default: VirtualBox Version: 7.0
==> default: Mounting shared folders...
    default: /vagrant => /home/spox/workspace/vagrant-test

➜ VBoxManage --version
7.0.12r159484

If you can provide the virtualbox log for the guest, it may include some relevant information for why the poweroff state is being encountered.

Cheers!

@andresbott
Copy link
Author

@chrisroberts thanks for looking into this,
on what host OS have you tired this?
I have a second machine with ubuntu 22.04 and I just could reproduce there as well.
on the other hand i asked a colleague to reproduce on MacOS(intel) and there it seems to boot normally.

find here the Vbox log: https://gist.github.com/andresbott/d691b91b546ad2fd27d17ed4d52d4edd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants