Skip to content

Commit

Permalink
launch: specify the ovmf code bootkit provided
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <[email protected]>
  • Loading branch information
hallyn committed Oct 18, 2023
1 parent f882671 commit 0800af7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/provider/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const KVMTemplate = `
config:
name: %s
uefi: true
uefi-code: /usr/share/OVMF/OVMF_CODE.secboot.fd
uefi-code: %s
uefi-vars: %s
cdrom: %s
boot: cdrom
Expand Down Expand Up @@ -132,8 +132,9 @@ func (p KVMProvider) New(mname, keyproject, UUID string) (Machine, error) {
// that's worth it.
provisionISO := filepath.Join(keysetDir, "artifacts", "provision.iso")
uefiVars := filepath.Join(keysetDir, "bootkit", "ovmf-vars.fd")
mData := fmt.Sprintf(KVMTemplate, m.Name, m.Name, uefiVars, provisionISO,
qcowPath, sudiPath)
uefiCode := filepath.Join(keysetDir, "bootkit", "ovmf", "ovmf-code.fd")
mData := fmt.Sprintf(KVMTemplate, m.Name, m.Name, uefiCode, uefiVars,
provisionISO, qcowPath, sudiPath)
stdout, stderr, err := utils.RunWithStdall(mData, "machine", "init", m.Name)
if err != nil {
return m, errors.Wrapf(err, "Failed initializing machine %q with data:%q\nOutput: %q\n%q\n", m.Name, mData, stdout, stderr)
Expand Down

0 comments on commit 0800af7

Please sign in to comment.