VMware Cloud Community
defiantbp
Contributor
Contributor

no compatible bootloader found

trying to build a VM to deploy Win11 to, it builds the VM fine but upon starting it, I get "no compatible bootloader found"

This is for windows 11, so involves TPM, securebooot, and EFI as well.  When building the VM from GUI, it seems to work fine, but am trying to use powershell.  Any help would be greatly appreciated.  I am wondering if I am missing an option or an setting.

$Name = "Win11-builder"
$vmHost = "vmHost"
$dStore = "Datastore"
$pg = "PortGroup"
$isoPath = '[thisDtastore] Win11iso/Win11_English_x64v1.iso'

$myTargetVMHost = Get-VMHost -Name $vmHost -Server $ipc

$policy = Get-SpbmStoragePolicy 'VM Encryption Policy' -Server $ipc
New-VM -Name $Name -ResourcePool $myTargetVMHost -Datastore $dStore -NumCPU 2 -MemoryGB 8 -DiskGB 120 -Portgroup $pg -CD -StoragePolicy $policy -SkipHardDisks -RunAsync
sleep 2
get-vm $Name | New-VTpm

$vm = get-vm $Name
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.Firmware = [VMware.Vim.GuestOsDescriptorFirmwareType]::efi
$spec.NestedHVEnabled = $true
$boot = New-Object VMware.Vim.VirtualMachineBootOptions
$boot.EfiSecureBootEnabled = $true
$spec.BootOptions = $boot
$flags = New-Object VMware.Vim.VirtualMachineFlagInfo
$flags.VbsEnabled = $true
$flags.VvtdEnabled = $true
$spec.flags = $flags
$vm.ExtensionData.ReconfigVM($spec)
#>
start-vm $Name
sleep 2
$cd = Get-VM -Name $Name | Get-CDDrive| Set-CDDrive -Connected $true -IsoPath $isoPath -StartConnected $true -Confirm:$false

0 Kudos
2 Replies
LucD
Leadership
Leadership

I would suggest using Code Capture when building such a VM from the Web CLient.
The generated code should show you which settings are required.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
defiantbp
Contributor
Contributor

Thanks so much for getting back so quickly.  I am going to go try that now, never used before, I am a bit of a vcenter newbie.  Will let you know the results.  🙂

0 Kudos