Merge pull request #9759 from StefanScherer/wsl-remove-raise-vboxmanage-missing
Allow other providers in WSL
This commit is contained in:
commit
02b9d625d3
|
@ -844,10 +844,6 @@ module Vagrant
|
||||||
error_key(:vboxmanage_not_found_error)
|
error_key(:vboxmanage_not_found_error)
|
||||||
end
|
end
|
||||||
|
|
||||||
class VBoxManageNotFoundWSLError < VagrantError
|
|
||||||
error_key(:vboxmanage_not_found_wsl_error)
|
|
||||||
end
|
|
||||||
|
|
||||||
class VirtualBoxBrokenVersion040214 < VagrantError
|
class VirtualBoxBrokenVersion040214 < VagrantError
|
||||||
error_key(:virtualbox_broken_version_040214)
|
error_key(:virtualbox_broken_version_040214)
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,7 +74,18 @@ module VagrantPlugins
|
||||||
@logger.debug("Linux platform detected but executing within WSL. Locating VBoxManage.")
|
@logger.debug("Linux platform detected but executing within WSL. Locating VBoxManage.")
|
||||||
@vboxmanage_path = Vagrant::Util::Which.which("VBoxManage") || Vagrant::Util::Which.which("VBoxManage.exe")
|
@vboxmanage_path = Vagrant::Util::Which.which("VBoxManage") || Vagrant::Util::Which.which("VBoxManage.exe")
|
||||||
if !@vboxmanage_path
|
if !@vboxmanage_path
|
||||||
raise Vagrant::Errors::VBoxManageNotFoundWSLError
|
# If we still don't have one, try to find it using common locations
|
||||||
|
drive = "/mnt/c"
|
||||||
|
[
|
||||||
|
"#{drive}/Program Files/Oracle/VirtualBox",
|
||||||
|
"#{drive}/Program Files (x86)/Oracle/VirtualBox"
|
||||||
|
].each do |maybe|
|
||||||
|
path = File.join(maybe, "VBoxManage.exe")
|
||||||
|
if File.file?(path)
|
||||||
|
@vboxmanage_path = path
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1516,16 +1516,6 @@ en:
|
||||||
log out and log back in for the new environmental variables to take
|
log out and log back in for the new environmental variables to take
|
||||||
effect. If you're on Linux or Mac, verify your PATH contains the folder
|
effect. If you're on Linux or Mac, verify your PATH contains the folder
|
||||||
that has VBoxManage in it.
|
that has VBoxManage in it.
|
||||||
vboxmanage_not_found_wsl_error: |-
|
|
||||||
The "VBoxManage.exe" command or one of its dependencies could not
|
|
||||||
be found. Please verify VirtualBox is properly installed. You can verify
|
|
||||||
everything is okay by running "VBoxManage.exe --version" and verifying
|
|
||||||
that the VirtualBox version is outputted.
|
|
||||||
|
|
||||||
If you just installed VirtualBox, you have to log out and log back in for
|
|
||||||
the new environmental variables to take effect. Using the VirtualBox
|
|
||||||
provider within the WSL requires VirtualBox executables to be available
|
|
||||||
on the system PATH.
|
|
||||||
virtualbox_broken_version_040214: |-
|
virtualbox_broken_version_040214: |-
|
||||||
Vagrant detected you have VirtualBox 4.2.14 installed. VirtualBox
|
Vagrant detected you have VirtualBox 4.2.14 installed. VirtualBox
|
||||||
4.2.14 contains a critical bug which prevents it from working with
|
4.2.14 contains a critical bug which prevents it from working with
|
||||||
|
|
Loading…
Reference in New Issue