From 4d03a7359e8b9871579a8801215bc7ed1454f334 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Sep 2013 17:52:36 -0700 Subject: [PATCH] guests/linux: fail after a number of attempts --- plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb b/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb index c547c680b..228fa64ee 100644 --- a/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +++ b/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb @@ -40,7 +40,11 @@ module VagrantPlugins break if success attempts += 1 - raise Vagrant::Errors::LinuxMountFailed, :command => mount_commands.join("\n") + if attempts > 10 + raise Vagrant::Errors::LinuxMountFailed, + command: mount_commands.join("\n") + end + sleep 2 end