Sha256: b7fd3ca974a27213dddf3ef066fbb53e0ca1b6b446dd627e13758cb74129e5fe

Contents?: true

Size: 482 Bytes

Versions: 29

Compression:

Stored size: 482 Bytes

Contents

module Veewee
  module Provider
    module Virtualbox
      module BoxCommand

        def poweroff(options={})
          # If the vm is not powered off, perform a shutdown
          if (self.exists? && self.running?)
            ui.info "Shutting down vm #{name}"
            #We force it here, maybe vm.shutdown is cleaner
            command="#{@vboxcmd} controlvm \"#{name}\" poweroff"
            shell_exec("#{command}")
          end
        end

      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.5.0.alpha3 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.5.0.alpha2 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.5.0.alpha1 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.5.1 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.5 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.5.pre1 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.4 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.3 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.2 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.1 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.4.0 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.12 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.11 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.10 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.9 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-atlassian-0.3.11 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.7 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.6 lib/veewee/provider/virtualbox/box/poweroff.rb
veewee-0.3.5 lib/veewee/provider/virtualbox/box/poweroff.rb