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

Include Hyper-V secure boot template in box.xml
pull/9560/head
Megan Marsh 6 years ago committed by GitHub
commit c768c9bde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
{

Loading…
Cancel
Save