Vagrant does not recognize VirtualBox on x64-Windows7 (JRuby is already running)

I try to run Vagrant on a 64-bit machine under Windows 7, and I constantly get the error message: "Vagrant could not detect VirtualBox!" Here is what I installed:

  • JRE 6.0.230.25 x64
  • JRuby 1.6.0.0
  • Ruby 1.8.7.330 (Windows)
  • VirtualBox 3.2.12
  • Current version of Vagrant (as of 01/18/11)

I get the same error every time I try to execute a command like

vagrant box add eyu package.box 

and now I'm a little happy with my wit. Any suggestions?

(And I just installed the Ruby version for Windows after I struggled with this for a while. I don’t know if it could potentially cause some other conflict so that JRuby and Ruby would be installed on the same machine, but I "I got this error before and after installing it. "

Thanks in advance for your help.

+4
source share
5 answers

Do you put Virtualbox commands in your path?

set path=%path%;c:/programfiles/oracle/bin or similar?

+3
source

In my case, this problem was caused by the Java Home variable, still pointing to the 32-bit version of Java (Program Files (x86)).

Also: when you change the Java Home variable, restart your cmd so that it takes effect ;-) (dragged me nuts before I realized that one of them)

+2
source

If this same problem, in the end, the solution was to make sure that JRuby used the 64-bit JRE to execute: see https://groups.google.com/forum/#!topic/vagrant-up/ jnksKOR_Qhs .

Note that if you have JAVA_HOME installed in your environment, even if you install JRuby with an installer that includes the JRE, it will use the JRE from your JAVA_HOME. You must manually set JAVA_HOME = c: \ jruby-xyz \ jre.

+1
source

It seems that the tramp is looking for "VBoxManage" instead of "VBoxManage.exe".

I changed the file:

 <VAGRANT>/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/driver/base.rb 

on line 26:

 - @vboxmanage_path = "VBoxManage" + @vboxmanage_path = "VBoxManage.exe" 
+1
source

Like Kaniabi , I changed the path to absolute:

 - @vboxmanage_path = "VBoxManage" + @vboxmanage_path = "c:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe" 

Hooray!

0
source

Source: https://habr.com/ru/post/1336067/


All Articles