Skip to content

Commit 56c889e

Browse files
nofaralfasistejskalleos
authored andcommitted
Fix image-based provisioning on VMware
Add SecureBoot and VirtualTPM options for image-based provisioning on VMware
1 parent e3d3788 commit 56c889e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/fog/vsphere/requests/compute/vm_clone.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def vm_clone(options = {})
173173
device_change.concat(modify_template_volumes_specs(vm_mob_ref, options['volumes']))
174174
device_change.concat(add_new_volumes_specs(vm_mob_ref, options['volumes'])) unless options['storage_pod']
175175
end
176+
device_change << create_virtual_tpm if options['virtual_tpm'].present?
176177
virtual_machine_config_spec.deviceChange = device_change if device_change.any?
177178
# Options['numCPUs'] or Options['memoryMB']
178179
# Build up the specification for Hardware, for more details see ____________
@@ -216,7 +217,7 @@ def vm_clone(options = {})
216217
RbVmomi::VIM::VirtualMachineBootOptionsBootableFloppyDevice.new
217218
end
218219
end
219-
virtual_machine_config_spec.bootOptions = { bootOrder: boot_order }
220+
virtual_machine_config_spec.bootOptions = { bootOrder: boot_order, efiSecureBootEnabled: options["secure_boot"] || false }
220221
end
221222
# Options['customization_spec']
222223
# OLD Options still supported

0 commit comments

Comments
 (0)