Class: Vagrant::Actions::VM::Import

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant/actions/vm/import.rb

Instance Attribute Summary

Attributes inherited from Base

#runner

Instance Method Summary collapse

Methods inherited from Base

#cleanup, #follows, #initialize, #precedes, #prepare, #rescue

Methods included from Util

#error_and_exit, included, #logger, #wrap_output

Constructor Details

This class inherits a constructor from Vagrant::Actions::Base

Instance Method Details

#execute!Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/vagrant/actions/vm/import.rb', line 5

def execute!
  @runner.invoke_around_callback(:import) do
    Busy.busy do
      logger.info "Importing base VM (#{@runner.env.box.ovf_file})..."
      # Use the first argument passed to the action
      @runner.vm = VirtualBox::VM.import(@runner.env.box.ovf_file)
      raise ActionException.new(:virtualbox_import_failure) unless @runner.vm
    end
  end
end