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

test: Check creating and booting an EFI guest #1619

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented May 7, 2024

Use our new "alpine-efi" bots image as guest.

This isn't very comprehensive yet, mostly to validate that the alpine-efi image works, and that c-machines/libvirt can actually boot an EFI guest. We may want to extend this to more tests in the future, so that we'll get better ARM coverage. But that at least sets a baseline.


Requires cockpit-project/bots#6351 . Also, the first image I tried this on was fedora-40, and it failed right away. Turns out it's drumroll SELinux, so this will need a naughty. That's added to the bots PR now.

martinpitt added a commit to martinpitt/bots that referenced this pull request May 7, 2024
cockpit-project/cockpit-machines#1619 introduces
a new test which is also broken by this SELinux TPM denial.
allisonkarlitskaya pushed a commit to cockpit-project/bots that referenced this pull request May 8, 2024
cockpit-project/cockpit-machines#1619 introduces
a new test which is also broken by this SELinux TPM denial.
@martinpitt
Copy link
Member Author

martinpitt commented May 10, 2024

Why am I not surprised.. It doesn't boot:

image

Booting with

virt-install -n a1 --memory 256 --import --disk /var/lib/libvirt/images/alpine-efi --os-variant alpinelinux3.8 --graphics vnc --boot uefi --wait 0

somewhat works -- it gets past EFI and grub, and now just hangs on an empty screen -- mostly because it's so achingly slow due to emulated QEMU. I'm afraid Alpine is too complex/big to be able to sensibly boot there.

But at least this gets way further than c-machines. So now to find out where the difference is..

One major one is --os-variant fedora28 (selecting q35) vs. --os-variant alpinelinux3.8 (selecting i440fx). But that gives an "Access denied", not a "Not found".

Use our new "alpine-efi" bots image as guest.

This isn't very comprehensive yet, mostly to validate that the
alpine-efi image works, and that c-machines/libvirt can *actually* boot
an EFI guest. We may want to extend this to more tests in the future, so
that we'll get better ARM coverage. But that at least sets a baseline.
@mvollmer
Copy link
Member

mvollmer commented May 13, 2024

The alpine-efi image is not a ISO and can't be put into a cdrom, I think, but that's what the test seems to do.

However, I have found no other way to boot the alpine-efi image with c-machines... "Cloud base image" with UEFI has the same behavior, and with BIOS it ends up in a 100% CPU loop. vm-run alpine-efi works fine.

@mvollmer
Copy link
Member

Alright, using a i440fx machine and using "alpine-efi" as a "Cloud base image" works.

I couldn't get to boot the official Alpine ISO with UEFI on neither q35 nor i440fx.. If that's what progress looks like, I don't want to be part of it...

@mvollmer
Copy link
Member

Alright, using a i440fx machine and using "alpine-efi" as a "Cloud base image" works.

I have pushed a commit that implements this in the test. The hardest part was to get the dialog to give us a i440fx machine...

@mvollmer
Copy link
Member

it gets past EFI and grub, and now just hangs on an empty screen

That is probably because the console is not on VNC but on ttyS0.

@martinpitt
Copy link
Member Author

@mvollmer Thanks for your investigations! TBH I'm not really that much interested in continuing to work on this -- it was a half-hearted attempt towards https://issues.redhat.com/browse/COCKPIT-970 , but this needs a lot more libvirt/qemu/images understanding and work than I currently have..

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

Successfully merging this pull request may close these issues.

None yet

2 participants