Hello, I hope somebody could help me on how to determine EFI boot order using PowerCLI or SDK.
For testing I've created new VM, changed default firmware type from BIOS to EFI for new linux VM, this in turn resulted in using GPT instead of MBR and creation of EFI partition during os setup. From the linux guest I could clearly see what is happening during the boot:
root@debian:~# efibootmgr -v
BootOrder: 0005,0000,0001,0002,0003,0004
Boot0000* EFI Virtual disk (0.0) ACPI(a0341d0,0)PCI(10,0)SCSI(0,0)
Boot0001* EFI Floppy ACPI(a0341d0,0)PCI(7,0)ACPI(60441d0,0)
Boot0002* EFI VMware Virtual IDE CDROM Drive (IDE 1:0) ACPI(a0341d0,0)PCI(7,1)ATAPI(1,0,0)
Boot0003* EFI Network ACPI(a0341d0,0)PCI(15,0)PCI(0,0)MAC(000c299be280,1)
Boot0004* EFI Internal Shell (Unsupported option) MM(b,3efce000,3f357fff)
Boot0005* debian HD(1,800,2f000,7d85c048-b826-4f18-a3ce-9aeac8860e3c)File(\EFI\debian\grubx64.efi)
Clearly It will launch grubx64.efi during startup.
So, the problem is how to determine this from host. For now the only visible thing for me is
PowerCLI C:\> (get-view (Get-VM -Name "debian efi").ID).Config.firmware
PowerCLI C:\> (get-view (Get-VM -Name "debian efi").ID).Config.BootOptions
Perhaps I've overlooked something, but as seems I can't find a way to determine the bootorder. I've also checked SDK docs, and can't find this too.
Anyone has a solution? Or it's just not implented and the only way is to analyze nvram file.
Thanks in advance for the comments/ideas.