diff --git a/plugins/providers/virtualbox/driver/version_4_1.rb b/plugins/providers/virtualbox/driver/version_4_1.rb index 3ec3c0ee9..79f4174ad 100644 --- a/plugins/providers/virtualbox/driver/version_4_1.rb +++ b/plugins/providers/virtualbox/driver/version_4_1.rb @@ -661,9 +661,9 @@ module VagrantPlugins result = raw("showvminfo", uuid) return true if result.exit_code == 0 - # GH-2479: Sometimes this happens. In this case, retry. If - # we don't see this text, the VM really probably doesn't exist. - return false if !result.stderr.include?("CO_E_SERVER_EXEC_FAILURE") + # If vboxmanage returned VBOX_E_OBJECT_NOT_FOUND, + # then the vm truly does not exist. Any other error might be transient + return false if result.stderr.include?("VBOX_E_OBJECT_NOT_FOUND") # Sleep a bit though to give VirtualBox time to fix itself sleep 2 diff --git a/plugins/providers/virtualbox/driver/version_4_2.rb b/plugins/providers/virtualbox/driver/version_4_2.rb index a0a18d98d..a50096022 100644 --- a/plugins/providers/virtualbox/driver/version_4_2.rb +++ b/plugins/providers/virtualbox/driver/version_4_2.rb @@ -594,9 +594,9 @@ module VagrantPlugins result = raw("showvminfo", uuid) return true if result.exit_code == 0 - # GH-2479: Sometimes this happens. In this case, retry. If - # we don't see this text, the VM really probably doesn't exist. - return false if !result.stderr.include?("CO_E_SERVER_EXEC_FAILURE") + # If vboxmanage returned VBOX_E_OBJECT_NOT_FOUND, + # then the vm truly does not exist. Any other error might be transient + return false if result.stderr.include?("VBOX_E_OBJECT_NOT_FOUND") # Sleep a bit though to give VirtualBox time to fix itself sleep 2 diff --git a/plugins/providers/virtualbox/driver/version_4_3.rb b/plugins/providers/virtualbox/driver/version_4_3.rb index 66c06f93f..a2db97d50 100644 --- a/plugins/providers/virtualbox/driver/version_4_3.rb +++ b/plugins/providers/virtualbox/driver/version_4_3.rb @@ -701,9 +701,9 @@ module VagrantPlugins result = raw("showvminfo", uuid) return true if result.exit_code == 0 - # GH-2479: Sometimes this happens. In this case, retry. If - # we don't see this text, the VM really probably doesn't exist. - return false if !result.stderr.include?("CO_E_SERVER_EXEC_FAILURE") + # If vboxmanage returned VBOX_E_OBJECT_NOT_FOUND, + # then the vm truly does not exist. Any other error might be transient + return false if result.stderr.include?("VBOX_E_OBJECT_NOT_FOUND") # Sleep a bit though to give VirtualBox time to fix itself sleep 2 diff --git a/plugins/providers/virtualbox/driver/version_5_0.rb b/plugins/providers/virtualbox/driver/version_5_0.rb index 961f5ad55..f8a49eb51 100644 --- a/plugins/providers/virtualbox/driver/version_5_0.rb +++ b/plugins/providers/virtualbox/driver/version_5_0.rb @@ -702,9 +702,9 @@ module VagrantPlugins result = raw("showvminfo", uuid) return true if result.exit_code == 0 - # GH-2479: Sometimes this happens. In this case, retry. If - # we don't see this text, the VM really probably doesn't exist. - return false if !result.stderr.include?("CO_E_SERVER_EXEC_FAILURE") + # If vboxmanage returned VBOX_E_OBJECT_NOT_FOUND, + # then the vm truly does not exist. Any other error might be transient + return false if result.stderr.include?("VBOX_E_OBJECT_NOT_FOUND") # Sleep a bit though to give VirtualBox time to fix itself sleep 2