diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 3c320747d..eff6c4c3a 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -37,6 +37,8 @@ module Vagrant error_and_exit(:virtualbox_not_detected) elsif version.to_f < 3.1 error_and_exit(:virtualbox_invalid_version, :version => version.to_s) + elsif version.to_s.downcase.include?("ose") + error_and_exit(:virtualbox_invalid_ose, :version => version.to_s) end end end diff --git a/templates/errors.yml b/templates/errors.yml index c12d23260..ce08b9671 100644 --- a/templates/errors.yml +++ b/templates/errors.yml @@ -118,6 +118,11 @@ Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed. If VirtualBox is installed, it may be an incorrect version. Vagrant currently only supports VirtualBox 3.1.x. Please install the proper version to continue. +:virtualbox_invalid_ose: |- + Vagrant has detected you're using an OSE ("Open Source Edition") of VirtualBox. + Vagrant currently doesn't support any of the OSE editions due to slight API + differences. Please download the regular package from virtualbox.org and install + to continue. :vm_failed_to_boot: |- Failed to connect to VM! Failed to boot? :vm_base_not_found: |- diff --git a/test/vagrant/environment_test.rb b/test/vagrant/environment_test.rb index 68fbee62c..5a1c18ec5 100644 --- a/test/vagrant/environment_test.rb +++ b/test/vagrant/environment_test.rb @@ -24,6 +24,13 @@ class EnvironmentTest < Test::Unit::TestCase VirtualBox.expects(:version).returns(version) Vagrant::Environment.check_virtualbox! end + + should "error and exit for OSE VirtualBox" do + version = "3.1.6_OSE" + Vagrant::Environment.expects(:error_and_exit).with(:virtualbox_invalid_ose, :version => version.to_s).once + VirtualBox.expects(:version).returns(version) + Vagrant::Environment.check_virtualbox! + end end context "class method load!" do