VM import now reports import progress!

This commit is contained in:
Mitchell Hashimoto 2010-04-08 12:53:23 -07:00
parent 00cf000189
commit 945cc6af32
1 changed files with 8 additions and 1 deletions

View File

@ -2,12 +2,19 @@ module Vagrant
module Actions module Actions
module VM module VM
class Import < Base class Import < Base
include Util::ProgressMeter
def execute! def execute!
@runner.invoke_around_callback(:import) do @runner.invoke_around_callback(:import) do
Busy.busy do Busy.busy do
logger.info "Importing base VM (#{@runner.env.box.ovf_file})..." logger.info "Importing base VM (#{@runner.env.box.ovf_file})..."
# Use the first argument passed to the action # Use the first argument passed to the action
@runner.vm = VirtualBox::VM.import(@runner.env.box.ovf_file) @runner.vm = VirtualBox::VM.import(@runner.env.box.ovf_file) do |progress|
update_progress(progress, 100)
end
complete_progress
raise ActionException.new(:virtualbox_import_failure) unless @runner.vm raise ActionException.new(:virtualbox_import_failure) unless @runner.vm
end end
end end