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

Support for VirtualBox 5.2 #9090

Closed
BobNowadly opened this issue Oct 20, 2017 · 52 comments
Closed

Support for VirtualBox 5.2 #9090

BobNowadly opened this issue Oct 20, 2017 · 52 comments

Comments

@BobNowadly
Copy link

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

Vagrant version 2.0.0

Host operating system

Windows 10 version 10.0.16299
VirtualBox 5.2

Guest operating system

Ubuntu 16.04

Debug output

When running vagrant up I get the following output

The provider 'virtualbox' that was requested to back the machine
'dev' 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

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.

@jenhsun
Copy link

jenhsun commented Oct 20, 2017

My temporary solution can be found at #7573

Here is what I did and it works.

Where: /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/providers/virtualbox
All changed need to be made with sudo.

Changed file: plugin.rb Add the following after Line 59:
autoload :Version_5_2, File.expand_path("../driver/version_5_2", __FILE__)

Changed file: driver/meta.rb Add the following after Line 64:
"5.2" => Version_5_2,

Copy file driver/version_5_1.rb to driver/version_5_2.rb and change two occurences of _5_0 to _5_1 and _5_1 to _5_2

@thelfensdrfer
Copy link

thelfensdrfer commented Oct 20, 2017

autoload :Version_5_2, File.expand_path("../driver/version_5_2", FILE) has to be
autoload :Version_5_2, File.expand_path("../driver/version_5_2", __FILE__) I think?

@jenhsun
Copy link

jenhsun commented Oct 20, 2017

@thelfensdrfer that's right, github does change __File__ to FILE automatically. Thanks and Updated.

@icflorescu
Copy link

Although the issue specifically refers to Windows hosts, @jenhsun's temporary quick fix is platform-independent.
Just used it on a Linux Mint 18.2 / Ubuntu 16.04 host and worked like a charm.
Thanks!

@creacog
Copy link

creacog commented Oct 20, 2017

To confirm that @jenhsun comment #9090 (comment) also works on Mac OS X 10.11.6 (15G1611)

@redknitin
Copy link

There might be a fix for the issue in this commit: 7d73af5

@briancain
Copy link
Member

Hey everyone: As I mentioned in a few other recent issues, support for VirtualBox 5.2 has already been merged into the master branch of Vagrant. We just haven't had a chance to roll out the next release. We're shooting for getting the next release out early next week. I'll go ahead and leave this issue open for now...Thanks!

@icflorescu
Copy link

@briancain - Thanks for letting us know, and good idea to leave this open. The quick fix above will help other people to work around the issue until next week.

@gutierri
Copy link

In archlinux the AUR vagrant-git package already solves this. Build from source :)

@anthonyvancauwenberghe
Copy link

fix works on archlinux thanks

@sandric
Copy link

sandric commented Oct 22, 2017

Can confirm that @jenhsun solution works on Windows 7.

@reneroboter
Copy link

@jenhsun save my day ^^

@cig0
Copy link

cig0 commented Oct 23, 2017

Hello @briancain, what about adding an option to force the use of a specific version of the provider (
when Vagrant itself can't validate it), under the entire responsibility of the user (of course!)?

I'm not sure what would be the interface changes of VirtualBox in this new release that may affect Vagrant, but I guess that most of the times, most of the stuff should keep working (kind of)-- and if not, well, that's why the provider isn't validated.

@adriandorin
Copy link

This fix works also for MacOS Sierra 10.12.6.
Cheers.

@ElMatella
Copy link

Is it mandatory to hardcode the VirtualBox versions? After @jenhsun response, it feels like not, am I wrong?

@nCrazed
Copy link

nCrazed commented Oct 23, 2017

@gutierri have you noticed any noticeable changes in performance since virtualbox5.2 + vagrant-git?

@monotonee
Copy link
Contributor

monotonee commented Oct 23, 2017

Is it mandatory to hardcode the VirtualBox versions?

@ElMatella, my thoughts exactly. I strongly suspect that there is a better way. Both the VirtualBox 5.1 and 5.2 drivers merely extend the 5.0 driver, only adding a logger with another hard-coded VirtualBox version in the log name.

Perhaps implementing a driver factory to create the appropriate driver class for the detected provider version would be a more maintainable solution. The addition of a provider version parameter in the driver class' constructor would also allow the logger name to be dynamically generated. Only those provider versions that actually require additional driver functionality would need a discrete class.

@steelysteel
Copy link

Thanks @jenhsun for the work around until commit 7d73af5 is pushed out.

@lukeb2e
Copy link

lukeb2e commented Oct 24, 2017

is there already a plan when a new release with support for VirtualBox 5.2 will be released?

@rphillips
Copy link

@biolypl The patch was created on September 8, and the tag for 2.0.0 created on September 7th. There will need to be a new release to suppose VirtualBox 5.2.

@gutierri
Copy link

gutierri commented Oct 24, 2017 via email

@sailorfred
Copy link

sailorfred commented Oct 24, 2017

Wasn't 2.0.0 already available a few days ago?

Was a fix released under the same version number?

I ask because we were going through compatibility hell with bento/ubuntu-16.04, VirtualBox 5.1.30, and Vagrant 2.0.0 yesterday, so I don't see how 2.0.0 could be a 3 hour old release.

@sailorfred
Copy link

sailorfred commented Oct 24, 2017

The 2.0.0 on your download page is still broken:
-----> Starting Kitchen (v1.16.0)
-----> Creating ...
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
   
   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.

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT:
STDERR: 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

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.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1] on default-ubuntu-1604


Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

$ vagrant --version
Vagrant 2.0.0

@briancain
Copy link
Member

@sailorfred - You are likely getting that message because you have VirtualBox 5.2 installed on your system. I recommend downgrading to the latest VirtualBox 5.1.x, and you should be able to get Vagrant working again.

There's a few more tasks for us to finish, and the next release that includes support for VirtualBox 5.2 should be out soon! Thanks for your patience everyone.

@sailorfred
Copy link

It was the @biolypl response that confused me:

@glookie1 It's ready, update your vagrant to 2.0.0 👍

@DonRichards
Copy link

It's never good when someone suggest downgrading to use another product. But thanks for the work!

@ronanmccoy
Copy link

Just adding my $0.02: on macOS Sierra, using Virtualbox 5.2.0 and Vagrant 2.0.0, and the solution offered by @jenhsun worked for me.

@KyleGoddard
Copy link

Mac OS X 10.12.6
VirtualBox 5.2.0
Vagrant 2.0.0

Jenshun's fix worked for me.

@mnpenner
Copy link

@lihaibh Exactly the same way. Files are located at C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-2.0.0\plugins\providers\virtualbox.

@ericleu
Copy link

ericleu commented Oct 30, 2017

vagrant in homebrew is still broken (at least not picking up the latest push). @voodookoop 's fix works for me:

For configuration: it is enough to add "5.2" => Version_5_1, to meta.rb after row 64. No other changes required to make it work.

@jaraco
Copy link

jaraco commented Oct 30, 2017

If you're on macOS with Vagrant installed from the website, the following command will patch your installation as recommended by @voodookoop:

sudo sed -i '/"5.1" => Version_5_1,/a\
\            "5.2" => Version_5_1,
' /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/providers/virtualbox/driver/meta.rb

Note there is are two carriage returns in that command, one after the /a\ and another after _5_1,, but if you copy/paste that command to terminal, it should do the trick.

@scttfrdmn
Copy link

scttfrdmn commented Oct 31, 2017

@jaraco thanks - I needed to modify your command slightly on OSX 10.12.6

sudo sed -i '' -e '/"5.1" => Version_5_1,/a
\ "5.2" => Version_5_1,
' /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/providers/virtualbox/driver/meta.rb

@soliverprofesional
Copy link

Same issue/solution with Fedora26.
Thanks guys, good work.

@zuernBernhard
Copy link

the solution from @voodookoop also works for me on mac os 10.13 (high sierra)

@joelhandwell
Copy link
Contributor

joelhandwell commented Nov 3, 2017

Now vagrant 2.0.1 is out tagged. Those who want to solve this can upgrade vagrant. Also can this issue be closed?

@e-kolpakov
Copy link

@joelhandwell Not on the download page yet - is there some other place?

@joelhandwell
Copy link
Contributor

joelhandwell commented Nov 3, 2017

@e-kolpakov sorry not yet as binary or installer. Only I found 2.0.1 tag hopefully it's on the way to download page.

@joelhandwell
Copy link
Contributor

And it's out now as binary installer at download page.

@meilunzhi
Copy link

update vagrant success

@pmoranga
Copy link

Indeed works with 2.0.1, needs to update documentation at https://www.vagrantup.com/docs/virtualbox/ to mention it.

@briancain
Copy link
Member

@pmoranga - Good catch, I'm opening a pull request now to fix that. Thanks!

@briancain
Copy link
Member

Also closing this, as it has been fixed and released!

@dahiyashish-portfolio
Copy link

I am getting the issue with all version which I had used
if some could help me with that.
VMware tool is much effective than this Vagrant in terms of compatibility.
I thought its quite good using docker kind of process to establish machine (BOX)
but it sucks 👎

@chrisroberts
Copy link
Member

@azzzdiggr If you are receiving an error about VirtualBox 5.2 not being supported than you likely need to uninstall Vagrant and install it again using an official release package from the downloads page: https://www.vagrantup.com/downloads.html

Otherwise, please feel free to create a new issue and provide the requested information in the template.

Cheers!

@michaelrodas
Copy link

@jenhsun Thank you so much, it really helped me

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests