Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Dec 19, 2019

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.

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:]...)
}
Copy link
Collaborator

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).

@mvo5 mvo5 added the Critical label Mar 3, 2020
Copy link
Contributor Author

@mvo5 mvo5 left a 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.
Copy link
Contributor Author

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.

Copy link
Member

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?

@mvo5 mvo5 added the Blocked Waiting for something external label Mar 3, 2020
@mvo5
Copy link
Contributor Author

mvo5 commented Jun 21, 2021

Closing this in favor of #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Waiting for something external
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants