Skip to content

Commit

Permalink
Add QEMU integration test for Lima
Browse files Browse the repository at this point in the history
  • Loading branch information
arixmkii committed Feb 9, 2025
1 parent 115518d commit dd5bfd4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/prepare-lima-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
msystem: UCRT64
update: true
install: >-
make git unzip base-devel mingw-w64-ucrt-x86_64-toolchain zip mingw-w64-ucrt-x86_64-go
make git unzip base-devel mingw-w64-ucrt-x86_64-toolchain zip mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-qemu mingw-w64-ucrt-x86_64-jq mingw-w64-ucrt-x86_64-curl
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
Expand Down Expand Up @@ -94,6 +94,11 @@ jobs:
run: |
cp -f ../qcw-art/qcw-go-wsllinks/go-wsllinks.exe ./contrib/bundle-wsl/go-wsllinks.exe
make binaries add-bundles
- name: "🧪 Test Lima QEMU"
working-directory: lima-release
shell: msys2 {0}
run: |
PATH=lima-release/_output/bin:$PATH ./hack/test-templates.sh templates/default.yaml
- name: "🧪 Test Lima WSL2"
working-directory: lima-release/_output/bin
shell: pwsh
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ default.

Some features require even more fresh Windows systems. To use `Lima` one would need at least Windows 11 22H2 with mirrored network
mode https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking and WSL2 release newer than
[`2.4.8`](https://github.com/microsoft/WSL/releases/tag/2.4.8) prerelease is a hard requirement.
[`2.4.10`](https://github.com/microsoft/WSL/releases/tag/2.4.10) prerelease is a hard requirement.

## Included software

Expand Down Expand Up @@ -75,8 +75,9 @@ Version `v0.0.3`. Rebuilt for Windows amd64 platform.

#### `Lima`

Development main branch from revision `e911564e4a5f3151a3beef5ec2446914e016c745` with 1 patch set:
Development main branch from revision `e911564e4a5f3151a3beef5ec2446914e016c745` with 2 patch set:
* Enable QEMU support in Lima
* Add optional loading of UEFI firmware via -bios parameter

#### `Podman`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From aef43e60d028f74ac27c1c456fb6269fb4f9ffef Mon Sep 17 00:00:00 2001
From 20d0016ab3ac92a561352d22a8eb3e8d03b04fd6 Mon Sep 17 00:00:00 2001
From: Arthur Sengileyev <[email protected]>
Date: Sat, 8 Feb 2025 23:22:31 +0200
Subject: [PATCH 2/2] Add optional loading of UEFI firmware via -bios parameter
Expand Down Expand Up @@ -49,7 +49,7 @@ index 6927fab2..05485873 100644
// Defaults to built-in UEFI.
Images []FileWithVMType `yaml:"images,omitempty" json:"images,omitempty"`
diff --git a/pkg/qemu/qemu.go b/pkg/qemu/qemu.go
index 9bd5a8c5..507398bb 100644
index 9bd5a8c5..1d8fea6a 100644
--- a/pkg/qemu/qemu.go
+++ b/pkg/qemu/qemu.go
@@ -6,6 +6,7 @@ import (
Expand Down Expand Up @@ -99,7 +99,7 @@ index 9bd5a8c5..507398bb 100644
}
if firmware != "" {
- args = append(args, "-drive", fmt.Sprintf("if=pflash,format=raw,readonly=on,file=%s", firmware))
+ if *y.Firmware.CompatUEFIViaBIOS {
+ if *y.Firmware.CompatUEFIViaBIOS && *y.Arch == limayaml.X8664 {
+ args = append(args, "-bios", firmware)
+ } else {
+ args = append(args, "-drive", fmt.Sprintf("if=pflash,format=raw,readonly=on,file=%s", firmware))
Expand Down
2 changes: 1 addition & 1 deletion release.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Lima `<<LIMA_VERSION>>` with patches to enable QEMU support on Windows
* lima-infra Alpine WSL image `<<ALPINE_VERSION>>` based on AlpineWSL project `<<ALPINEWSL_VERSION>>`
* Podman `<<PODMAN_VERSION>>` with patches to enable QEMU support on Windows
* QEMU `<<QEMU_VERSION>>` (this one includes 9pfs on Windows hosts patches and UEFI pflash fixes, if this functionality is not needed, then consider using official installer, this is required to run Lima)
* QEMU `<<QEMU_VERSION>>` (this one includes 9pfs on Windows hosts patches and UEFI pflash fixes, if this functionality is not needed, then consider using official installer)

#### How to install
1. Download and install QEMU (from this release or official one version 7.2.0 or newer)
Expand Down

0 comments on commit dd5bfd4

Please sign in to comment.