diff --git a/lib/vagrant-libvirt/action/handle_box_image.rb b/lib/vagrant-libvirt/action/handle_box_image.rb index 2db7718..e3d6511 100644 --- a/lib/vagrant-libvirt/action/handle_box_image.rb +++ b/lib/vagrant-libvirt/action/handle_box_image.rb @@ -67,7 +67,9 @@ module VagrantPlugins env[:ui].info(I18n.t('vagrant_libvirt.uploading_volume')) # Create new volume in storage pool - raise Errors::BoxNotFound if !File.exists?(box_image_file) + unless File.exists?(box_image_file) + raise Vagrant::Errors::BoxNotFound.new(name: env[:machine].box.name) + end box_image_size = File.size(box_image_file) # B message = "Creating volume #{env[:box_volume_name]}" message << " in storage pool #{config.storage_pool_name}."