Class: VagrantPlugins::ProviderLocal::Command::RestartGuest
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderLocal::Command::RestartGuest
- Defined in:
- lib/vagrant-local/command/restart_guest.rb
Overview
This is used to restart the guest from inside the guest
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-local/command/restart_guest.rb', line 8 def execute opts = OptionParser.new do |o| o. = 'Usage: vagrant local control restart [options]' end argv = (opts) return unless argv unless argv.empty? @env.ui.info(opts.help) return end ## Wait for VM up with_target_vms(argv, provider: :local) do |machine| machine.action('restart') end end |