Skip to content

Add QEMU on Windows to CI #3475

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

arixmkii
Copy link
Contributor

@arixmkii arixmkii commented Apr 26, 2025

For now it will use additional templates, because of incompatible mounts.

This is probably not for 1.1.0.

It is possible to use default.yaml for Windows with changes from #3318 (this would need rebase first, but I checked it using a rebased patch in a forked repo - example run https://github.com/arixmkii/qcw/actions/runs/14681726480/job/41205771124).

@arixmkii
Copy link
Contributor Author

arixmkii commented Apr 26, 2025

time="2025-04-26T17:20:45Z" level=fatal msg="failed to validate YAML file "C:\\a\\lima\\lima\\templates\\experimental\\default-windows.yaml": can't parse builtin Lima version "cfbffd8": cfbffd8 is not in dotted-tri format"

make/git on Windows incorrectly resolve version. I will check it (no such issues, when checkout and build are done with msys2 tools). fixed

Another topic to check - use chocolatey to install QEMU, because msys2 QEMU installation feels slow.

@arixmkii arixmkii marked this pull request as draft April 26, 2025 17:23
@arixmkii
Copy link
Contributor Author

Probably would need to move mounts-windows under _default to not fail validation script.

@arixmkii arixmkii mentioned this pull request Apr 26, 2025
For now it will use additional templates, because of incompatible mounts.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
@arixmkii
Copy link
Contributor Author

Chocolatey QEMU package is not well maintained, so, I chose winget instead, which is a great alternative. There is a known limitation that it is not available out of the box in Windows Server 2022, so, there is a hacky action to add it, which is now archived and will not be needed at all after migration to Windows Server 2025, this is highlighted by the comment.

@arixmkii arixmkii marked this pull request as ready for review April 28, 2025 18:23
@arixmkii
Copy link
Contributor Author

@jandubois @AkihiroSuda I would like to know your opinions on how reasonable is it to extend CI to support this (to not overload CI and not increase costs significantly). From my side there is no rush and I can see reasons to postpone this until #3316 is addressed (via #3318 refresh or other means). Also it might be reasonable to wait for migration to WinServer 2025 to not use now archived https://github.com/Cyberboss/install-winget action.

I authored it now to have proof of concept confirmed and potentially creating reference starting point for its introduction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to merge the template to default?

If it is still difficult, can we use base: template://default for deduplication?

Copy link
Member

@jandubois jandubois Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide that #3318 is acceptable, then the regular template://default will just work on Windows (I think). Well, all the templates should work then, as the default mount points have been factored out now.

- name: Make
run: make
- name: Install winget
# TODO remove this step for Windows Server 2025 based runners
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just created a new runner type for this, so we can try it out:

CleanShot 2025-04-30 at 15 12 54@2x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we actually need 8 cores? Or maybe we just start with a larger runner, and try later to see how much worse it becomes to run on a standard runner?

The 4-core runner is also limited to 16GB. That is plenty on macOS; not sure what is needed on Windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to create a custom runner?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it becomes available in our org? Somebody must have created the windows-2022-8-cores runner too, as it is also a custom entry for the lima-vm org (I don't think it was me). CNCF has only created custom Linux runners:

CleanShot 2025-05-01 at 10 48 15@2x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC I had to create it perhaps for nested virt at that time?
Probably it should just work with the standard runner now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About Ubuntu and Windows larger runners:

Larger runners with Ubuntu or Windows operating systems are configured in your organization or enterprise.

About macOS larger runners:

No additional configuration is required.

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

Successfully merging this pull request may close these issues.

3 participants