Yes, you can specify Boot Options: EFI and enable Secure boot when creating a VM in the API using the following steps:
- Create a JSON object that defines the VM configuration:
{
"name": "my-vm",
"guestId": "centos7",
"bootOptions": {
"firmware": "efi",
"secureBoot": true
}
}
- Use the VMware vSphere API to create the VM:
- The vSphere API will create the VM and configure it to boot in EFI mode with Secure boot enabled.