Fog gem was missing functionality, wherein volume_size was not being passed to the API in the fog gem. As a result, CloudForms could not provision and boot a VM via volume in OpenStack.
The required functionality has been added to the Fog gem. CloudForms can now provision and boot a VM via volume in OpenStack.
I copied the openstack_preprovision method in the automate explorer under ManageIQ domain / Cloud / VM / Provisioning / StateMachines / Methods and added the following option to provision a existing image and attach a extra volume to it with a specified size. It did honor the size, created a vm, created a volume with the size specified, and attached it to the instance. Success \o/
prov = $evm.root['miq_provision']
prov.set_option(
:clone_options, {
:image_ref => nil,
:block_device_mapping_v2 => [{
:boot_index => 0,
:uuid => "c269b145-6b70-4793-a797-5a4eaceec08b",
:device_name => "vda",
:source_type => "image",
:destination_type => "volume",
:volume_size => 3,
:delete_on_termination => false
}]
}
)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-0261.html
I copied the openstack_preprovision method in the automate explorer under ManageIQ domain / Cloud / VM / Provisioning / StateMachines / Methods and added the following option to provision a existing image and attach a extra volume to it with a specified size. It did honor the size, created a vm, created a volume with the size specified, and attached it to the instance. Success \o/ prov = $evm.root['miq_provision'] prov.set_option( :clone_options, { :image_ref => nil, :block_device_mapping_v2 => [{ :boot_index => 0, :uuid => "c269b145-6b70-4793-a797-5a4eaceec08b", :device_name => "vda", :source_type => "image", :destination_type => "volume", :volume_size => 3, :delete_on_termination => false }] } )