Skip to content

Vagrant 2.2.6 doesn't work with VirtualBox 6.1.0 #178

Closed
@PaulNeumann

Description

@PaulNeumann
Contributor

VirtualBox 6.1.0 has been released. Unfortunately, Vagrant 2.2.6 doesn't work with this new release. This isn't an issue with this repository, but it may affect people using these boxes. It should be fixed in the next release of Vagrant (see hashicorp/vagrant#11249), but here's how to work around the problem in the meantime.

Credits:

The workaround requires 3 changes.

First, in the file /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/plugin.rb, add a line at the end of the Driver module for VirtualBox 6.1, as follows. (On Windows, the file location is C:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6\plugins\providers\virtualbox\plugin.rb.)

module Driver
  autoload :Meta, File.expand_path("../driver/meta", __FILE__)
  autoload :Version_4_0, File.expand_path("../driver/version_4_0", __FILE__)
  autoload :Version_4_1, File.expand_path("../driver/version_4_1", __FILE__)
  autoload :Version_4_2, File.expand_path("../driver/version_4_2", __FILE__)
  autoload :Version_4_3, File.expand_path("../driver/version_4_3", __FILE__)
  autoload :Version_5_0, File.expand_path("../driver/version_5_0", __FILE__)
  autoload :Version_5_1, File.expand_path("../driver/version_5_1", __FILE__)
  autoload :Version_5_2, File.expand_path("../driver/version_5_2", __FILE__)
  autoload :Version_6_0, File.expand_path("../driver/version_6_0", __FILE__)
  autoload :Version_6_1, File.expand_path("../driver/version_6_1", __FILE__)
end

Second, in the file /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/driver/meta.rb, add a line at the end of the driver_map section for VirtualBox 6.1, as follows. (On Windows, the file location is C:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6\plugins\providers\virtualbox\driver\meta.rb.)

driver_map   = {
  "4.0" => Version_4_0,
  "4.1" => Version_4_1,
  "4.2" => Version_4_2,
  "4.3" => Version_4_3,
  "5.0" => Version_5_0,
  "5.1" => Version_5_1,
  "5.2" => Version_5_2,
  "6.0" => Version_6_0,
  "6.1" => Version_6_1,
}

Finally, create a new file called version_6_1.rb in the directory /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/driver. (On Windows, create this file in the folder C:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6\plugins\providers\virtualbox\driver.) In this new file, paste the content from here.

With these 3 changes, Vagrant 2.2.6 will work with VirtualBox 6.1.0. I hope this helps!

Activity

piotr-cz

piotr-cz commented on Dec 12, 2019

@piotr-cz

Thanks for sharing!

MasterCATZ

MasterCATZ commented on Dec 13, 2019

@MasterCATZ

Thank you

RvstFyth

RvstFyth commented on Dec 16, 2019

@RvstFyth

Nice, thanks for the workaround!
For Arch linux the paths where a bit different though:

/opt/vagrant/embedded/gems/gems/vagrant-2.2.6/plugins/providers/virtualbox/plugin.rb
/opt/vagrant/embedded/gems/gems/vagrant-2.2.6/plugins/providers/virtualbox/driver/meta.rb

jonroberts24

jonroberts24 commented on Dec 16, 2019

@jonroberts24

Do you know when the next version that will work with VirtualBox will be out? Are we talking weeks / months? thanks

PaulNeumann

PaulNeumann commented on Dec 16, 2019

@PaulNeumann
ContributorAuthor

@jonroberts24 Only the Vagrant team can answer that. The only indication I've seen is @briancain's comment on the issue in the Vagrant repository.

Michael-Ziluck

Michael-Ziluck commented on Dec 16, 2019

@Michael-Ziluck

@PaulNeumann When I perform the steps you mentioned, I get the following error message:

A customization command failed:

["modifyvm", :id, "--clipboard", "bidirectional"]

The following error was experienced:

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

Command: ["modifyvm", "ce8a3576-201c-11ea-978f-2e728ce88125", "--clipboard", "bidirectional"]

Any ideas how I might get this resolved without disabling the bidirectional clipboard?

PaulNeumann

PaulNeumann commented on Dec 16, 2019

@PaulNeumann
ContributorAuthor

@ZiluckMichael I don't know; I'm sorry. I suggest asking in the hashicorp/vagrant repository. The thread for the VirtualBox 6.1.0 issue is at hashicorp/vagrant#11249.

scoter-oracle

scoter-oracle commented on Dec 16, 2019

@scoter-oracle
Member

While waiting for a fix from Vagrant you can apply that change manually by using "VBoxManage" CLI:

vboxmanage modifyvm <uuid/name> --clipboard-mode bidirectional

The option "--clipboard" has changed to "--clipboard-mode" on 6.1 VirtualBox release.

armenr

armenr commented on Dec 17, 2019

@armenr

Wow. The first post of this issue saved my butt.

When can we expect a stable update from the Vagrant team?

scoter-oracle

scoter-oracle commented on Dec 17, 2019

@scoter-oracle
Member

@karlbunch consider my update above for the Vagrant release supporting VirtualBox 6.1.0 (related to the clipboard change)

paolodenti

paolodenti commented on Dec 22, 2019

@paolodenti

thank you

Redsandro

Redsandro commented on Dec 23, 2019

@Redsandro

Thank you 👍

Don't forget the newly created file needs to be readable by all (e.g. 644), in case you have a different umask when running sudo.

41 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @timka@netsensei@charlmert@jimfrenette@paolodenti

        Issue actions

          Vagrant 2.2.6 doesn't work with VirtualBox 6.1.0 · Issue #178 · oracle/vagrant-projects