Skip to content

Commit

Permalink
fix: enable secure boot
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
FrankYang0529 committed Mar 8, 2024
1 parent e1d1d66 commit bc79740
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions harvester/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ func (d *Driver) Create() error {
vm.APIVersion = kubevirtv1.GroupVersion.String()

if d.EnableEFI {
if vm.Spec.Template.Spec.Domain.Features == nil {
vm.Spec.Template.Spec.Domain.Features = &kubevirtv1.Features{}
}
v := d.EnableSecureBoot
vm.Spec.Template.Spec.Domain.Features.SMM = &kubevirtv1.FeatureState{Enabled: &v}
vm.Spec.Template.Spec.Domain.Firmware = &kubevirtv1.Firmware{Bootloader: &kubevirtv1.Bootloader{EFI: &kubevirtv1.EFI{SecureBoot: &v}}}
}
createdVM, err := d.createVM(vm)
Expand Down

0 comments on commit bc79740

Please sign in to comment.