Sha256: 945b7c96e0a03e36c39849fbe35af3f9b6cd8bef4710d002ec0908c135598888

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 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?)
            env.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

1 entries across 1 versions & 1 rubygems

Version Path
veewee-0.3.0.alpha5 lib/veewee/provider/virtualbox/box/poweroff.rb