Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
cf8706e
refactor: migrate cpuType to qemu
unsuman May 6, 2025
363baf5
internal driver plugin system
unsuman May 21, 2025
c841df5
Merge pull request #3693 from unsuman/feature/internal-driver-system
AkihiroSuda Jul 12, 2025
b866e4c
guestagent cidata: pass debug flag to guestagent systemd unit
stek29 Jul 13, 2025
a04f244
portfwd: create separate gRPC streams for each UDP client
stek29 Jul 14, 2025
a3fa5fa
remove unnecessary legacyBIOS setting
bonifaido Jul 14, 2025
9757942
Merge pull request #3725 from bonifaido/patch-1
AkihiroSuda Jul 14, 2025
7bd7066
external driver plugin system and update Makefile to build exteral bins
unsuman May 27, 2025
2cd7d3a
rename UDPEstablished to UDPUnconnected
stek29 Jul 13, 2025
14dcebd
Merge pull request #3723 from stek29/guestagent-debug
AkihiroSuda Jul 14, 2025
50bb714
Merge pull request #3694 from unsuman/feature/external-driver-system
AkihiroSuda Jul 14, 2025
d7f297a
Merge pull request #3722 from stek29/patch-1
AkihiroSuda Jul 14, 2025
7bd26b1
Added k0s template
plandem Jul 15, 2025
bd955e4
go.mod: github.com/lima-vm/lima/v2
AkihiroSuda Jul 15, 2025
52a86b1
Merge pull request #3728 from plandem/master
AkihiroSuda Jul 15, 2025
6272782
Remove Kconfig and config.mk
AkihiroSuda Jul 15, 2025
7b0f569
Merge pull request #3732 from AkihiroSuda/fix-3639
AkihiroSuda Jul 15, 2025
b76b7ff
Merge pull request #3731 from AkihiroSuda/gomajor-v2
AkihiroSuda Jul 16, 2025
e47c240
Fix proto style issues; enable protolint
alexandear Jul 16, 2025
77f0fe1
add unit tests for Registry pkg
unsuman Jul 15, 2025
ca8e13a
fix registration of .exe files
unsuman Jul 16, 2025
c4fbed5
build(deps): bump the k8s group with 3 updates
dependabot[bot] Jul 17, 2025
1a17365
build(deps): bump google.golang.org/grpc from 1.73.0 to 1.74.0
dependabot[bot] Jul 17, 2025
26c304c
build(deps): bump github.com/spf13/pflag from 1.0.6 to 1.0.7
dependabot[bot] Jul 17, 2025
05f99f6
Merge pull request #3737 from alexandear/chore/enable-protolint
AkihiroSuda Jul 17, 2025
b41430f
Merge pull request #3740 from lima-vm/dependabot/go_modules/github.co…
AkihiroSuda Jul 17, 2025
b1216d8
Merge pull request #3735 from unsuman/test/registry
AkihiroSuda Jul 17, 2025
a55e052
Merge pull request #3724 from stek29/fix-udp-fwd
AkihiroSuda Jul 17, 2025
26edf8c
Merge pull request #3738 from lima-vm/dependabot/go_modules/k8s-f90a3…
AkihiroSuda Jul 17, 2025
3e3e486
Merge pull request #3739 from lima-vm/dependabot/go_modules/google.go…
AkihiroSuda Jul 17, 2025
86b4495
Embed templates edited from the user interface
afbjorklund Jul 17, 2025
d4056f9
Merge pull request #3745 from afbjorklund/edit-embed
AkihiroSuda Jul 17, 2025
2b8bb39
qemuimgutil: fix "Failed to get \"write\" lock" error
AkihiroSuda Jul 17, 2025
bdf7c7f
pkg/instance/start.go: fix lint error on windows
AkihiroSuda Jul 17, 2025
1381317
Merge pull request #3742 from AkihiroSuda/fix-3720
AkihiroSuda Jul 18, 2025
64a1e92
build(deps): bump github/codeql-action from 3.29.2 to 3.29.3
dependabot[bot] Jul 22, 2025
3ac32b6
chore: enable dependabot for upgrading Go tools
alexandear Jul 21, 2025
7523447
Merge pull request #3760 from lima-vm/dependabot/github_actions/githu…
AkihiroSuda Jul 22, 2025
31fdaf3
Merge pull request #3759 from alexandear/chore/dependabot-tools
jandubois Jul 22, 2025
3537f20
build(deps): bump google.golang.org/grpc from 1.74.0 to 1.74.2
dependabot[bot] Jul 22, 2025
7e157f4
build(deps): bump mvdan.cc/sh/v3 from 3.8.0 to 3.12.0 in /hack/tools
dependabot[bot] Jul 22, 2025
a3c511b
build(deps): bump google.golang.org/grpc in /hack/tools
dependabot[bot] Jul 22, 2025
ce6db45
build(deps): bump github/codeql-action from 3.29.3 to 3.29.4
dependabot[bot] Jul 24, 2025
43310e1
Merge pull request #3763 from lima-vm/dependabot/go_modules/hack/tool…
jandubois Jul 24, 2025
47a2d7d
Merge pull request #3767 from lima-vm/dependabot/github_actions/githu…
jandubois Jul 24, 2025
d80bc1d
Merge pull request #3765 from lima-vm/dependabot/go_modules/hack/tool…
jandubois Jul 24, 2025
7a6078c
Merge pull request #3762 from lima-vm/dependabot/go_modules/google.go…
jandubois Jul 25, 2025
2bfc04a
Merge pull request #3500 from unsuman/fix/revamp-cputype
jandubois Jul 28, 2025
3256221
build(deps): bump github/codeql-action from 3.29.4 to 3.29.5
dependabot[bot] Jul 30, 2025
c1b8496
Merge pull request #3773 from lima-vm/dependabot/github_actions/githu…
AkihiroSuda Jul 31, 2025
dc19a34
Monitor docker event API
Nino-K Oct 24, 2024
8d7db93
Monitor containerd event API
Nino-K Oct 30, 2024
cbf9f32
Add kubernetes service watcher
Nino-K Oct 30, 2024
1407cb1
Removes kuberneteservice
Nino-K Oct 31, 2024
e953002
Fixes go lint issues
Nino-K Jun 10, 2025
5b10802
Add PortMonitor to limayaml
Nino-K Jun 25, 2025
a37fad1
Update docker event monitor
Nino-K Jun 25, 2025
c235d06
Pass multiple sockets to containerd
Nino-K Jun 25, 2025
688ab1e
Update kubernetes Service Watcher
Nino-K Jun 26, 2025
ff4aff9
Add PortMonitors to template that generates ISO
Nino-K Jun 26, 2025
79b977b
Fixes build issue for other platforms
Nino-K Jun 26, 2025
50cebbd
Add Port Watcher configs to install systemd
Nino-K Jul 7, 2025
dfc7e8f
Add retry to create docker client
Nino-K Jul 8, 2025
82838ed
Add retry to containerd client creation
Nino-K Jul 8, 2025
5999467
Add portMonitor property to appropriate templates
Nino-K Jul 9, 2025
b0dba1f
Fixes code review feedbacks
Nino-K Jul 28, 2025
6b6aea4
Add portMonitor to k0s
Nino-K Jul 28, 2025
326760a
Fixes go lint issues
Nino-K Jul 28, 2025
f49244d
Fixes startup failure in guestagent
Nino-K Jul 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
directories:
- "/"
- "/hack/tools"
schedule:
interval: daily
open-pull-requests-limit: 10
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand All @@ -48,6 +48,6 @@ jobs:
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with:
sarif_file: results.sarif
23 changes: 14 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.24.x
- name: Install protoc
- name: Install protoc and Go plugins
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
make install-protoc-tools
- name: Verify generated files
run: make install-tools generate check-generated
run: make generate check-generated
- name: Run yamllint
run: yamllint .
- name: Install shellcheck
Expand All @@ -49,23 +50,22 @@ jobs:
uses: ls-lint/action@02e380fe8733d499cbfc9e22276de5085508a5bd # v2.3.1
- name: Run shellcheck
run: find . -name '*.sh' | xargs shellcheck
- name: Install shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.4.3
- name: Run shfmt
run: find . -name '*.sh' | xargs shfmt -s -d
run: find . -name '*.sh' | xargs go tool -modfile=./hack/tools/go.mod shfmt -s -d
- name: Check hyperlinks
uses: docker://dkhamsing/awesome_bot:latest@sha256:a8adaeb3b3bd5745304743e4d8a6d512127646e420544a6d22d9f58a07f35884
with:
args: /github/workspace/README.md --allow-dupe --allow-redirect --request-delay 1 --white-list https://img.shields.io,http://127.0.0.1:8080,https://github.com/lima-vm/lima/releases/download,https://xbarapp.com,https://api.github.com
- name: Install go-licenses
# TODO: move to `go tool` after upgrading to v2
run: go install github.com/google/go-licenses@v1.6.0
- name: Check licenses
# the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
run: go-licenses check --include_tests ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
- name: Install ltag
run: go install github.com/containerd/ltag@v0.3.0
- name: Check license boilerplates
run: ltag -t ./hack/ltag --check -v
run: go tool -modfile=./hack/tools/go.mod ltag -t ./hack/ltag --check -v
- name: Check protobuf files
run: go tool -modfile=./hack/tools/go.mod protolint .

lint-go:
name: "Lint Go"
Expand All @@ -88,10 +88,15 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.24.x
- id: golangci-lint-version
shell: bash
working-directory: hack/tools
run: |
echo "GOLANGCI_LINT_VERSION=$(go list -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2)" >> $GITHUB_OUTPUT
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.2
version: ${{ steps.golangci-lint-version.outputs.GOLANGCI_LINT_VERSION }}
args: --verbose

security:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ linters:
- name: dot-imports
arguments:
- allowedPackages:
- github.com/lima-vm/lima/pkg/must
- github.com/lima-vm/lima/v2/pkg/must
- name: empty-block
- name: error-naming
- name: error-return
Expand Down
11 changes: 11 additions & 0 deletions .protolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is the configuration for protolint.
# See https://github.com/yoheimuta/protolint/blob/v0.55.6/_example/config/.protolint.yaml for details.
---
lint:
rules:
# Enable all default rules.
no_default: false
rules_option:
# MAX_LINE_LENGTH rule option.
max_line_length:
max_chars: 100
52 changes: 0 additions & 52 deletions Kconfig

This file was deleted.

77 changes: 48 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ TAR ?= tar
ZIP ?= zip
PLANTUML ?= plantuml # may also be "java -jar plantuml.jar" if installed elsewhere

# The KCONFIG programs are only needed for re-generating the ".config" file.
# You can install the python "kconfiglib", if you don't have kconfig/kbuild.
KCONFIG_CONF ?= $(shell command -v kconfig-conf || command -v kbuild-conf || echo oldconfig)
KCONFIG_MCONF ?= $(shell command -v kconfig-mconf || command -v kbuild-mconf || echo menuconfig)

GOARCH ?= $(shell $(GO) env GOARCH)
GOHOSTARCH := $(shell $(GO) env GOHOSTARCH)
GOHOSTOS := $(shell $(GO) env GOHOSTOS)
Expand Down Expand Up @@ -43,7 +38,7 @@ endif
endif
endif

PACKAGE := github.com/lima-vm/lima
PACKAGE := github.com/lima-vm/lima/v2

VERSION := $(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
VERSION_TRIMMED := $(VERSION:v%=%)
Expand Down Expand Up @@ -95,7 +90,7 @@ help-targets:
@echo '- helpers : Copy nerdctl.lima, apptainer.lima, docker.lima, podman.lima, and kubectl.lima'
@echo
@echo 'Targets for files in _output/share/lima/:'
@echo '- guestagents : Build guestagents for archs enabled by CONFIG_GUESTAGENT_ARCH_*'
@echo '- guestagents : Build guestagents'
@echo '- native-guestagent : Build guestagent for native arch'
@echo '- additional-guestagents : Build guestagents for archs other than native arch'
@echo '- <arch>-guestagent : Build guestagent for <arch>: $(sort $(LINUX_GUESTAGENT_ARCHS))'
Expand Down Expand Up @@ -143,22 +138,15 @@ minimal: clean limactl native-guestagent default_template
native: clean limactl helpers native-guestagent templates template_experimentals

################################################################################
# Kconfig
config: Kconfig
$(warning Kconfig is deprecated since Lima v1.2 and will be removed in Lima v2.0.)
$(KCONFIG_CONF) $<

menuconfig: Kconfig
$(warning Kconfig is deprecated since Lima v1.2 and will be removed in Lima v2.0.)
MENUCONFIG_STYLE=aquatic \
$(KCONFIG_MCONF) $<

# Copy the default config, if not overridden locally
# This is done to avoid a dependency on KCONFIG tools
.config: config.mk
cp $^ $@

-include .config
# These configs were once customizable but should no longer be changed.
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_ARCH_X8664=y
CONFIG_GUESTAGENT_ARCH_AARCH64=y
CONFIG_GUESTAGENT_ARCH_ARMV7L=y
CONFIG_GUESTAGENT_ARCH_PPC64LE=y
CONFIG_GUESTAGENT_ARCH_RISCV64=y
CONFIG_GUESTAGENT_ARCH_S390X=y
CONFIG_GUESTAGENT_COMPRESS=y

################################################################################
.PHONY: binaries
Expand Down Expand Up @@ -243,18 +231,48 @@ endif
# calls the native resolver library and not the simplistic version in the Go library.
ENVS__output/bin/limactl$(exe) = CGO_ENABLED=1 GOOS="$(GOOS)" GOARCH="$(GOARCH)" CC="$(CC)"

LIMACTL_DRIVER_TAGS :=
ifneq (,$(findstring vz,$(ADDITIONAL_DRIVERS)))
LIMACTL_DRIVER_TAGS += external_vz
endif
ifneq (,$(findstring qemu,$(ADDITIONAL_DRIVERS)))
LIMACTL_DRIVER_TAGS += external_qemu
endif
ifneq (,$(findstring wsl2,$(ADDITIONAL_DRIVERS)))
LIMACTL_DRIVER_TAGS += external_wsl2
endif

GO_BUILDTAGS ?=
GO_BUILDTAGS_LIMACTL := $(strip $(GO_BUILDTAGS) $(LIMACTL_DRIVER_TAGS))

_output/bin/limactl$(exe): $(LIMACTL_DEPS) $$(call force_build,$$@)
# If the previous cross-compilation was for GOOS=windows, limactl.exe might still be present.
ifneq ($(GOOS),windows) #
@rm -rf _output/bin/limactl.exe
else
@rm -rf _output/bin/limactl
endif
$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/limactl
$(ENVS_$@) $(GO_BUILD) -tags '$(GO_BUILDTAGS_LIMACTL)' -o $@ ./cmd/limactl
ifeq ($(GOOS),darwin)
codesign -f -v --entitlements vz.entitlements -s - $@
endif

DRIVER_INSTALL_DIR := _output/libexec/lima

.PHONY: additional-drivers
additional-drivers:
@mkdir -p $(DRIVER_INSTALL_DIR)
@for drv in $(ADDITIONAL_DRIVERS); do \
echo "Building $$drv as external"; \
if [ "$(GOOS)" = "windows" ]; then \
$(GO_BUILD) -o $(DRIVER_INSTALL_DIR)/lima-driver-$$drv.exe ./cmd/lima-driver-$$drv; \
else \
$(GO_BUILD) -o $(DRIVER_INSTALL_DIR)/lima-driver-$$drv ./cmd/lima-driver-$$drv; \
fi; \
if [ "$$drv" = "vz" ] && [ "$(GOOS)" = "darwin" ]; then \
codesign -f -v --entitlements vz.entitlements -s - $(DRIVER_INSTALL_DIR)/lima-driver-vz; \
fi; \
done

LIMA_CMDS = $(sort lima lima$(bat)) # $(sort ...) deduplicates the list
LIMA_DEPS = $(addprefix _output/bin/,$(LIMA_CMDS))
lima: $(LIMA_DEPS)
Expand Down Expand Up @@ -496,15 +514,16 @@ lint: check-generated
find . -name '*.sh' ! -path "./.git/*" | xargs shfmt -s -d
go-licenses check --include_tests ./... --allowed_licenses=$$(cat ./hack/allowed-licenses.txt)
ltag -t ./hack/ltag --check -v
protolint .

.PHONY: clean
clean:
rm -rf _output vendor

.PHONY: install-tools
install-tools:
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
.PHONY: install-protoc-tools
install-protoc-tools:
go install -modfile=./hack/tools/go.mod google.golang.org/protobuf/cmd/protoc-gen-go
go install -modfile=./hack/tools/go.mod google.golang.org/grpc/cmd/protoc-gen-go-grpc

.PHONY: generate
generate:
Expand Down
14 changes: 14 additions & 0 deletions cmd/lima-driver-qemu/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
"github.com/lima-vm/lima/v2/pkg/driver/external/server"
"github.com/lima-vm/lima/v2/pkg/driver/qemu"
)

// To be used as an external driver for Lima.
func main() {
server.Serve(qemu.New())
}
14 changes: 14 additions & 0 deletions cmd/lima-driver-vz/main_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
"github.com/lima-vm/lima/v2/pkg/driver/external/server"
"github.com/lima-vm/lima/v2/pkg/driver/vz"
)

// To be used as an external driver for Lima.
func main() {
server.Serve(vz.New())
}
14 changes: 14 additions & 0 deletions cmd/lima-driver-wsl2/main_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
"github.com/lima-vm/lima/v2/pkg/driver/external/server"
"github.com/lima-vm/lima/v2/pkg/driver/wsl2"
)

// To be used as an external driver for Lima.
func main() {
server.Serve(wsl2.New())
}
Loading
Loading