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

Recent version of Virtualbox 7.1.0 is not supported by vagrant 2.4.1 #13501

Open
mrdc opened this issue Sep 12, 2024 · 74 comments
Open

Recent version of Virtualbox 7.1.0 is not supported by vagrant 2.4.1 #13501

mrdc opened this issue Sep 12, 2024 · 74 comments

Comments

@mrdc
Copy link

mrdc commented Sep 12, 2024

Debug output

https://gist.github.com/mrdc/bbde883832d21763ca9f975adb641e10

Expected behavior

Vagrant should work with the recent Virtualbox version as the backend.

Actual behavior

Vagrant doesn't work with the recent Virtualbox version as the backend.

Reproduction information

Vagrant version

Vagrant 2.4.1
vagrant-vbguest (0.32.0, global)
Virtualbox 7.1.0-r164697

Host operating system

macOS 14.6.1

Guest operating system

Ubuntu 14.04 64bit

Steps to reproduce

  1. Update Virtualbox to 7.1.0-r164697
  2. Try to start a box using vagrant up
  3. Vagrant shows an error:
% vagrant up
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 5.2, 6.0, 6.1, 7.0

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.

Vagrantfile

Vagrant.configure('2') do |config|
        config.vm.box = 'ubuntu/trusty64'
       config.vm.provider :virtualbox do |v, override|
                v.memory = 2048
                v.cpus = 2
        end 
end
@mrdc
Copy link
Author

mrdc commented Sep 12, 2024

Looks like the issue is caused by Virtualbox itself - checking it right now.

@mrdc
Copy link
Author

mrdc commented Sep 12, 2024

Not confirmed. Virtualbox works fine. So, it's vagrant issue, not VB.

@ftaiolivista
Copy link

waiting for vagrant update, a quick workaround:

Edit /usr/bin/VBox

    VirtualBoxVM|virtualboxvm)
        exec "$INSTALL_DIR/VirtualBoxVM" "$@"
        ;;
    VBoxManage|vboxmanage)
    ########################
        if [[ $@ == "--version" ]]; then
           echo "7.0.0r164728"
        else
           exec "$INSTALL_DIR/VBoxManage" "$@"
        fi
        ;;
    ########################
    VBoxSDL|vboxsdl)
        exec "$INSTALL_DIR/VBoxSDL" "$@"
        ;;

@mmatela
Copy link

mmatela commented Sep 13, 2024

Anyone has a similar workaround for Windows?

@mrdc
Copy link
Author

mrdc commented Sep 13, 2024

Edit /usr/bin/VBox

Looks like this file is available on Linux and not on macOS. I've searched for awhile on mac and can't see the equivalent.

@lmptg
Copy link

lmptg commented Sep 13, 2024

waiting for vagrant update, a quick workaround:

Edit /usr/bin/VBox

    VirtualBoxVM|virtualboxvm)
        exec "$INSTALL_DIR/VirtualBoxVM" "$@"
        ;;
    VBoxManage|vboxmanage)
    ########################
        if [[ $@ == "--version" ]]; then
           echo "7.0.0r164728"
        else
           exec "$INSTALL_DIR/VBoxManage" "$@"
        fi
        ;;
    ########################
    VBoxSDL|vboxsdl)
        exec "$INSTALL_DIR/VBoxSDL" "$@"
        ;;

@ftaiolivista thanks. Just confirming here so others can see that this worked for me on EndeavourOS (Arch-based):
VirtualBox version 7.1.0 r164728 / vagrant --version # 2.4.1

@Happycoil
Copy link

Happycoil commented Sep 13, 2024

Edit /usr/bin/VBox

Looks like this file is available on Linux and not on macOS. I've searched for awhile on mac and can't see the equivalent.

A macOS equivalent would be to edit /usr/local/bin/VBoxManage directly to hijack the --version parameter:

#!/bin/bash
if [[ $@ == "--version" ]]; then
   echo "7.0.0r164728"
else
    exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$@"
fi

I'm still having issues in my environment, but I don't think it's related. The error I'm encountering is the following (the vm name is nil for some reason):

/opt/vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess/abstract_process.rb:44:in `initialize': all arguments must be String: ["/usr/local/bin/VBoxManage", "modifyvm", nil, "--macaddress1", "<address>"] (ArgumentError)

Running the Vagrantfile in the OP works fine, though.

Edit: It actually looks like the above error is a bug with vagrant + Virtualbox 7.1. I installed 7.0, and my environment works again.

@mrdc
Copy link
Author

mrdc commented Sep 13, 2024

A macOS equivalent would be to edit /usr/local/bin/VBoxManage directly to hijack the --version parameter:

Thanks! It fixes the issue on macOS and VB 7.1.0+.

@kisp
Copy link

kisp commented Sep 14, 2024

I followed the suggestion to edit /usr/bin/VBox, and it worked perfectly. Thanks for the help!

For reference, here's the diff of my changes for better clarity:

--- /tmp/orig/VBox	2024-09-14 15:40:52.961690431 +0200
+++ /usr/bin/VBox	2024-09-14 15:42:05.941525049 +0200
@@ -142,7 +142,11 @@
         exec "$INSTALL_DIR/VirtualBoxVM" "$@"
         ;;
     VBoxManage|vboxmanage)
-        exec "$INSTALL_DIR/VBoxManage" "$@"
+	if [[ $@ == "--version" ]]; then
+	  echo "7.0.0r164728"
+	else
+          exec "$INSTALL_DIR/VBoxManage" "$@"
+	fi
         ;;
     VBoxSDL|vboxsdl)
         exec "$INSTALL_DIR/VBoxSDL" "$@"

@corv89
Copy link

corv89 commented Sep 16, 2024

Unfortunately this workaround doesn't help with M* MacOS, as arm boxes aren't picked (which VirtualBox 7.1 is meant to address)

@aburston
Copy link

This worked for me on windows.

In: /c/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/virtualbox/driver

Edit meta.rb

$ diff -u meta.rb.orig meta.rb
--- meta.rb.orig        2024-09-16 11:37:37.017440100 +0100
+++ meta.rb     2024-09-16 11:33:51.312254400 +0100
@@ -69,6 +69,7 @@
             "6.0" => Version_6_0,
             "6.1" => Version_6_1,
             "7.0" => Version_7_0,
+            "7.1" => Version_7_0,
           }

           if @@version.start_with?("4.2.14")

@jillesme
Copy link

What @aburston suggested works. Although on Mac (if you installed Vagrant with Homebrew) the location is /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/virtualbox/driver

@alexlyapin
Copy link

alexlyapin commented Sep 17, 2024

This worked for me on windows.

In: /c/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/virtualbox/driver

Edit meta.rb

$ diff -u meta.rb.orig meta.rb
--- meta.rb.orig        2024-09-16 11:37:37.017440100 +0100
+++ meta.rb     2024-09-16 11:33:51.312254400 +0100
@@ -69,6 +69,7 @@
             "6.0" => Version_6_0,
             "6.1" => Version_6_1,
             "7.0" => Version_7_0,
+            "7.1" => Version_7_0,
           }

           if @@version.start_with?("4.2.14")

This worked for me.
Win10, vagrant 2.4.1, virtual box 7.1.0

@n0nag0n
Copy link

n0nag0n commented Sep 17, 2024

I also landed here. I was on Linux Mint and I got this error:

/usr/bin/vboxmanage: 146: [[: not found
7.1.0r164728

What I did to fix it was at the top, change the shebang from /bin/sh to /bin/bash. Worked like a dream.

@dualznz
Copy link

dualznz commented Sep 18, 2024

running temp meta.rb fix for windows fixed issue for me, make sure your machines are not in a suspended state or you will have to manually open them in virtualbox then poweroff machine, then the up signal will work correctly

@lerichardv
Copy link

Edit /usr/bin/VBox

Looks like this file is available on Linux and not on macOS. I've searched for awhile on mac and can't see the equivalent.

A macOS equivalent would be to edit /usr/local/bin/VBoxManage directly to hijack the --version parameter:

#!/bin/bash
if [[ $@ == "--version" ]]; then
   echo "7.0.0r164728"
else
    exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$@"
fi

I'm still having issues in my environment, but I don't think it's related. The error I'm encountering is the following (the vm name is nil for some reason):

/opt/vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess/abstract_process.rb:44:in `initialize': all arguments must be String: ["/usr/local/bin/VBoxManage", "modifyvm", nil, "--macaddress1", "<address>"] (ArgumentError)

Running the Vagrantfile in the OP works fine, though.

Edit: It actually looks like the above error is a bug with vagrant + Virtualbox 7.1. I installed 7.0, and my environment works again.

That solved my issue with the virtualbox 7.1 version, but now when i run vagrant up it throws me this error:

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "0eb0284d-a036-4e5c-8e0d-76cb431906b8", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

What could it be?

@stefanlasiewski
Copy link

stefanlasiewski commented Sep 18, 2024

For the record, I ran into a slew of problems when upgrading directly from VirtualBox 7.0 to 7.1. I had to completely uninstall 7.0 first before installing 7.1.

@lerichardv Try a complete uninstall.

Edit: I now get this error too. I have no fix.

hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this issue Sep 18, 2024
Fixes hashicorp#13501

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@nevalashka
Copy link

For the record, I ran into a slew of problems when upgrading directly from VirtualBox 7.0 to 7.1. I had to completely uninstall 7.0 first before installing 7.1.

@lerichardv Try a complete uninstall.

I have the same issue (1st problem and the second after solving 1st).
I tried to uninstall virtual box in different ways like via terminal script in file dmg and via storage. But nothing has changed and still got this second error

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "93d13001-f252-48f7-a4f5-3c92b7245391", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

@slonopotamus
Copy link

Just rollback to VirtualBox 7.0 until Vagrant adds support for 7.1.

@egel
Copy link

egel commented Sep 20, 2024

@slonopotamus thanks for your message. However I am afraid for the macOS with Silicon Chips, there is no official VirtualBox image that could be currently used. At least I did not find any on virtualbox website, only see the v7.1 supports Apple chips.

Although there is an unofficial beta port in brew, that can be installed with brew install --cask virtualbox@beta (which at the moment of writing points to 7.0.21_BETA4-164815) but I've also checked it and is also not working.

If you know maybe you could help us (or someone else) which exact versions of Vagrant & VirtualBox are actually compatible and working with each other for Silicon Chips?
Thanks a lot in advance for any hints.

@slonopotamus
Copy link

7.0.8 for Apple chips is still available from https://download.virtualbox.org/virtualbox/7.0.8/VirtualBox-7.0.8_BETA4-156879-macOSArm64.dmg

I have no idea whether it works with Vagrant or not. But current issue talks about "recent" versions, so I assume that not recent versions worked properly.

@apgeorge
Copy link

Virtualbox 7.0 seems to have only beta support for Apple silicone and hence is giving errors for me, even if I try it manually without vagrant. And the latest patch of 7.0 has completely removed the M1 support and doesn’t even install. The best solution here would indeed be 7.1 + vagrant.

@szel
Copy link

szel commented Oct 18, 2024

+2 (as vote for this issue to be fixed from 2 developers)

@flozano
Copy link
Contributor

flozano commented Oct 19, 2024

after editing the driver map, in a Mac with Apple Silicon and Vagrant 2.4.1 / VirtualBox 7.1, I'm getting:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bento/almalinux-9-arm64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'bento/almalinux-9-arm64'
    default: URL: https://vagrantcloud.com/api/v2/vagrant/bento/almalinux-9-arm64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.

Name: bento/almalinux-9-arm64
Address: https://vagrantcloud.com/api/v2/vagrant/bento/almalinux-9-arm64
Requested provider: virtualbox (arm64)

obviously -arm64 would be the correct image here, so...

@NoiseEee
Copy link

NoiseEee commented Oct 20, 2024

This worked for me on windows.

In: /c/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/virtualbox/driver

FWIW pulled out my hair for a bit, I have this file BUT ALSO one installed in /c/Program Files (x86)/<etc> .... that's the one that mattered for me!!

@skeeith
Copy link

skeeith commented Oct 20, 2024

it's been months since this was released, it there still no official support for Virtual Box 7.1?

@jp-larose
Copy link

This error is not a welcoming introduction to Vagrant.

Thanks to the people in this thread who found and posted a workaround.

@breisig
Copy link

breisig commented Oct 29, 2024

What is going on with Vagrant that they aren't updating it? This is a pretty big issue.

@brlin-tw
Copy link
Contributor

@breisig

What is going on with Vagrant that they aren't updating it?

There's already a pull request that is supposed to fix this issue, if you are able to help it progress it will be fixed sooner.

@slonopotamus
Copy link

There's one more pull request that passes all tests.

@flozano
Copy link
Contributor

flozano commented Oct 29, 2024

there are no images for virtualbox / arm64 anyway :D so even if it fixed, it's not enough

@hiage
Copy link

hiage commented Oct 30, 2024

still waiting, you can temporary fix for ubuntu 24.04

sudo vim /usr/bin/VBox
update this line:

    VBoxManage|vboxmanage)
    ########################
        if [ "$1" = "--version" ]; then
       echo "7.0.0r164728"
       else
       exec "$INSTALL_DIR/VBoxManage" "$@"
       fi
       ;;
    ########################

and then

vagrant up 

@clayg
Copy link

clayg commented Oct 30, 2024

trying out vagrant on WSL for the first time, got VirtualBox 7.1 installed on the windows host and editing /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/provid ers/virtualbox/driver/meta.rb as suggested seemed to get past the "virtual box version not supported" error.

@Shuna322
Copy link

fixed sooner

That if they gonna release a package with this fix. Since I've been waiting for #13373 for more than half a year 😪
To me, it looks like everyone in Hashicorp moved to Go and kind of abandoned Ruby projects. They've started working on rewriting Vagrant to Go, but I don't think this will see a stable compatibility with the Ruby release.

@ftaiolivista
Copy link

fixed sooner

That if they gonna release a package with this fix. Since I've been waiting for #13373 for more than half a year 😪 To me, it looks like everyone in Hashicorp moved to Go and kind of abandoned Ruby projects. They've started working on rewriting Vagrant to Go, but I don't think this will see a stable compatibility with the Ruby release.

About this, anyone have tested Lima? (https://lima-vm.io/) Can be a good replacement of vagrant?

@chrisroberts
Copy link
Member

My sincere apologies on the delays. Some priorities got shifted but I am now playing catch-up on our backlog. VirtualBox 7.1 was merged in #13513 and as noted there the nightlies will include the fix if you need it prior to the upcoming release.

@pavelhoral
Copy link

pavelhoral commented Nov 1, 2024

Still getting error when setting up the network interface even with the latest nightly build:

Error from starting new VM
> vagrant up dc
Bringing machine 'dc' up with 'virtualbox' provider...
==> dc: Importing base box 'gusztavvargadr/windows-server'...
==> dc: Matching MAC address for NAT networking...
C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess/abstract_process.rb:44:in `initialize': all arguments must be String: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "modifyvm", nil, "--macaddress1", "0800273E19F0"] (ArgumentError)

        raise ArgumentError, "all arguments must be String: #{args.inspect}"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        from C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess.rb:26:in `new'
        from C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess.rb:26:in `new'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/subprocess.rb:87:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/subprocess.rb:25:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/driver/base.rb:471:in `block in raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/driver/base.rb:470:in `raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/driver/base.rb:406:in `block in execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/retryable.rb:20:in `retryable'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/driver/base.rb:401:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/driver/version_5_0.rb:768:in `set_mac_address'
        from C:/Program Files/Vagrant/embedded/mingw64/lib/ruby/3.3.0/forwardable.rb:240:in `set_mac_address'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/match_mac_address.rb:19:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/discard_state.rb:18:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/import.rb:81:in `import'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/import.rb:16:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:20:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builtin/prepare_clone.rb:18:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/customize.rb:43:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/check_accessible.rb:21:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builtin/call.rb:56:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builtin/config_validate.rb:28:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builtin/handle_box.rb:59:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builtin/call.rb:56:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/plugins/providers/virtualbox/action/check_virtualbox.rb:23:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/machine.rb:247:in `action_raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/machine.rb:216:in `block in action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/environment.rb:649:in `lock'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/machine.rb:202:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/machine.rb:202:in `action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2.dev/lib/vagrant/batch_action.rb:89:in `block (2 levels) in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/logging-2.4.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Environment:

> vagrant --version
Vagrant 2.4.2.dev

> & 'C:\Program Files\Oracle\VirtualBox\VBoxManage.exe' --version
7.1.0r164728

> systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

@chrisroberts
Copy link
Member

@pavelhoral can you please provide a simple Vagrantfile that reproduces the error you are encountering

@pavelhoral
Copy link

pavelhoral commented Nov 5, 2024

@pavelhoral can you please provide a simple Vagrantfile that reproduces the error you are encountering

Vagrant.configure("2") do |config|
  # Disable sync of default folder
  config.vm.synced_folder ".", "/vagrant", disabled: true

  config.vm.define "dc", autostart: false do |dc|
    dc.vm.hostname = "dc"
    dc.vm.box = "gusztavvargadr/windows-server"
    dc.vm.box_version = "2102.0.2312"

    dc.vm.provider "virtualbox" do |vb|
      vb.memory = "2048"
      vb.gui = true
    end
  end
end

Getting this error when using the recently released 2.4.2 release:

> vagrant up dc
Bringing machine 'dc' up with 'virtualbox' provider...
==> dc: Importing base box 'gusztavvargadr/windows-server'...
==> dc: Matching MAC address for NAT networking...
C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess/abstract_process.rb:44:in `initialize': all arguments must be String: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "modifyvm", nil, "--macaddress1", "0800273E19F0"] (ArgumentError)

        raise ArgumentError, "all arguments must be String: #{args.inspect}"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        from C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess.rb:26:in `new'
        from C:/Program Files/Vagrant/embedded/gems/gems/childprocess-4.1.0/lib/childprocess.rb:26:in `new'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/subprocess.rb:87:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/subprocess.rb:25:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/driver/base.rb:471:in `block in raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/driver/base.rb:470:in `raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/driver/base.rb:406:in `block in execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/retryable.rb:20:in `retryable'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/driver/base.rb:401:in `execute'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/driver/version_5_0.rb:768:in `set_mac_address'
        from C:/Program Files/Vagrant/embedded/mingw64/lib/ruby/3.3.0/forwardable.rb:240:in `set_mac_address'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/match_mac_address.rb:19:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/discard_state.rb:18:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/import.rb:81:in `import'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/import.rb:16:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:20:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builtin/prepare_clone.rb:18:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/customize.rb:43:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/check_accessible.rb:21:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builtin/call.rb:56:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builtin/config_validate.rb:28:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builtin/handle_box.rb:59:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builtin/call.rb:56:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/plugins/providers/virtualbox/action/check_virtualbox.rb:23:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/machine.rb:247:in `action_raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/machine.rb:216:in `block in action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/environment.rb:649:in `lock'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/machine.rb:202:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/machine.rb:202:in `action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.2/lib/vagrant/batch_action.rb:89:in `block (2 levels) in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/logging-2.4.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

@chrisroberts
Copy link
Member

@pavelhoral Using the Vagrant file you provided, I was able to bring the guest up without issue:

Screenshot_20241112_150626

@pavelhoral
Copy link

I have reinstalled Vagrant with no luck.

image

d:\work\vagrant>vagrant --version
Vagrant 2.4.3

@joegallo
Copy link

someuser@somecomputer:~/somedirectory $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-22.04'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-22.04' version '202309.08.0' is up to date...
==> default: Setting the name of the VM: multivac_default_1731518082667_46132
==> 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...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "7e5e1256-80f4-4a7e-adab-448347492207", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

someuser@somecomputer:~/somedirectory $ vagrant destroy -f
==> default: Destroying VM and associated drives...
joegallo@simulacron:~/Code/multivac $ vagrant version
Installed Version: 2.4.3
Latest Version: 2.4.2

You're running an up-to-date version of Vagrant!
someuser@somecomputer:~/somedirectory $ uname -a
Darwin simulacron.local 23.6.0 Darwin Kernel Version 23.6.0: Thu Sep 12 23:36:12 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_ARM64_T6020 arm64

I tried it this morning with 2.4.3 and I'm still seeing the same issue.

@chrisroberts
Copy link
Member

@pavelhoral can you provide a gist of the output from vagrant up --debug. The ID of the guest instance isn't being properly detected, which is resulting in the error, but I'm unable to determine why since I can't reproduce the behavior locally.

@joegallo that error is due to attempting to run a guest with amd64 architecture on a host with arm64 architecture.

@pavelhoral
Copy link

Somehow missed your comment... attaching debug log from vagrant up --debug dc 2> vagrant-dc.log and I have also tried to run Alma Linux box with the same result (attached vagrant-alma.log).

D:\work\vagrant>vagrant --version
Vagrant 2.4.3

@pavelhoral
Copy link

Looking at the log file I guess the following is the culprit (as you suspected):

 INFO base: VBoxManage path: C:/Program Files/Oracle/VirtualBox/VBoxManage.exe
 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", "df2c7683-3101-4afe-a050-4ed6b1a1fd20"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1
DEBUG virtualbox: VM not found! Clearing saved machine ID and reloading.
DEBUG virtualbox: Instantiating the driver for machine ID: "df2c7683-3101-4afe-a050-4ed6b1a1fd20"

This is what I get when calling the command manually:

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showvminfo df2c7683-3101-4afe-a050-4ed6b1a1fd20
Name:                        packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918
Encryption:                  disabled
Groups:                      /
Platform Architecture:       x86
Guest OS:                    Red Hat (64-bit)
UUID:                        df2c7683-3101-4afe-a050-4ed6b1a1fd20
Config file:                 C:\Users\horal\VirtualBox VMs\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918.vbox
Snapshot folder:             C:\Users\horal\VirtualBox VMs\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918\Snapshots
Log folder:                  C:\Users\horal\VirtualBox VMs\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918\Logs
Hardware UUID:               df2c7683-3101-4afe-a050-4ed6b1a1fd20
Memory size:                 1024MB
Page Fusion:                 disabled
VRAM size:                   4MB
CPU exec cap:                100%
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    EFI
Number of CPUs:              1
HPET:                        disabled
PAE:                         enabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
CPUID overrides:             None
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
AMD-V Virt. Vmsave/Vmload:   enabled
CPUID Portability Level:     0
Boot menu mode:              message and menu
Boot Device 1:               HardDisk
Boot Device 2:               DVD
Boot Device 3:               Not Assigned
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
BIOS NVRAM File:             C:\Users\horal\VirtualBox VMs\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918\packer-almalinux_8_vagrant_virtualbox_x86_64-1717529620_1732528343670_16918.nvram
VBoxManage.exe: error: The UEFI NVRAM file is not existing for this machine
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component NvramStoreWrap, interface INvramStore, callee IUnknown
VBoxManage.exe: error: Context: "COMGETTER(UefiVariableStore)(uefiVarStore.asOutParam())" at line 1441 of file VBoxManageInfo.cpp

@pavelhoral
Copy link

pavelhoral commented Nov 25, 2024

After upgrading VirtualBox to 7.1.4 r165100 (which was not available at the time I first faced the issue) the issue went away. So it was problem of VirtualBox. Thank you for your help.

UPDATE: spoke too soon... there are other errors. Will post in a new comment in a minute.

@pavelhoral
Copy link

pavelhoral commented Nov 25, 2024

The new error for Alma Linux box (8.10.20240821) feels like Vagrant issue (#13404):

==> alma: Attempting graceful shutdown of VM...
==> alma: Destroying VM and associated drives...
D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:84:in `block in guess_local_iso': undefined method `exists?' for class File (NoMethodError)

            path && File.exists?(path)
                        ^^^^^^^^
Did you mean?  exist?
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:83:in `each'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:83:in `find'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:83:in `guess_local_iso'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:48:in `local_path'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/base.rb:48:in `additions_file'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installers/base.rb:223:in `iso_file'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installers/linux.rb:66:in `install'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installers/redhat.rb:14:in `install'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installers/centos.rb:16:in `install'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installer.rb:91:in `block in install'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installer.rb:193:in `with_hooks'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/installer.rb:90:in `install'
        from D:/cache/vagrant/gems/3.3.6/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/machine.rb:106:in `block (2 levels) in guest_additions_state'

And new error for Windows Server box (2102.0.2409) feels like another VirtualBox issue:

 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "startvm", "24ecce53-0aca-4b14-8417-f0c6f6201ec9", "--type", "headless"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31996
DEBUG subprocess: Exit status: 1
 INFO retryable: Retryable exception raised: #<Vagrant::Errors::VBoxManageError:"There was an error while executing `VBoxManage`, a CLI used by Vagrant\nfor controlling VirtualBox. The command and stderr is shown below.\n\nCommand: [\"startvm\", \"24ecce53-0aca-4b14-8417-f0c6f6201ec9\", \"--type\", \"headless\"]\n\nStderr: VBoxManage.exe: error: NAT#0: configuration error: failed to set up redirection of 55985 to 5985. Probably a conflict with existing services or other rules (VERR_NAT_REDIR_SETUP).\r\nVBoxManage.exe: error: Failed to attach the network LUN (VERR_NAT_REDIR_SETUP)\r\nVBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole\r\n">

New debug logs:

@pavelhoral
Copy link

pavelhoral commented Nov 25, 2024

The Alma Linux issue was issue of vagrant-vbguest plugin. After uninstalling the box booted up without any issue (don't know why I installed that plugin it in the first place).

Still trying to figure out what is going on with the Windows Server box.

@pavelhoral
Copy link

pavelhoral commented Nov 25, 2024

Ok... Windows Server box works as well after system restart. Seems like my particular issues running Vagrant boxes on Windows are solved with the newest Vagrant and VirtualBox.

D:\work\vagrant>"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" --version
7.1.4r165100

D:\work\vagrant>vagrant --version
Vagrant 2.4.3

Tested with Alma Linux box and Windows Server box with the following Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.synced_folder ".", "/vagrant", disabled: true

  config.vm.define "dc", autostart: false do |dc|
    dc.vm.box = "gusztavvargadr/windows-server"
    dc.vm.box_version = "2102.0.2409"
  end

  config.vm.define "alma", autostart: false do |alma|
    alma.vm.box = "almalinux/8"
    alma.vm.box_version = "8.10.20240821"
  end
end

@thierryler
Copy link

I'm getting the same issue...

Vagrant (installed with Brew)

vagrant version   
Installed Version: 2.4.3
Latest Version: 2.4.3

VirtualBox (installed from the website)

VBoxManage --version
7.1.4r165100

VagrantFile

hosts = {
  "test§dev" => "192.168.1.77"
}

Vagrant.configure("2") do |config|
  
  config.vm.box = "debian/bookworm64"

  hosts.each do |name, ip|
    config.vm.define name do |vm|
      vm.vm.network "public_network", ip: ip
      config.vm.provider "virtualbox" do |v|
        v.memory = "4096"
        v.name = name
      end
    end
  end
end

Fail:

vagrant up --debug
...
/opt/vagrant/embedded/gems/gems/vagrant-2.4.3/lib/vagrant/machine.rb:201:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.3/lib/vagrant/batch_action.rb:88:in `block (2 levels) in run'
 INFO interface: error: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "f55ba277-134b-47b9-a1e7-bd2a2116b1d3", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "f55ba277-134b-47b9-a1e7-bd2a2116b1d3", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

See full log
vagrantup.log

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

Successfully merging a pull request may close this issue.