Sha256: 2e1f3af0da33fbfa61e0c307a8bfe42119762d44b596d2b1c1185c143abb979d
Contents?: true
Size: 938 Bytes
Versions: 29
Compression:
Stored size: 938 Bytes
Contents
module Vagrant class Action module VM class Import def initialize(app, env) @app = app end def call(env) env.ui.info I18n.t("vagrant.actions.vm.import.importing", :name => env.env.box.name) # Import the virtual machine env.env.vm.vm = VirtualBox::VM.import(env.env.box.ovf_file.to_s) do |progress| env.ui.report_progress(progress.percent, 100, false) end # Flag as erroneous and return if import failed raise Errors::VMImportFailure if !env["vm"].vm # Import completed successfully. Continue the chain @app.call(env) end def recover(env) if env["vm"].created? return if env["vagrant.error"].is_a?(Errors::VagrantError) # Interrupted, destroy the VM env["actions"].run(:destroy) end end end end end end
Version data entries
29 entries across 29 versions & 4 rubygems