diff --git a/lib/vagrant/commands/status.rb b/lib/vagrant/commands/status.rb index e5480ea42..adfafaf3c 100644 --- a/lib/vagrant/commands/status.rb +++ b/lib/vagrant/commands/status.rb @@ -46,7 +46,7 @@ module Vagrant else # Try to get the vm based on the name. If the specified VM # doesn't exist, then error saying so - vm = env.vms[vm.to_sym] + vm = env.vms[vm.to_sym] || error_and_exit(:unknown_vm, :vm => vm) end show_single(vm) diff --git a/templates/strings.yml b/templates/strings.yml index 1f1450582..b8025edec 100644 --- a/templates/strings.yml +++ b/templates/strings.yml @@ -154,6 +154,8 @@ :system_unspecified: |- A VM system type must be specified! This is done via the `config.vm.system` configuration value. Please read the documentation online for more information. +:unknown_vm: |- + The specified VM could not be found: <%= vm %> :virtualbox_import_failure: |- The VM import failed! Try running `VBoxManage import` on the box file manually for more verbose error output.