diff --git a/lib/vagrant/command/suspend.rb b/lib/vagrant/command/suspend.rb new file mode 100644 index 000000000..7f46535ce --- /dev/null +++ b/lib/vagrant/command/suspend.rb @@ -0,0 +1,18 @@ +module Vagrant + module Command + class SuspendCommand < NamedBase + desc "Suspend a running Vagrant environment." + register "suspend" + + def execute + target_vms.each do |vm| + if vm.created? + vm.suspend + else + vm.env.ui.info "VM not created. Moving on..." + end + end + end + end + end +end