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

switch xen to PVH mode #1879

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

switch xen to PVH mode #1879

wants to merge 5 commits into from

Conversation

jepio
Copy link
Member

@jepio jepio commented Apr 11, 2024

switch xen to PVH mode

zstd compressed kernels in Xen are only supported when the host provides the kernel or using grub-xen-pvh. The previous configuration using pvgrub(2) didn't work at all. To make it work again, switch to grub-xen-pvh. Flatcar now only supports booting with pvh or hvm mode. I also added an hvm config for quick usage.

How to use

./build_image
./img_to_vm.sh --format=xen
xl create -c flatcar_production_xen_pvgrub.cfg
# or
xl create -c flatcar_production_xen_pvgrub.cfg

Testing done

Tested the steps above on a Debian 12 dom0.

[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Simple stuff, setting console to hvc0 and enabling autologin.

Signed-off-by: Jeremi Piotrowski <[email protected]>
Our Xen configs don't currently work because xen grub uses a special
code path in grub that does not support zstd compressed kernels. We
switched kernel compression to zstd two years ago. The only grub xen
config that supports this is xen-pvh. Switch our grub xen to the pvh and
adapt configs to run domU in PVH mode.

With this change the pygrub config works.

Signed-off-by: Jeremi Piotrowski <[email protected]>
In PVH mode grub can't be chainloaded from grub, so we either need to
use pygrub or the host provided grub needs to support Flatcar specifics.
Publish our xen-pvh grub along with the image and use it from the pvgrub
config.

Signed-off-by: Jeremi Piotrowski <[email protected]>
For completeness.

Signed-off-by: Jeremi Piotrowski <[email protected]>
Signed-off-by: Jeremi Piotrowski <[email protected]>
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.

1 participant