-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spread: add support to define a custom bios with the qemu backend #95
Conversation
For some tests it is important to customize the bios that qemu uses. One example is the Ubuntu Core 20 project. For the spread testing there we need a qemu that uses the OVMF uefi bios. The location of this bios is different on all distributions so defining it in the spread.yaml seems not appropriate.
@@ -118,6 +118,10 @@ func (p *qemuProvider) Allocate(ctx context.Context, system *System) (Server, er | |||
if os.Getenv("SPREAD_QEMU_GUI") != "1" { | |||
cmd.Args = append([]string{cmd.Args[0], "-nographic"}, cmd.Args[1:]...) | |||
} | |||
if biosPath := os.Getenv("SPREAD_QEMU_BIOS"); biosPath != "" { | |||
cmd.Args = append([]string{cmd.Args[0], "-bios", biosPath}, cmd.Args[1:]...) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to use -pflash
later when working with secure boot to be able to enroll our keys and certificates to our nvram file (which we'll also need to specify).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs-changes.
@@ -827,6 +827,10 @@ see the `-pass` command line option). | |||
The QEMU backend is run with the `-nographic` option by default. This | |||
may be changed with `export SPREAD_QEMU_GUI=1`. | |||
|
|||
The bios that qemu uses can be changed via the SPREAD_QEMU_BIOS | |||
environment variable. To switch to an UEFI bios on Ubuntu | |||
`export SPREAD_QEMU_BIOS=/usr/share/OVMF/OVMF_CODE.ms.fd` can be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be used as is because the bios location is a property of the host. But the images used can be both efi/non-efi and some efi images may need to be booted with a different efi bios. So one global options like this is not granular enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered adding an optional bios:
string for backends.systems
in spread.yaml
instead?
Closing this in favor of #116 |
For some tests it is important to customize the bios that qemu
uses. One example is the Ubuntu Core 20 project. For the spread
testing there we need a qemu that uses the OVMF uefi bios.
The location of this bios is different on all distributions so
defining it in the spread.yaml seems not appropriate.