From ad5873d330ef42d5d40409d9d627beb2c0762894 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 29 Apr 2013 10:11:20 -0700 Subject: [PATCH] More robust VBoxManage error checking. [GH-1669] --- CHANGELOG.md | 3 +++ plugins/providers/virtualbox/driver/base.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5cc22596..4cf836e18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## 1.2.3 (unreleased) +IMPROVEMENTS: + - Better VBoxManage error detection on Windows systems. This avoids + some major issues where Vagrant would sometimes "lose" your VM. [GH-1669] ## 1.2.2 (April 23, 2013) diff --git a/plugins/providers/virtualbox/driver/base.rb b/plugins/providers/virtualbox/driver/base.rb index 8ec8ed194..e9267fa18 100644 --- a/plugins/providers/virtualbox/driver/base.rb +++ b/plugins/providers/virtualbox/driver/base.rb @@ -303,7 +303,7 @@ module VagrantPlugins # Sometimes, VBoxManage fails but doesn't actual return a non-zero # exit code. For this we inspect the output and determine if an error # occurred. - if r.stderr =~ /VBoxManage: error:/ + if r.stderr =~ /VBoxManage([.a-z]+?): error:/ @logger.info("VBoxManage error text found, assuming error.") errored = true end