Merge pull request #9552 from sw-fastec/hyper-v-secure-boot-template

Include Hyper-V secure boot template in box.xml
This commit is contained in:
Megan Marsh 2020-07-09 14:02:06 -07:00 committed by GitHub
commit c768c9bde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -775,6 +775,7 @@ if (Test-Path -Path ([IO.Path]::Combine($path, $vmName, 'Virtual Machines', '*.V
<device0 type="string">Optical</device0>
</boot>
<secure_boot_enabled type="bool">False</secure_boot_enabled>
<secure_boot_template type="string">MicrosoftWindows</secure_boot_template>
<notes type="string">$($vm.Notes)</notes>
<vm-controllers/>
</configuration>
@ -795,6 +796,7 @@ if (Test-Path -Path ([IO.Path]::Combine($path, $vmName, 'Virtual Machines', '*.V
if ((Hyper-V\Get-VMFirmware -VM $vm).SecureBoot -eq [Microsoft.HyperV.PowerShell.OnOffState]::On)
{
$config.configuration.secure_boot_enabled.'#text' = 'True'
$config.configuration.secure_boot_template.'#text' = (Hyper-V\Get-VMFirmware -VM $vm).SecureBootTemplate
}
else
{