VM: vm-8.efi-boot-types

Information

Virtual machines must prevent booting from unauthorized sources. Unauthorized access to a virtual machine may occur when its primary boot volume is unavailable, and the EFI firmware seeks alternative boot sources, such as network boot. This can be mitigated through network controls, as well as with the advanced parameters bios.bootDeviceClasses, bios.bootOrder, and bios.hddOrder. bios.bootDeviceClasses has the format "allow:XXXX" or "deny:XXXX" where XXXX is a comma-delimited list of boot classes. Boot classes are net (network PXE boot), usb (from attached USB devices), pcmcia (PCMCIA expansion cards, not used nowadays), cd (from attached virtual CD/DVD devices), hd (from attached virtual hard disks), fd (from attached virtual floppy devices), reserved (from unknown devices), efishell (into the EFI shell), all, or any (same as all). Use of allow or deny also implicitly states the opposite. For example, deny:all disallows all boot, deny:net disallows network boot but allows all others, allow:hd allows only hd boot denies all others, allow:hd,cd allows hd then cd device boot and denies all others. New virtual machines may require CD/DVD boot, and some dynamic environments, such as labs, may use network boot, and those environments should be set accordingly and have the rationale documented.

Solution

Get-VM -Name $VM | Get-AdvancedSetting bios.bootDeviceClasses | Set-AdvancedSetting -Value "allow:hd"

See Also

https://github.com/vmware/vcf-security-and-compliance-guidelines/raw/refs/heads/main/security-configuration-hardening-guide/vsphere/8.0/