From 945cc6af32256a8b160c53876d9f673818f491f7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 8 Apr 2010 12:53:23 -0700 Subject: [PATCH] VM import now reports import progress! --- lib/vagrant/actions/vm/import.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/actions/vm/import.rb b/lib/vagrant/actions/vm/import.rb index 9a0c11ce9..ff96fafff 100644 --- a/lib/vagrant/actions/vm/import.rb +++ b/lib/vagrant/actions/vm/import.rb @@ -2,12 +2,19 @@ module Vagrant module Actions module VM class Import < Base + include Util::ProgressMeter + 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) + @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 end end