From 7f736f934c1ecb8a69aa209a7339ca6147b48ca8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 13 Mar 2013 21:39:05 -0700 Subject: [PATCH] Improve VBox kernel module detection for Gentoo [GH-710] --- CHANGELOG.md | 2 ++ plugins/providers/virtualbox/driver/meta.rb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 560689302..c994a3e82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ IMPROVEMENTS / BUG FIXES: - Improve the SSH "ready?" check by more gracefully handling timeouts. [GH-841] - Human friendly error if connection times out for HTTP downloads. [GH-849] - Detect when the VirtualBox installation is incomplete and error. [GH-846] + - Detect when kernel modules for VirtualBox need to be installed on Gentoo + systems and report a user-friendly error. [GH-710] - All `vagrant` commands that can take a target VM name can take one even if you're not in a multi-VM environment. [GH-894] - Hostname is set before networks are setup to avoid very slow `sudo` diff --git a/plugins/providers/virtualbox/driver/meta.rb b/plugins/providers/virtualbox/driver/meta.rb index 8cf05365d..8c8bc234c 100644 --- a/plugins/providers/virtualbox/driver/meta.rb +++ b/plugins/providers/virtualbox/driver/meta.rb @@ -121,7 +121,8 @@ module VagrantPlugins # Note: We split this into multiple lines because apparently "".split("_") # is [], so we have to check for an empty array in between. output = execute("--version") - if output =~ /vboxdrv kernel module is not loaded/ + if output =~ /vboxdrv kernel module is not loaded/ || + output =~ /VirtualBox kernel modules are not loaded/i raise Vagrant::Errors::VirtualBoxKernelModuleNotLoaded elsif output =~ /Please install/ # Check for installation incomplete warnings, for example: