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 · 63 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 · 63 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.

@robsheldon
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")

Worked fine for me on Linux (Fedora 40); I needed to edit /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/virtualbox/driver/meta.rb. I prefer this temporary solution over the other one involving changing the /usr/bin/VBox file.

Worked perfectly in stock Debian bookworm, same path. Thank you.

@UltherEgo
Copy link

UltherEgo commented Oct 6, 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")

The above workaround works. However, this is not a solution to the problem.
openSUSE Tumbleweed /usr/share/vagrant/gems/gems/vagrant-2.3.7/plugins/providers/virtualbox/driver/meta.rb

Vagrant 2.3.7
Oracle VirtualBox Manager v7.1.0_SUSE

Repo provider:
openSUSE:Tumbleweed
openSUSE:Factory

@alpizano
Copy link

alpizano commented Oct 7, 2024

I'm sure it was stated above, but if you're on MacOS (I'm on Ventura 13.7, on a 2017 MBP w/ Intel silicon), you can simply download the VirtualBox <= 7.0 such that it will be compatible with the latest version of Vagrant, and you won't have to edit any files on your system

Follow Below Steps to Run Windows VM via VirtualBox/Vagrant on MacOS (Easy way I have found)

1. Download link for older/previously released versions of VirtualBox:

***I used version 7.0
https://www.virtualbox.org/wiki/Download_Old_Builds

2. Obviously have Vagrant installed (I'm using version 2.4.1)

$ vagrant --version
Vagrant 2.4.1

3. Clone this repo from github

https://github.com/StefanScherer/windows-docker-machine

4. Navigate to the newly cloned repo directory in your terminal of your choice and run the below command:

vagrant up --provider virtualbox 2022-box

Boom. It should boot up with no errors. Remember you can download the VM extensions tools for VirtualBox as-well (the link is one the same page as the older/previously released builds as they are linked to their respective build release fyi).

You can use the VirtualBox GUI to operate your new VM. Good luck.

@daniel-2647
Copy link

Thank you, the instructions above are really appreciated and do work for those who are not dependent on Virtualbox 7.1.0, however, the issue is that Virtualbox 7.1.0 is not supported by vagrant 2.4.1. Installing a prior version is not a solution, since for mac M(X) users (M1, M2, M3), none of the above steps work (if trying to bring up a Virtualbox VM via Vagrant) and Virtualbox 7.1.0 is the only version that works on the new non intel macs (Virtualbox 7.1.0 works, the problem is Vagrant does no work with it).

@Insua
Copy link

Insua commented Oct 11, 2024

need update by vagrant

@hv23
Copy link

hv23 commented Oct 11, 2024

Also running into this issue, 2022 M2 Macbook Air

VirtualBox 7.1.2
Vagrant 2.4.1

Extremely frustrating!

@ichie-Ozor
Copy link

@aburston thank you very much, it worked for me
W10
vagrant 2.4.1
VirtualBox 7.1.2
all I did was to add: "7.1" => Version_7_0, to the list of versions in the directory you posted.
thanks man

@fluidum
Copy link

fluidum commented Oct 13, 2024

Due to the challenges in keeping support for various hypervisor versions fully up-to-date, it would be helpful to introduce a configurable variable that includes a "without warranties" option. This would allow users to opt into this setting without needing to modify the code directly.

@shadowlmd
Copy link

Dear Vagrant developers, please add an option to ignore installed VirtualBox version.

@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'

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.