mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #1096 from abbbi/handle_box_image
Fixes issue introduced with #1030
This commit is contained in:
@@ -80,14 +80,17 @@ module VagrantPlugins
|
|||||||
message << " in storage pool #{config.storage_pool_name}."
|
message << " in storage pool #{config.storage_pool_name}."
|
||||||
@logger.info(message)
|
@logger.info(message)
|
||||||
|
|
||||||
|
@storage_volume_uid = storage_uid env
|
||||||
|
@storage_volume_gid = storage_gid env
|
||||||
|
|
||||||
begin
|
begin
|
||||||
fog_volume = env[:machine].provider.driver.connection.volumes.create(
|
fog_volume = env[:machine].provider.driver.connection.volumes.create(
|
||||||
name: env[:box_volume_name],
|
name: env[:box_volume_name],
|
||||||
allocation: "#{box_image_size / 1024 / 1024}M",
|
allocation: "#{box_image_size / 1024 / 1024}M",
|
||||||
capacity: "#{box_virtual_size}G",
|
capacity: "#{box_virtual_size}G",
|
||||||
format_type: box_format,
|
format_type: box_format,
|
||||||
owner: storage_uid env,
|
owner: @storage_volume_uid,
|
||||||
group: storage_gid env,
|
group: @storage_volume_gid,
|
||||||
pool_name: config.storage_pool_name
|
pool_name: config.storage_pool_name
|
||||||
)
|
)
|
||||||
rescue Fog::Errors::Error => e
|
rescue Fog::Errors::Error => e
|
||||||
|
|||||||
Reference in New Issue
Block a user