Hello,
I’m using automate with a service dialog to allow users to provision new VMs. One of the dialog options lets users add additional disks, however I can’t figure out how to force these to be thin provisioned (vmware) within automate.
I’m adding the disks in the ‘VM / Provisioning / StateMachines / Methods / vmware_CustomizeRequest’ method by passing an array:
data_disks << {
:bus => scsi_bus,
:pos => i+1,
:sizeInMB => disk_size,
}
into the provisioning object:
prov.set_option(:disk_scsi, data_disks) unless data_disks.blank?
I’ve tried setting the default on the dialog to thin, and I’ve verified this is set by debugging with object_walker:
| $evm.root['miq_provision'] => #<MiqAeMethodService::MiqAeServiceManageIQ_Providers_Vmware_InfraManager_Provision:0x0000000015509b40>
...
| | $evm.root['miq_provision'].options[:disk_format] = ["thin", "Thin"] (type: Array)
| | $evm.root['miq_provision'].options[:disk_scsi] = [{:bus=>0, :pos=>2, :sizeInMB=>10240}] (type: Array)
...
But the additional disks are always provisioned thick.
Does anybody know a way to set the provisioning type of disks added in this way? Or is there another way to add disks during the provisioning workflow? Ideally, I’d like quotas and approval to still work.