diff --git a/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb b/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb index 56046ba9..d107757a 100644 --- a/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb +++ b/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb @@ -118,7 +118,8 @@ def unpack_image(tmp_dir, image_path) def self.normalize_image_properties(properties) image_properties = {} image_options = %w[version os_type os_distro architecture auto_disk_config - hw_vif_model hypervisor_type vmware_adaptertype vmware_disktype + hw_vif_model hw_disk_bus_model hw_scsi_model hw_disk_bus + hypervisor_type vmware_adaptertype vmware_disktype vmware_linked_clone vmware_ostype] image_options.reject { |image_option| properties[property_option_for_image_option(image_option)].nil? }.each do |image_option| image_properties[image_option.to_sym] = properties[property_option_for_image_option(image_option)].to_s diff --git a/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb b/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb index d8d3cc44..80662a85 100644 --- a/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb +++ b/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb @@ -18,6 +18,20 @@ expect(subject.normalize_image_properties(properties)).to have_key(:version) end + it 'supports virtio-scsi properties' do + properties = { + 'hw_disk_bus_model' => 'virtio-scsi', + 'hw_scsi_model' => 'virtio-scsi', + 'hw_disk_bus' => 'scsi', + } + + expect(subject.normalize_image_properties(properties)).to include( + :hw_disk_bus_model, + :hw_scsi_model, + :hw_disk_bus, + ) + end + it 'maps hypervisor key to hypervisor_type' do properties = { 'hypervisor' => 'kvm',