Repository: lima-vm/lima

Issue:
Windows CI began to fail on Oct 21
#2769 passed the CI, but its merge commit and later ones are failing 

https://github.com/lima-vm/lima/actions/runs/11429806278/job/31800191430

```
[…]
time="2024-10-21T01:14:55Z" level=info msg="SSH Local Port: 22"
time="2024-10-21T01:14:55Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
time="2024-10-21T01:15:05Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
time="2024-10-21T01:15:15Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
time="2024-10-21T01:24:43Z" level=fatal msg="did not receive an event with the \"running\" status"
```

Something seems to have changed between https://github.com/actions/runner-images/releases/tag/win22%2F20241006.1 and https://github.com/actions/runner-images/releases/tag/win22%2F20241015.1

Discussion:
@jandubois: In https://github.com/lima-vm/lima/actions/runs/11445753347/job/31843450765?pr=2778 I see:

```
System has not been booted with systemd as init system (PID 1). Can't operate.
```@jandubois: @pendo324 Do you have any idea what may be causing the Windows tests to fail now?

I can't find anything that seems related in https://github.com/actions/runner-images/commit/fcc4cdb1d095af1317859c4809364538953b3497 or https://github.com/actions/runner-images/commit/09ff567de6908096a96ace47eb3f41079993366d

The errors look like `systemd` is no longer enabled in your distro, but there has been no change to the distro.

I'm at a loss on what might be causing this.@pendo324: Thanks for pinging me, taking a look now@arixmkii: I'm doing some experiments with Windows support. I managed to replicate this CI attempt in my rebuild workflow. It worked successfully on a default GH runner. Logs are available https://github.com/arixmkii/qcw/actions/runs/13090314041/job/36526224725

The biggest difference in the setup is that I have to use latest preview WSL build from https://github.com/microsoft/WSL/releases@arixmkii: @jandubois I debugged this. There is actually related change in commits you showed. It is Git version bump. It uses OpenSSH from Git distribution.

The script "user session is ready for ssh" hangs indefinitely on Git 2.47 and newer releases. The same is the case for latest msys2 OpenSSH. I downgraded the Git on my system and managed to run WSL2 machine. 

I also managed to run almost all integration tests with this WSL2 machine, when using OpenSSH inside Alpine companion distro in WSL2 (not using any of Windows tools) https://github.com/arixmkii/qcw/actions/runs/13474629971/job/37652601743

Conclusion. Machine didn't break, Windows tooling has some sort of issue/regression, which might or might not be fixed.

I tried to create an isolated reproducer using same script doing `cat script sh | <openssh command from lima>` in parallel to hanging one and was not able to reproduce it outside of Lima.
@mook-as: FWIW, https://github.com/git-for-windows/git/issues/5199 may be relevant. Note that git-for-Windows picked up the fixes, but as far as I know it's not in upstream cygwin/msys2 yet.

https://github.com/actions/runner-images/commit/fcc4cdb1d095af1317859c4809364538953b3497 linked above shows that Git for Windows was updated to 2.47.0.windows.1 which would be an affected version. But right now it shows 2.47.1.windows.2 which should be fixed (so some runs may be succeeding).@arixmkii: @mook-as Thank you! I tested with the updated runner (I'm using server 2025, but this should not really behave differently here) with `git version 2.47.1.windows.2` and it passed tests https://github.com/arixmkii/qcw/actions/runs/13552437877/job/37879648090

Solution patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0abd0377..b8bc41ab 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -66,6 +66,12 @@ jobs:
     - 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=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib
+    - name: Install ltag
+      # The GitHub repo has been moved from kunalkushwaha/ltag to containerd/ltag,
+      # but the Go module name is not changed yet: https://github.com/containerd/ltag/issues/17
+      run: go install github.com/kunalkushwaha/ltag@v0.2.5
+    - name: Check license boilerplates
+      run: ltag -t ./hack/ltag --check -v
 
   security:
     name: "Vulncheck"
@@ -129,12 +135,10 @@ jobs:
     - name: Enable WSL2
       run: |
         wsl --set-default-version 2
-        # Manually install the latest kernel from MSI
-        Invoke-WebRequest -Uri "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi" -OutFile "wsl_update_x64.msi"
-        $pwd = (pwd).Path
-        Start-Process msiexec.exe -Wait -ArgumentList "/I $pwd\wsl_update_x64.msi /quiet"
+        wsl --shutdown
         wsl --update
         wsl --status
+        wsl --version
         wsl --list --online
     - name: Install WSL2 distro
       timeout-minutes: 1
@@ -160,22 +164,15 @@ jobs:
       run: go test -v ./...
     - name: Make
       run: make
-# FIXME: Windows CI began to fail on Oct 21, 2024.
-# Something seems to have changed between win22/20241006.1 and win22/20241015.1.
-# https://github.com/lima-vm/lima/issues/2775
-#    - name: Smoke test
-#      # Make sure the path is set properly and then run limactl
-#      run: |
-#        $env:Path = 'C:\Program Files\Git\usr\bin;' + $env:Path
-#        Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $env:Path
-#        .\_output\bin\limactl.exe start template://experimental/wsl2
-#      # TODO: run the full integration tests
-#    - name: Debug
-#      if: always()
-#      run: type C:\Users\runneradmin\.lima\wsl2\ha.stdout.log
-#    - name: Debug
-#      if: always()
-#      run: type C:\Users\runneradmin\.lima\wsl2\ha.stderr.log
+    - name: Integration tests (WSL2, Windows host)
+      run: |
+        $env:Path = "$pwd\_output\bin;" + 'C:\Program Files\Git\usr\bin;' + $env:Path
+        Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $env:Path
+        $env:MSYS2_ENV_CONV_EXCL='HOME_HOST;HOME_GUEST'
+        $env:HOME_HOST=$(cygpath.exe "$env:USERPROFILE")
+        $env:HOME_GUEST="/mnt$env:HOME_HOST"
+        $env:LIMACTL_CREATE_ARGS='--vm-type=wsl2 --mount-type=wsl2 --containerd=system'
+        bash.exe -c "./hack/test-templates.sh templates/experimental/wsl2.yaml"
 
   qemu:
     name: "Integration tests (QEMU, macOS host)"
diff --git a/Makefile b/Makefile
index be201c71..ef472651 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
 # Files are installed under $(DESTDIR)/$(PREFIX)
 PREFIX ?= /usr/local
 DEST := $(shell echo "$(DESTDIR)/$(PREFIX)" | sed 's:///*:/:g; s://*$$::')
diff --git a/cmd/lima b/cmd/lima
index f26202c9..f5695b69 100755
--- a/cmd/lima
+++ b/cmd/lima
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu
 
 # Environment Variables
diff --git a/cmd/lima-guestagent/daemon_linux.go b/cmd/lima-guestagent/daemon_linux.go
index 391ae667..c3395aed 100644
--- a/cmd/lima-guestagent/daemon_linux.go
+++ b/cmd/lima-guestagent/daemon_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/lima-guestagent/install_systemd_linux.go b/cmd/lima-guestagent/install_systemd_linux.go
index 41ec69c1..df44791f 100644
--- a/cmd/lima-guestagent/install_systemd_linux.go
+++ b/cmd/lima-guestagent/install_systemd_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/lima-guestagent/main_linux.go b/cmd/lima-guestagent/main_linux.go
index 26884d3c..ad7c9157 100644
--- a/cmd/lima-guestagent/main_linux.go
+++ b/cmd/lima-guestagent/main_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/completion.go b/cmd/limactl/completion.go
index 54d42ddf..06c1af40 100644
--- a/cmd/limactl/completion.go
+++ b/cmd/limactl/completion.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/copy.go b/cmd/limactl/copy.go
index 4b5fc3e3..d6333399 100644
--- a/cmd/limactl/copy.go
+++ b/cmd/limactl/copy.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/debug.go b/cmd/limactl/debug.go
index cfbd4d52..ad91220c 100644
--- a/cmd/limactl/debug.go
+++ b/cmd/limactl/debug.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/delete.go b/cmd/limactl/delete.go
index e69e9563..ee7dba36 100644
--- a/cmd/limactl/delete.go
+++ b/cmd/limactl/delete.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/disk.go b/cmd/limactl/disk.go
index dafd601a..d8fca076 100644
--- a/cmd/limactl/disk.go
+++ b/cmd/limactl/disk.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/edit.go b/cmd/limactl/edit.go
index 47e37086..e9d33311 100644
--- a/cmd/limactl/edit.go
+++ b/cmd/limactl/edit.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/editflags/editflags.go b/cmd/limactl/editflags/editflags.go
index fc509548..e5b9a584 100644
--- a/cmd/limactl/editflags/editflags.go
+++ b/cmd/limactl/editflags/editflags.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package editflags
 
 import (
diff --git a/cmd/limactl/factory-reset.go b/cmd/limactl/factory-reset.go
index c13a450f..a5303098 100644
--- a/cmd/limactl/factory-reset.go
+++ b/cmd/limactl/factory-reset.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/gendoc.go b/cmd/limactl/gendoc.go
index f1d3935d..7a8b7c95 100644
--- a/cmd/limactl/gendoc.go
+++ b/cmd/limactl/gendoc.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/genschema.go b/cmd/limactl/genschema.go
index 1ad574bb..8de619fd 100644
--- a/cmd/limactl/genschema.go
+++ b/cmd/limactl/genschema.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/hostagent.go b/cmd/limactl/hostagent.go
index 45de7441..75a838cb 100644
--- a/cmd/limactl/hostagent.go
+++ b/cmd/limactl/hostagent.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/info.go b/cmd/limactl/info.go
index 8dc3a788..8aafa714 100644
--- a/cmd/limactl/info.go
+++ b/cmd/limactl/info.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/list.go b/cmd/limactl/list.go
index f7d5c928..f10064d4 100644
--- a/cmd/limactl/list.go
+++ b/cmd/limactl/list.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/main.go b/cmd/limactl/main.go
index 259f622a..268fad0d 100644
--- a/cmd/limactl/main.go
+++ b/cmd/limactl/main.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/protect.go b/cmd/limactl/protect.go
index d094eec5..36140609 100644
--- a/cmd/limactl/protect.go
+++ b/cmd/limactl/protect.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/prune.go b/cmd/limactl/prune.go
index 5d377ec3..7dc38a5c 100644
--- a/cmd/limactl/prune.go
+++ b/cmd/limactl/prune.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/shell.go b/cmd/limactl/shell.go
index c4611a0b..3dee0bac 100644
--- a/cmd/limactl/shell.go
+++ b/cmd/limactl/shell.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/show-ssh.go b/cmd/limactl/show-ssh.go
index f3867b68..b469c297 100644
--- a/cmd/limactl/show-ssh.go
+++ b/cmd/limactl/show-ssh.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/snapshot.go b/cmd/limactl/snapshot.go
index f6736837..76e55df5 100644
--- a/cmd/limactl/snapshot.go
+++ b/cmd/limactl/snapshot.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/start-at-login.go b/cmd/limactl/start-at-login.go
index 312d1a46..39db8bbb 100644
--- a/cmd/limactl/start-at-login.go
+++ b/cmd/limactl/start-at-login.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/start.go b/cmd/limactl/start.go
index b0f08d31..62f1ee77 100644
--- a/cmd/limactl/start.go
+++ b/cmd/limactl/start.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/stop.go b/cmd/limactl/stop.go
index b4bff7d6..554547fe 100644
--- a/cmd/limactl/stop.go
+++ b/cmd/limactl/stop.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/sudoers.go b/cmd/limactl/sudoers.go
index eb8fd1f4..4d6dc7b3 100644
--- a/cmd/limactl/sudoers.go
+++ b/cmd/limactl/sudoers.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/template.go b/cmd/limactl/template.go
index 5cfc0a29..bb4fb0ad 100644
--- a/cmd/limactl/template.go
+++ b/cmd/limactl/template.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/tunnel.go b/cmd/limactl/tunnel.go
index f9d615c7..9e690281 100644
--- a/cmd/limactl/tunnel.go
+++ b/cmd/limactl/tunnel.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/unprotect.go b/cmd/limactl/unprotect.go
index 2e95ce33..5cb9b303 100644
--- a/cmd/limactl/unprotect.go
+++ b/cmd/limactl/unprotect.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/cmd/limactl/usernet.go b/cmd/limactl/usernet.go
index 5ad356f4..dac355c7 100644
--- a/cmd/limactl/usernet.go
+++ b/cmd/limactl/usernet.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package main
 
 import (
diff --git a/go.mod b/go.mod
index 485dcc76..8dd77972 100644
--- a/go.mod
+++ b/go.mod
@@ -10,7 +10,7 @@ require (
 	github.com/Microsoft/go-winio v0.6.2 // gomodjail:unconfined
 	github.com/apparentlymart/go-cidr v1.1.0
 	github.com/balajiv113/fd v0.0.0-20230330094840-143eec500f3e
-	github.com/cheggaaa/pb/v3 v3.1.6 // gomodjail:unconfined
+	github.com/cheggaaa/pb/v3 v3.1.7 // gomodjail:unconfined
 	github.com/containerd/containerd v1.7.26
 	github.com/containerd/continuity v0.4.5
 	github.com/containers/gvisor-tap-vsock v0.8.3 // gomodjail:unconfined
@@ -112,7 +112,7 @@ require (
 	github.com/pierrec/lz4/v4 v4.1.22 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pkg/sftp v1.13.7 // indirect
-	github.com/rivo/uniseg v0.2.0 // indirect
+	github.com/rivo/uniseg v0.4.7 // indirect
 	github.com/russross/blackfriday/v2 v2.1.0 // indirect
 	github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
 	// gomodjail:unconfined
diff --git a/go.sum b/go.sum
index 8166ddc6..fba26ed3 100644
--- a/go.sum
+++ b/go.sum
@@ -32,8 +32,8 @@ github.com/braydonk/yaml v0.9.0 h1:ewGMrVmEVpsm3VwXQDR388sLg5+aQ8Yihp6/hc4m+h4=
 github.com/braydonk/yaml v0.9.0/go.mod h1:hcm3h581tudlirk8XEUPDBAimBPbmnL0Y45hCRl47N4=
 github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
 github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
-github.com/cheggaaa/pb/v3 v3.1.6 h1:h0x+vd7EiUohAJ29DJtJy+SNAc55t/elW3jCD086EXk=
-github.com/cheggaaa/pb/v3 v3.1.6/go.mod h1:urxmfVtaxT+9aWk92DbsvXFZtNSWQSO5TRAp+MJ3l1s=
+github.com/cheggaaa/pb/v3 v3.1.7 h1:2FsIW307kt7A/rz/ZI2lvPO+v3wKazzE4K/0LtTWsOI=
+github.com/cheggaaa/pb/v3 v3.1.7/go.mod h1:/Ji89zfVPeC/u5j8ukD0MBPHt2bzTYp74lQ7KlgFWTQ=
 github.com/containerd/containerd v1.7.26 h1:3cs8K2RHlMQaPifLqgRyI4VBkoldNdEw62cb7qQga7k=
 github.com/containerd/containerd v1.7.26/go.mod h1:m4JU0E+h0ebbo9yXD7Hyt+sWnc8tChm7MudCjj4jRvQ=
 github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4=
@@ -230,8 +230,9 @@ github.com/pkg/xattr v0.4.9/go.mod h1:di8WF84zAKk8jzR1UBTEWh9AUlIZZ7M/JNt8e9B6kt
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
+github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
 github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY=
 github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc=
 github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
diff --git a/hack/brew-install-version.sh b/hack/brew-install-version.sh
index fbd6028e..eaca43a7 100755
--- a/hack/brew-install-version.sh
+++ b/hack/brew-install-version.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script only works for formulas in the homebrew-core.
 # It assumes the homebrew-core has been checked out into ./homebrew-core.
 # It only needs commit messages, so the checkout can be filtered with tree:0.
diff --git a/hack/cache-common-inc.sh b/hack/cache-common-inc.sh
index d3ce456a..70d61d41 100755
--- a/hack/cache-common-inc.sh
+++ b/hack/cache-common-inc.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # print the error message and exit with status 1
 function error_exit() {
 	echo "Error: $*" >&2
diff --git a/hack/calculate-cache.sh b/hack/calculate-cache.sh
index a87af6bc..26a9a0bf 100755
--- a/hack/calculate-cache.sh
+++ b/hack/calculate-cache.sh
@@ -1,4 +1,8 @@
 #!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script calculates the expected content size, actual cached size, and cache-keys used in caching method before and after
 # implementation in https://github.com/lima-vm/lima/pull/2508
 #
diff --git a/hack/common.inc.sh b/hack/common.inc.sh
index 1e90ff8e..95e429fc 100644
--- a/hack/common.inc.sh
+++ b/hack/common.inc.sh
@@ -23,7 +23,7 @@ if [[ ${BASH_VERSINFO:-0} -lt 4 ]]; then
 	exit 1
 fi
 
-: "${LIMA_HOME:=$HOME/.lima}"
+: "${LIMA_HOME:=${HOME_HOST:-$HOME}/.lima}"
 _IPERF3=iperf3
 # iperf3-darwin does some magic on macOS to avoid "No route on host" on macOS 15
 # https://github.com/lima-vm/socket_vmnet/issues/85
diff --git a/hack/debug-cache.sh b/hack/debug-cache.sh
index db04cf1b..a9510351 100755
--- a/hack/debug-cache.sh
+++ b/hack/debug-cache.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 cache_dir="${HOME}/Library/Caches"
 if [ "$(uname -s)" != "Darwin" ]; then
diff --git a/hack/fix-qemu-signature.sh b/hack/fix-qemu-signature.sh
index b0203484..f571c329 100755
--- a/hack/fix-qemu-signature.sh
+++ b/hack/fix-qemu-signature.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script fixes the signature of QEMU binary with the "com.apple.security.hypervisor" entitlement.
 #
 # A workaround for "QEMU (homebrew) is broken on Intel: `[hostagent] Driver stopped due to error: "signal: abort trap"` ..."
diff --git a/hack/inject-cmdline-to-template.sh b/hack/inject-cmdline-to-template.sh
index 13dec85c..08b92899 100755
--- a/hack/inject-cmdline-to-template.sh
+++ b/hack/inject-cmdline-to-template.sh
@@ -1,4 +1,8 @@
 #!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 #
 # This script does
 # 1. detect arch from template if not provided
diff --git a/hack/ltag/bash.txt b/hack/ltag/bash.txt
new file mode 100644
index 00000000..10b096c9
--- /dev/null
+++ b/hack/ltag/bash.txt
@@ -0,0 +1,2 @@
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
diff --git a/hack/ltag/dockerfile.txt b/hack/ltag/dockerfile.txt
new file mode 100644
index 00000000..10b096c9
--- /dev/null
+++ b/hack/ltag/dockerfile.txt
@@ -0,0 +1,2 @@
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
diff --git a/hack/ltag/go.txt b/hack/ltag/go.txt
new file mode 100644
index 00000000..661d3adb
--- /dev/null
+++ b/hack/ltag/go.txt
@@ -0,0 +1,3 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
diff --git a/hack/ltag/makefile.txt b/hack/ltag/makefile.txt
new file mode 100644
index 00000000..10b096c9
--- /dev/null
+++ b/hack/ltag/makefile.txt
@@ -0,0 +1,2 @@
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
diff --git a/hack/oss-fuzz-build.sh b/hack/oss-fuzz-build.sh
index 0b1e757b..1334554d 100755
--- a/hack/oss-fuzz-build.sh
+++ b/hack/oss-fuzz-build.sh
@@ -1,4 +1,8 @@
 #!/bin/bash -eu
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script is used by OSS-Fuzz to build and run Limas fuzz tests continuously.
 # Limas OSS-Fuzz integration can be found here: https://github.com/google/oss-fuzz/tree/master/projects/lima
 # Modify https://github.com/google/oss-fuzz/blob/master/projects/lima/project.yaml for access management to Limas OSS-Fuzz crashes.
diff --git a/hack/test-colima.sh b/hack/test-colima.sh
index d543f383..893cb330 100755
--- a/hack/test-colima.sh
+++ b/hack/test-colima.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux -o pipefail
 
 colima start
diff --git a/hack/test-mount-home.sh b/hack/test-mount-home.sh
index dd8e1afa..dd551627 100755
--- a/hack/test-mount-home.sh
+++ b/hack/test-mount-home.sh
@@ -1,4 +1,8 @@
 #!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -11,14 +15,15 @@ if [ "$#" -ne 1 ]; then
 fi
 
 NAME="$1"
-hometmp="$HOME/lima-test-tmp"
+hometmp="${HOME_HOST:-$HOME}/lima-test-tmp"
+hometmpguest="${HOME_GUEST:-$HOME}/lima-test-tmp"
 INFO "Testing home access (\"$hometmp\")"
 rm -rf "$hometmp"
 mkdir -p "$hometmp"
 defer "rm -rf \"$hometmp\""
 echo "random-content-${RANDOM}" >"$hometmp/random"
 expected="$(cat "$hometmp/random")"
-got="$(limactl shell "$NAME" cat "$hometmp/random")"
+got="$(limactl shell "$NAME" cat "$hometmpguest/random")"
 INFO "$hometmp/random: expected=${expected}, got=${got}"
 if [ "$got" != "$expected" ]; then
 	ERROR "Home directory is not shared?"
diff --git a/hack/test-port-forwarding.pl b/hack/test-port-forwarding.pl
index 3a41ce1e..cc1fc96c 100755
--- a/hack/test-port-forwarding.pl
+++ b/hack/test-port-forwarding.pl
@@ -129,7 +129,8 @@ EOF
 sleep 5;
 
 # Record current log size, so we can skip prior output
-$ENV{LIMA_HOME} ||= "$ENV{HOME}/.lima";
+$ENV{HOME_HOST} ||= "$ENV{HOME}";
+$ENV{LIMA_HOME} ||= "$ENV{HOME_HOST}/.lima";
 my $ha_log = "$ENV{LIMA_HOME}/$instance/ha.stderr.log";
 my $ha_log_size = -s $ha_log or die;
 
diff --git a/hack/test-selinux.sh b/hack/test-selinux.sh
index 8ec318c2..817a6726 100755
--- a/hack/test-selinux.sh
+++ b/hack/test-selinux.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
diff --git a/hack/test-templates.sh b/hack/test-templates.sh
index 26e064b5..f0ec7263 100755
--- a/hack/test-templates.sh
+++ b/hack/test-templates.sh
@@ -1,6 +1,13 @@
 #!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
+# will prevent msys2 converting Linux path arguments into Windows paths before passing to limactl
+export MSYS2_ARG_CONV_EXCL='*'
+
 scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 # shellcheck source=common.inc.sh
 source "${scriptdir}/common.inc.sh"
@@ -12,9 +19,19 @@ fi
 
 FILE="$1"
 NAME="$(basename -s .yaml "$FILE")"
+OS_HOST="$(uname -o)"
+
+# On Windows $HOME of the bash runner, %USERPROFILE% of the host machine and mpunting point in the guest machine
+# are all different folders. This will handle path differences, when values are expilictly set.
+HOME_HOST=${HOME_HOST:-$HOME}
+HOME_GUEST=${HOME_GUEST:-$HOME}
+FILE_HOST=$FILE
+if [ "${OS_HOST}" = "Msys" ]; then
+	FILE_HOST="$(cygpath -w "$FILE")"
+fi
 
-INFO "Validating \"$FILE\""
-limactl validate "$FILE"
+INFO "Validating \"$FILE_HOST\""
+limactl validate "$FILE_HOST"
 
 # --cpus=1 is needed for running vz on GHA: https://github.com/lima-vm/lima/pull/1511#issuecomment-1574937888
 LIMACTL_CREATE=(limactl --tty=false create --cpus=1 --memory=1)
@@ -22,6 +39,7 @@ LIMACTL_CREATE=(limactl --tty=false create --cpus=1 --memory=1)
 CONTAINER_ENGINE="nerdctl"
 
 declare -A CHECKS=(
+	["proxy-settings"]="1"
 	["systemd"]="1"
 	["systemd-strict"]="1"
 	["mount-home"]="1"
@@ -69,6 +87,13 @@ case "$NAME" in
 "docker")
 	CONTAINER_ENGINE="docker"
 	;;
+"wsl2")
+	# TODO https://github.com/lima-vm/lima/issues/3267
+	CHECKS["systemd"]=
+	# TODO https://github.com/lima-vm/lima/issues/3268
+	CHECKS["proxy-settings"]=
+	CHECKS["port-forwards"]=
+	;;
 esac
 
 if limactl ls -q | grep -q "$NAME"; then
@@ -80,7 +105,7 @@ fi
 # TODO: skip downloading and converting the image here.
 # Probably `limactl create` should have "dry run" mode that just generates `lima.yaml`.
 # shellcheck disable=SC2086
-"${LIMACTL_CREATE[@]}" ${LIMACTL_CREATE_ARGS} --set ".additionalDisks=null" --name="${NAME}-tmp" "$FILE"
+"${LIMACTL_CREATE[@]}" ${LIMACTL_CREATE_ARGS} --set ".additionalDisks=null" --name="${NAME}-tmp" "$FILE_HOST"
 case "$(yq '.networks[].lima' "${LIMA_HOME}/${NAME}-tmp/lima.yaml")" in
 "shared")
 	CHECKS["vmnet"]=1
@@ -93,32 +118,38 @@ esac
 limactl rm -f "${NAME}-tmp"
 
 if [[ -n ${CHECKS["port-forwards"]} ]]; then
-	tmpconfig="$HOME/lima-config-tmp"
+	tmpconfig="$HOME_HOST/lima-config-tmp"
 	mkdir -p "${tmpconfig}"
 	defer "rm -rf \"$tmpconfig\""
 	tmpfile="${tmpconfig}/${NAME}.yaml"
 	cp "$FILE" "${tmpfile}"
 	FILE="${tmpfile}"
+	FILE_HOST=$FILE
+	if [ "${OS_HOST}" = "Msys" ]; then
+		FILE_HOST="$(cygpath -w "$FILE")"
+	fi
+
 	INFO "Setup port forwarding rules for testing in \"${FILE}\""
 	"${scriptdir}/test-port-forwarding.pl" "${FILE}"
-	limactl validate "$FILE"
+	INFO "Validating \"$FILE_HOST\""
+	limactl validate "$FILE_HOST"
 fi
 
 function diagnose() {
 	NAME="$1"
 	set -x +e
-	tail "$HOME/.lima/${NAME}"/*.log
+	tail "$HOME_HOST/.lima/${NAME}"/*.log
 	limactl shell "$NAME" systemctl --no-pager status
 	limactl shell "$NAME" systemctl --no-pager
 	mkdir -p failure-logs
-	cp -pf "$HOME/.lima/${NAME}"/*.log failure-logs/
+	cp -pf "$HOME_HOST/.lima/${NAME}"/*.log failure-logs/
 	limactl shell "$NAME" sudo cat /var/log/cloud-init-output.log | tee failure-logs/cloud-init-output.log
 	set +x -e
 }
 
 export ftp_proxy=http://localhost:2121
 
-INFO "Creating \"$NAME\" from \"$FILE\""
+INFO "Creating \"$NAME\" from \"$FILE_HOST\""
 defer "limactl delete -f \"$NAME\""
 
 if [[ -n ${CHECKS["disk"]} ]]; then
@@ -130,7 +161,7 @@ fi
 
 set -x
 # shellcheck disable=SC2086
-"${LIMACTL_CREATE[@]}" ${LIMACTL_CREATE_ARGS} "$FILE"
+"${LIMACTL_CREATE[@]}" ${LIMACTL_CREATE_ARGS} "$FILE_HOST"
 set +x
 
 if [[ -n ${CHECKS["mount-path-with-spaces"]} ]]; then
@@ -152,7 +183,7 @@ limactl shell "$NAME" cat /etc/os-release
 set +x
 
 INFO "Testing that host home is not wiped out"
-[ -e "$HOME/.lima" ]
+[ -e "$HOME_HOST/.lima" ]
 
 if [[ -n ${CHECKS["mount-path-with-spaces"]} ]]; then
 	INFO 'Testing that "/tmp/lima test dir with spaces" is not wiped out'
@@ -179,16 +210,18 @@ if [[ -n ${CHECKS["set-user"]} ]]; then
 	limactl shell "$NAME" grep "^john:x:4711:4711:John Doe:/home/john-john" /etc/passwd
 fi
 
-INFO "Testing proxy settings are imported"
-got=$(limactl shell "$NAME" env | grep FTP_PROXY)
-# Expected: FTP_PROXY is set in addition to ftp_proxy, localhost is replaced
-# by the gateway address, and the value is set immediately without a restart
-gatewayIp=$(limactl shell "$NAME" ip route show 0.0.0.0/0 dev eth0 | cut -d\  -f3)
-expected="FTP_PROXY=http://${gatewayIp}:2121"
-INFO "FTP_PROXY: expected=${expected} got=${got}"
-if [ "$got" != "$expected" ]; then
-	ERROR "proxy environment variable not set to correct value"
-	exit 1
+if [[ -n ${CHECKS["proxy-settings"]} ]]; then
+	INFO "Testing proxy settings are imported"
+	got=$(limactl shell "$NAME" env | grep FTP_PROXY)
+	# Expected: FTP_PROXY is set in addition to ftp_proxy, localhost is replaced
+	# by the gateway address, and the value is set immediately without a restart
+	gatewayIp=$(limactl shell "$NAME" ip route show 0.0.0.0/0 dev eth0 | cut -d\  -f3)
+	expected="FTP_PROXY=http://${gatewayIp}:2121"
+	INFO "FTP_PROXY: expected=${expected} got=${got}"
+	if [ "$got" != "$expected" ]; then
+		ERROR "proxy environment variable not set to correct value"
+		exit 1
+	fi
 fi
 
 INFO "Testing limactl copy command"
@@ -196,6 +229,7 @@ tmpdir="$(mktemp -d "${TMPDIR:-/tmp}"/lima-test-templates.XXXXXX)"
 defer "rm -rf \"$tmpdir\""
 tmpfile="$tmpdir/lima-hostname"
 rm -f "$tmpfile"
+# TODO support Windows path https://github.com/lima-vm/lima/issues/3215
 limactl cp "$NAME":/etc/hostname "$tmpfile"
 expected="$(limactl shell "$NAME" cat /etc/hostname)"
 got="$(cat "$tmpfile")"
@@ -234,32 +268,38 @@ nginx_image="ghcr.io/stargz-containers/nginx:1.19-alpine-org"
 alpine_image="ghcr.io/containerd/alpine:3.14.0"
 
 if [[ -n ${CHECKS["container-engine"]} ]]; then
+	sudo=""
+	# Currently WSL2 machines only support privileged engine. This requirement might be lifted in the future.
+	if [[ "$(limactl ls --json "${NAME}" | jq -r .vmType)" == "wsl2" ]]; then
+		sudo="sudo"
+	fi
 	INFO "Run a nginx container with port forwarding 127.0.0.1:8080"
 	set -x
-	if ! limactl shell "$NAME" $CONTAINER_ENGINE info; then
-		limactl shell "$NAME" sudo cat /var/log/cloud-init-output.log
+	if ! limactl shell "$NAME" $sudo $CONTAINER_ENGINE info; then
+		limactl shell "$NAME" cat /var/log/cloud-init-output.log
 		ERROR "\"${CONTAINER_ENGINE} info\" failed"
 		exit 1
 	fi
-	limactl shell "$NAME" $CONTAINER_ENGINE pull --quiet ${nginx_image}
-	limactl shell "$NAME" $CONTAINER_ENGINE run -d --name nginx -p 127.0.0.1:8080:80 ${nginx_image}
+	limactl shell "$NAME" $sudo $CONTAINER_ENGINE pull --quiet ${nginx_image}
+	limactl shell "$NAME" $sudo $CONTAINER_ENGINE run -d --name nginx -p 127.0.0.1:8080:80 ${nginx_image}
 
 	timeout 3m bash -euxc "until curl -f --retry 30 --retry-connrefused http://127.0.0.1:8080; do sleep 3; done"
 
-	limactl shell "$NAME" $CONTAINER_ENGINE rm -f nginx
+	limactl shell "$NAME" $sudo $CONTAINER_ENGINE rm -f nginx
 	set +x
 	if [[ -n ${CHECKS["mount-home"]} ]]; then
-		hometmp="$HOME/lima-container-engine-test-tmp"
+		hometmp="$HOME_HOST/lima-container-engine-test-tmp"
+		hometmpguest="$HOME_GUEST/lima-container-engine-test-tmp"
 		# test for https://github.com/lima-vm/lima/issues/187
 		INFO "Testing home bind mount (\"$hometmp\")"
 		rm -rf "$hometmp"
 		mkdir -p "$hometmp"
 		defer "rm -rf \"$hometmp\""
 		set -x
-		limactl shell "$NAME" $CONTAINER_ENGINE pull --quiet ${alpine_image}
+		limactl shell "$NAME" $sudo $CONTAINER_ENGINE pull --quiet ${alpine_image}
 		echo "random-content-${RANDOM}" >"$hometmp/random"
 		expected="$(cat "$hometmp/random")"
-		got="$(limactl shell "$NAME" $CONTAINER_ENGINE run --rm -v "$hometmp/random":/mnt/foo ${alpine_image} cat /mnt/foo)"
+		got="$(limactl shell "$NAME" $sudo $CONTAINER_ENGINE run --rm -v "$hometmpguest/random":/mnt/foo ${alpine_image} cat /mnt/foo)"
 		INFO "$hometmp/random: expected=${expected}, got=${got}"
 		if [ "$got" != "$expected" ]; then
 			ERROR "Home directory is not shared?"
@@ -284,6 +324,9 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
 	if [ "${NAME}" = "opensuse" ]; then
 		limactl shell "$NAME" sudo zypper in -y netcat-openbsd
 	fi
+	if limactl shell "$NAME" command -v dnf; then
+		limactl shell "$NAME" sudo dnf install -y nc
+	fi
 	"${scriptdir}/test-port-forwarding.pl" "${NAME}"
 
 	if [[ -n ${CHECKS["container-engine"]} || ${NAME} == "alpine"* ]]; then
@@ -306,6 +349,10 @@ if [[ -n ${CHECKS["port-forwards"]} ]]; then
 				rm nerdctl-full.tgz
 				sudo="sudo"
 			fi
+			# Currently WSL2 machines only support privileged engine. This requirement might be lifted in the future.
+			if [[ "$(limactl ls --json "${NAME}" | jq -r .vmType)" == "wsl2" ]]; then
+				sudo="sudo"
+			fi
 			limactl shell "$NAME" $sudo $CONTAINER_ENGINE info
 			limactl shell "$NAME" $sudo $CONTAINER_ENGINE pull --quiet ${nginx_image}
 
@@ -360,7 +407,8 @@ if [[ -n ${CHECKS["restart"]} ]]; then
 	fi
 
 	INFO "Stopping \"$NAME\""
-	limactl stop "$NAME"
+	# TODO https://github.com/lima-vm/lima/issues/3221
+	limactl stop "$NAME" || [ "${OS_HOST}" = "Msys" ]
 	sleep 3
 
 	if [[ -n ${CHECKS["disk"]} ]]; then
@@ -406,7 +454,7 @@ fi
 if [[ -n ${CHECKS["user-v2"]} ]]; then
 	INFO "Testing user-v2 network"
 	secondvm="$NAME-1"
-	"${LIMACTL_CREATE[@]}" --set ".additionalDisks=null" "$FILE" --name "$secondvm"
+	"${LIMACTL_CREATE[@]}" --set ".additionalDisks=null" "$FILE_HOST" --name "$secondvm"
 	if ! limactl start "$secondvm"; then
 		ERROR "Failed to start \"$secondvm\""
 		diagnose "$secondvm"
@@ -474,7 +522,8 @@ if [[ $NAME == "fedora" && "$(limactl ls --json "$NAME" | jq -r .vmType)" == "vz
 fi
 
 INFO "Stopping \"$NAME\""
-limactl stop "$NAME"
+# TODO https://github.com/lima-vm/lima/issues/3221
+limactl stop "$NAME" || [ "${OS_HOST}" = "Msys" ]
 sleep 3
 
 INFO "Deleting \"$NAME\""
diff --git a/hack/test-upgrade.sh b/hack/test-upgrade.sh
index 8b79bafb..696295f6 100755
--- a/hack/test-upgrade.sh
+++ b/hack/test-upgrade.sh
@@ -1,4 +1,8 @@
 #!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
diff --git a/hack/toolexec-for-codesign.sh b/hack/toolexec-for-codesign.sh
index 1b58d1be..2943385f 100755
--- a/hack/toolexec-for-codesign.sh
+++ b/hack/toolexec-for-codesign.sh
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script is used to wrap the compiler and linker commands in the build
 # process. It captures the output of the command and logs it to a file.
 # The script's primary purpose is codesigning the output of the linker command
diff --git a/hack/update-template-almalinux.sh b/hack/update-template-almalinux.sh
index 6613f7f8..8f3076aa 100755
--- a/hack/update-template-almalinux.sh
+++ b/hack/update-template-almalinux.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-alpine.sh b/hack/update-template-alpine.sh
index 1c745572..c2dbce82 100755
--- a/hack/update-template-alpine.sh
+++ b/hack/update-template-alpine.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-archlinux.sh b/hack/update-template-archlinux.sh
index 6a2a53db..a3fd6c58 100755
--- a/hack/update-template-archlinux.sh
+++ b/hack/update-template-archlinux.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-centos-stream.sh b/hack/update-template-centos-stream.sh
index 01ebe327..b6142484 100755
--- a/hack/update-template-centos-stream.sh
+++ b/hack/update-template-centos-stream.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-debian.sh b/hack/update-template-debian.sh
index 044ebc81..d7feee70 100755
--- a/hack/update-template-debian.sh
+++ b/hack/update-template-debian.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-fedora.sh b/hack/update-template-fedora.sh
index 39f5bb4d..0386babe 100755
--- a/hack/update-template-fedora.sh
+++ b/hack/update-template-fedora.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-opensuse.sh b/hack/update-template-opensuse.sh
index 02196c42..541e530d 100755
--- a/hack/update-template-opensuse.sh
+++ b/hack/update-template-opensuse.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-oraclelinux.sh b/hack/update-template-oraclelinux.sh
index e487e914..065311e6 100755
--- a/hack/update-template-oraclelinux.sh
+++ b/hack/update-template-oraclelinux.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-rocky.sh b/hack/update-template-rocky.sh
index 989cb318..a83779ec 100755
--- a/hack/update-template-rocky.sh
+++ b/hack/update-template-rocky.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template-ubuntu.sh b/hack/update-template-ubuntu.sh
index 9ac8b4a9..32b373a5 100755
--- a/hack/update-template-ubuntu.sh
+++ b/hack/update-template-ubuntu.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/hack/update-template.sh b/hack/update-template.sh
index 5d965ed7..9fc4b9bf 100755
--- a/hack/update-template.sh
+++ b/hack/update-template.sh
@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu -o pipefail
 
 # Functions in this script assume error handling with 'set -e'.
diff --git a/pkg/autostart/autostart.go b/pkg/autostart/autostart.go
index f95872dd..038b2035 100644
--- a/pkg/autostart/autostart.go
+++ b/pkg/autostart/autostart.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package autostart manage start at login unit files for darwin/linux
 package autostart
 
diff --git a/pkg/bicopy/bicopy.go b/pkg/bicopy/bicopy.go
index 3db68521..db6d44c0 100644
--- a/pkg/bicopy/bicopy.go
+++ b/pkg/bicopy/bicopy.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://raw.githubusercontent.com/norouter/norouter/v0.6.5/pkg/agent/bicopy/bicopy.go
 /*
    Copyright (C) NoRouter authors.
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot.sh b/pkg/cidata/cidata.TEMPLATE.d/boot.sh
index ab65c719..cfdc963c 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu
 
 INFO() {
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/00-alpine-user-group.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/00-alpine-user-group.sh
index cf2ff5f2..e6d25175 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/00-alpine-user-group.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/00-alpine-user-group.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 test -f /etc/alpine-release || exit 0
 
 # Make sure that root is in the sudoers file.
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/00-check-rtc-and-wait-ntp.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/00-check-rtc-and-wait-ntp.sh
index c799e9c1..b8a93333 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/00-check-rtc-and-wait-ntp.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/00-check-rtc-and-wait-ntp.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu
 
 # In vz, the VM lacks an RTC when booting with a kernel image (see: https://developer.apple.com/forums/thread/760344).
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh
index 6dea53fd..599dae52 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # Load modules as soon as the cloud-init starts up.
 # Because Arch Linux removes kernel module files when the kernel package was updated during running cloud-init :(
 
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/00-reboot-if-required.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/00-reboot-if-required.sh
index 968181a1..fe75c1ae 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/00-reboot-if-required.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/00-reboot-if-required.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 # Check if cloud-init forgot to reboot_if_required
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/01-alpine-ash-as-bash.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/01-alpine-ash-as-bash.sh
index f7e54019..a06e4770 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/01-alpine-ash-as-bash.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/01-alpine-ash-as-bash.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script pretends that /bin/ash can be used as /bin/bash, so all following
 # cloud-init scripts can use `#!/bin/bash` and `set -o pipefail`.
 test -f /etc/alpine-release || exit 0
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/02-wsl2-setup.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/02-wsl2-setup.sh
index 68391712..ec187e3c 100755
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/02-wsl2-setup.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/02-wsl2-setup.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # This script replaces the cloud-init functionality of creating a user and setting its SSH keys
 # when using a WSL2 VM.
 [ "$LIMA_CIDATA_VMTYPE" = "wsl2" ] || exit 0
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh
index 423538f3..9fb14246 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/04-persistent-data-volume.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 # bash is used for enabling `set -o pipefail`.
 # NOTE: On Alpine, /bin/bash is ash with ASH_BASH_COMPAT, not GNU bash
 set -eux -o pipefail
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-disks.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-disks.sh
index a8a7726d..d4816f9b 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-disks.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-disks.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux -o pipefail
 
 test "$LIMA_CIDATA_DISKS" -gt 0 || exit 0
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-mounts.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-mounts.sh
index 47298c75..adc7d2f7 100755
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-mounts.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/05-lima-mounts.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux -o pipefail
 
 # Check if mount type is virtiofs and vm type as vz
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/05-rosetta-volume.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/05-rosetta-volume.sh
index 42bc069b..4a43ff3f 100755
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/05-rosetta-volume.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/05-rosetta-volume.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux -o pipefail
 
 if [ "$LIMA_CIDATA_ROSETTA_ENABLED" != "true" ]; then
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/06-etc-hosts.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/06-etc-hosts.sh
index 97b5cdfd..683397ad 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/06-etc-hosts.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/06-etc-hosts.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux -o pipefail
 
 # Define host.lima.internal in case the hostResolver is disabled. When using
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/07-etc-environment.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/07-etc-environment.sh
index 245678de..2083adcb 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/07-etc-environment.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/07-etc-environment.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 # /etc/environment must be written after 04-persistent-data-volume.sh has run to
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh
index 9edb33a4..3430a2df 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 # This script is only intended for the default.yaml image, which is based on Ubuntu LTS
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/09-host-dns-setup.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/09-host-dns-setup.sh
index ee14366f..7bd1aac4 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/09-host-dns-setup.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/09-host-dns-setup.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 readonly chain=LIMADNS
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh
index 606f5d6c..d1057821 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/10-alpine-prep.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 # This script prepares Alpine for lima; there is nothing in here for other distros
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/11-colorterm-environment.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/11-colorterm-environment.sh
index 1142fac3..5a09fa92 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/11-colorterm-environment.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/11-colorterm-environment.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 if [ -d /etc/ssh/sshd_config.d ]; then
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
index c5907a92..0af775b0 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 # This script does not work unless systemd is available
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/25-guestagent-base.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/25-guestagent-base.sh
index 893b92eb..d48b2846 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/25-guestagent-base.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/25-guestagent-base.sh
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 if [ "${LIMA_CIDATA_MOUNTTYPE}" = "reverse-sshfs" ]; then
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh
index 8ede9790..b1d3a6ca 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 INSTALL_IPTABLES=0
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/35-setup-packages.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/35-setup-packages.sh
index 8084da70..3c26a9b0 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/35-setup-packages.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/35-setup-packages.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 
 update_fuse_conf() {
diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh
index 3ab3df4e..aa7843b2 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot/40-install-containerd.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eux
 : "${CONTAINERD_NAMESPACE:=default}"
 # Overridable in .bashrc
diff --git a/pkg/cidata/cidata.TEMPLATE.d/util/compare_version.sh b/pkg/cidata/cidata.TEMPLATE.d/util/compare_version.sh
index b1d63a9c..e3cf3085 100755
--- a/pkg/cidata/cidata.TEMPLATE.d/util/compare_version.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/util/compare_version.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
+
 set -eu
 
 : "${SELFTEST:=}"
diff --git a/pkg/cidata/cidata.go b/pkg/cidata/cidata.go
index abd2ccf4..376bad7d 100644
--- a/pkg/cidata/cidata.go
+++ b/pkg/cidata/cidata.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package cidata
 
 import (
diff --git a/pkg/cidata/template.go b/pkg/cidata/template.go
index b2287f6e..4acd8535 100644
--- a/pkg/cidata/template.go
+++ b/pkg/cidata/template.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package cidata
 
 import (
diff --git a/pkg/debugutil/debugutil.go b/pkg/debugutil/debugutil.go
index 241a2069..3586d001 100644
--- a/pkg/debugutil/debugutil.go
+++ b/pkg/debugutil/debugutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package debugutil
 
 // Debug is set via main.
diff --git a/pkg/downloader/downloader.go b/pkg/downloader/downloader.go
index dd25f17d..785261ea 100644
--- a/pkg/downloader/downloader.go
+++ b/pkg/downloader/downloader.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package downloader
 
 import (
diff --git a/pkg/driver/driver.go b/pkg/driver/driver.go
index 1d44e32e..457265ae 100644
--- a/pkg/driver/driver.go
+++ b/pkg/driver/driver.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package driver
 
 import (
diff --git a/pkg/driverutil/driverutil.go b/pkg/driverutil/driverutil.go
index a0d12787..eb27833e 100644
--- a/pkg/driverutil/driverutil.go
+++ b/pkg/driverutil/driverutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package driverutil
 
 import (
diff --git a/pkg/driverutil/instance.go b/pkg/driverutil/instance.go
index f93b3854..d7c443ff 100644
--- a/pkg/driverutil/instance.go
+++ b/pkg/driverutil/instance.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package driverutil
 
 import (
diff --git a/pkg/editutil/editorcmd/editorcmd.go b/pkg/editutil/editorcmd/editorcmd.go
index 3488079d..796f38dd 100644
--- a/pkg/editutil/editorcmd/editorcmd.go
+++ b/pkg/editutil/editorcmd/editorcmd.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://raw.githubusercontent.com/norouter/norouter/v0.6.5/cmd/norouter/editorcmd/editorcmd.go
 /*
    Copyright (C) NoRouter authors.
diff --git a/pkg/editutil/editutil.go b/pkg/editutil/editutil.go
index 298beffa..a8a172cd 100644
--- a/pkg/editutil/editutil.go
+++ b/pkg/editutil/editutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package editutil
 
 import (
diff --git a/pkg/executil/command.go b/pkg/executil/command.go
index 8290f8a9..22f374d0 100644
--- a/pkg/executil/command.go
+++ b/pkg/executil/command.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package executil
 
 import (
diff --git a/pkg/executil/opts_others.go b/pkg/executil/opts_others.go
index 41c5479a..64adc0e9 100644
--- a/pkg/executil/opts_others.go
+++ b/pkg/executil/opts_others.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package executil
 
 import (
diff --git a/pkg/executil/opts_windows.go b/pkg/executil/opts_windows.go
index 99f62901..5d31801e 100644
--- a/pkg/executil/opts_windows.go
+++ b/pkg/executil/opts_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package executil
 
 import (
diff --git a/pkg/fileutils/download.go b/pkg/fileutils/download.go
index 97bf6d30..bb54604e 100644
--- a/pkg/fileutils/download.go
+++ b/pkg/fileutils/download.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package fileutils
 
 import (
diff --git a/pkg/freeport/freeport.go b/pkg/freeport/freeport.go
index d4e1a71a..75f7aa94 100644
--- a/pkg/freeport/freeport.go
+++ b/pkg/freeport/freeport.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package freeport provides functions to find free localhost ports.
 package freeport
 
diff --git a/pkg/freeport/freeport_unix.go b/pkg/freeport/freeport_unix.go
index 180e0362..bc4c0e73 100644
--- a/pkg/freeport/freeport_unix.go
+++ b/pkg/freeport/freeport_unix.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package freeport
 
 import "errors"
diff --git a/pkg/freeport/freeport_windows.go b/pkg/freeport/freeport_windows.go
index 48bef99d..6fdbf8f0 100644
--- a/pkg/freeport/freeport_windows.go
+++ b/pkg/freeport/freeport_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package freeport
 
 import "github.com/lima-vm/lima/pkg/windows"
diff --git a/pkg/fsutil/fsutil_linux.go b/pkg/fsutil/fsutil_linux.go
index 101f8d65..cd87951e 100644
--- a/pkg/fsutil/fsutil_linux.go
+++ b/pkg/fsutil/fsutil_linux.go
@@ -1,4 +1,5 @@
-//go:build linux
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
 
 package fsutil
 
diff --git a/pkg/fsutil/fsutil_others.go b/pkg/fsutil/fsutil_others.go
index c85cd346..868e242b 100644
--- a/pkg/fsutil/fsutil_others.go
+++ b/pkg/fsutil/fsutil_others.go
@@ -1,5 +1,8 @@
 //go:build !linux
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package fsutil
 
 func IsNFS(string) (bool, error) {
diff --git a/pkg/guestagent/api/client/client.go b/pkg/guestagent/api/client/client.go
index d4bdf27e..934d1534 100644
--- a/pkg/guestagent/api/client/client.go
+++ b/pkg/guestagent/api/client/client.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package client
 
 import (
diff --git a/pkg/guestagent/api/client/credentials.go b/pkg/guestagent/api/client/credentials.go
index 76470f14..a64f8ae7 100644
--- a/pkg/guestagent/api/client/credentials.go
+++ b/pkg/guestagent/api/client/credentials.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package client
 
 import (
diff --git a/pkg/guestagent/api/gen.go b/pkg/guestagent/api/gen.go
index 9822947f..d0980afc 100644
--- a/pkg/guestagent/api/gen.go
+++ b/pkg/guestagent/api/gen.go
@@ -1,3 +1,6 @@
 //go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative guestservice.proto --descriptor_set_out=guestservice.pb.desc
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package api
diff --git a/pkg/guestagent/api/ipport.go b/pkg/guestagent/api/ipport.go
index 504d8a03..adf2a66d 100644
--- a/pkg/guestagent/api/ipport.go
+++ b/pkg/guestagent/api/ipport.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package api
 
 import (
diff --git a/pkg/guestagent/api/server/server.go b/pkg/guestagent/api/server/server.go
index 8c4fcde2..84018613 100644
--- a/pkg/guestagent/api/server/server.go
+++ b/pkg/guestagent/api/server/server.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package server
 
 import (
diff --git a/pkg/guestagent/guestagent.go b/pkg/guestagent/guestagent.go
index b84e29fe..b63f6e00 100644
--- a/pkg/guestagent/guestagent.go
+++ b/pkg/guestagent/guestagent.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package guestagent
 
 import (
diff --git a/pkg/guestagent/guestagent_linux.go b/pkg/guestagent/guestagent_linux.go
index 69fc3baf..91d1c4d5 100644
--- a/pkg/guestagent/guestagent_linux.go
+++ b/pkg/guestagent/guestagent_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package guestagent
 
 import (
diff --git a/pkg/guestagent/iptables/iptables.go b/pkg/guestagent/iptables/iptables.go
index a997a80d..294c2e58 100644
--- a/pkg/guestagent/iptables/iptables.go
+++ b/pkg/guestagent/iptables/iptables.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package iptables
 
 import (
diff --git a/pkg/guestagent/kubernetesservice/kubernetesservice.go b/pkg/guestagent/kubernetesservice/kubernetesservice.go
index 45d21d46..62668e31 100644
--- a/pkg/guestagent/kubernetesservice/kubernetesservice.go
+++ b/pkg/guestagent/kubernetesservice/kubernetesservice.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package kubernetesservice
 
 import (
diff --git a/pkg/guestagent/procnettcp/procnettcp.go b/pkg/guestagent/procnettcp/procnettcp.go
index 3018a0fa..a1145705 100644
--- a/pkg/guestagent/procnettcp/procnettcp.go
+++ b/pkg/guestagent/procnettcp/procnettcp.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package procnettcp
 
 import (
diff --git a/pkg/guestagent/procnettcp/procnettcp_linux.go b/pkg/guestagent/procnettcp/procnettcp_linux.go
index d1c632ee..ae39224f 100644
--- a/pkg/guestagent/procnettcp/procnettcp_linux.go
+++ b/pkg/guestagent/procnettcp/procnettcp_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package procnettcp
 
 import (
diff --git a/pkg/guestagent/serialport/serialconn_linux.go b/pkg/guestagent/serialport/serialconn_linux.go
index 73fffceb..dc3211ec 100644
--- a/pkg/guestagent/serialport/serialconn_linux.go
+++ b/pkg/guestagent/serialport/serialconn_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package serialport
 
 import (
diff --git a/pkg/guestagent/serialport/seriallistener_linux.go b/pkg/guestagent/serialport/seriallistener_linux.go
index 1a2ec617..ad33482f 100644
--- a/pkg/guestagent/serialport/seriallistener_linux.go
+++ b/pkg/guestagent/serialport/seriallistener_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package serialport
 
 import (
diff --git a/pkg/guestagent/serialport/serialport_linux.go b/pkg/guestagent/serialport/serialport_linux.go
index 63b4c303..53fb28b4 100644
--- a/pkg/guestagent/serialport/serialport_linux.go
+++ b/pkg/guestagent/serialport/serialport_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package serialport
 
 import (
diff --git a/pkg/guestagent/timesync/timesync_linux.go b/pkg/guestagent/timesync/timesync_linux.go
index 38f88fc8..af613006 100644
--- a/pkg/guestagent/timesync/timesync_linux.go
+++ b/pkg/guestagent/timesync/timesync_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package timesync
 
 import (
diff --git a/pkg/hostagent/api/api.go b/pkg/hostagent/api/api.go
index 09b07915..f86de58e 100644
--- a/pkg/hostagent/api/api.go
+++ b/pkg/hostagent/api/api.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package api
 
 type Info struct {
diff --git a/pkg/hostagent/api/client/client.go b/pkg/hostagent/api/client/client.go
index 5fbf9d3d..118c5290 100644
--- a/pkg/hostagent/api/client/client.go
+++ b/pkg/hostagent/api/client/client.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package client
 
 // Forked from https://github.com/rootless-containers/rootlesskit/blob/v0.14.2/pkg/api/client/client.go
diff --git a/pkg/hostagent/api/server/server.go b/pkg/hostagent/api/server/server.go
index bf3c5e97..b75c527f 100644
--- a/pkg/hostagent/api/server/server.go
+++ b/pkg/hostagent/api/server/server.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package server
 
 import (
diff --git a/pkg/hostagent/dns/dns.go b/pkg/hostagent/dns/dns.go
index 10454905..e6d310a4 100644
--- a/pkg/hostagent/dns/dns.go
+++ b/pkg/hostagent/dns/dns.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // This file has been adapted from https://github.com/norouter/norouter/blob/v0.6.4/pkg/agent/dns/dns.go
 
 package dns
diff --git a/pkg/hostagent/events/events.go b/pkg/hostagent/events/events.go
index f7d6b4a1..4752d980 100644
--- a/pkg/hostagent/events/events.go
+++ b/pkg/hostagent/events/events.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package events
 
 import (
diff --git a/pkg/hostagent/events/watcher.go b/pkg/hostagent/events/watcher.go
index 0ff8f2d7..8d1fca47 100644
--- a/pkg/hostagent/events/watcher.go
+++ b/pkg/hostagent/events/watcher.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package events
 
 import (
diff --git a/pkg/hostagent/hostagent.go b/pkg/hostagent/hostagent.go
index 396401a4..248e76bd 100644
--- a/pkg/hostagent/hostagent.go
+++ b/pkg/hostagent/hostagent.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/hostagent_unix.go b/pkg/hostagent/hostagent_unix.go
index 68d8dd66..dfc5ee31 100644
--- a/pkg/hostagent/hostagent_unix.go
+++ b/pkg/hostagent/hostagent_unix.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/hostagent_windows.go b/pkg/hostagent/hostagent_windows.go
index c5bec8b3..5b91c2cc 100644
--- a/pkg/hostagent/hostagent_windows.go
+++ b/pkg/hostagent/hostagent_windows.go
@@ -1,4 +1,5 @@
-//go:build windows
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
 
 package hostagent
 
diff --git a/pkg/hostagent/inotify.go b/pkg/hostagent/inotify.go
index e24f1a9b..ca810fac 100644
--- a/pkg/hostagent/inotify.go
+++ b/pkg/hostagent/inotify.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/inotify_darwin.go b/pkg/hostagent/inotify_darwin.go
index 77a1a675..821cb805 100644
--- a/pkg/hostagent/inotify_darwin.go
+++ b/pkg/hostagent/inotify_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import "github.com/rjeczalik/notify"
diff --git a/pkg/hostagent/inotify_linux.go b/pkg/hostagent/inotify_linux.go
index dca99f4f..ff22e4d1 100644
--- a/pkg/hostagent/inotify_linux.go
+++ b/pkg/hostagent/inotify_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import "github.com/rjeczalik/notify"
diff --git a/pkg/hostagent/inotify_others.go b/pkg/hostagent/inotify_others.go
index c954b328..e3911b06 100644
--- a/pkg/hostagent/inotify_others.go
+++ b/pkg/hostagent/inotify_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin && !linux
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import "github.com/rjeczalik/notify"
diff --git a/pkg/hostagent/mount.go b/pkg/hostagent/mount.go
index 646dc5d4..f8088bfc 100644
--- a/pkg/hostagent/mount.go
+++ b/pkg/hostagent/mount.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/port.go b/pkg/hostagent/port.go
index bfb86d1c..040d7594 100644
--- a/pkg/hostagent/port.go
+++ b/pkg/hostagent/port.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/port_darwin.go b/pkg/hostagent/port_darwin.go
index a99897b6..5ac63b41 100644
--- a/pkg/hostagent/port_darwin.go
+++ b/pkg/hostagent/port_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/port_others.go b/pkg/hostagent/port_others.go
index c038e6c3..8d218c25 100644
--- a/pkg/hostagent/port_others.go
+++ b/pkg/hostagent/port_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin && !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/port_windows.go b/pkg/hostagent/port_windows.go
index 6a3d74e1..d8d19f0c 100644
--- a/pkg/hostagent/port_windows.go
+++ b/pkg/hostagent/port_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/hostagent/requirements.go b/pkg/hostagent/requirements.go
index 00908655..42db08fe 100644
--- a/pkg/hostagent/requirements.go
+++ b/pkg/hostagent/requirements.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package hostagent
 
 import (
diff --git a/pkg/httpclientutil/httpclientutil.go b/pkg/httpclientutil/httpclientutil.go
index 59854545..f2092d91 100644
--- a/pkg/httpclientutil/httpclientutil.go
+++ b/pkg/httpclientutil/httpclientutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package httpclientutil
 
 // Forked from https://github.com/rootless-containers/rootlesskit/blob/v0.14.2/pkg/api/client/client.go
diff --git a/pkg/httpclientutil/httpclientutil_others.go b/pkg/httpclientutil/httpclientutil_others.go
index e3b4315f..3baf2c59 100644
--- a/pkg/httpclientutil/httpclientutil_others.go
+++ b/pkg/httpclientutil/httpclientutil_others.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package httpclientutil
 
 import (
diff --git a/pkg/httpclientutil/httpclientutil_windows.go b/pkg/httpclientutil/httpclientutil_windows.go
index c6959744..cdd23415 100644
--- a/pkg/httpclientutil/httpclientutil_windows.go
+++ b/pkg/httpclientutil/httpclientutil_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package httpclientutil
 
 import (
diff --git a/pkg/httputil/httputil.go b/pkg/httputil/httputil.go
index 32f2cdb1..b5d073d6 100644
--- a/pkg/httputil/httputil.go
+++ b/pkg/httputil/httputil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package httputil
 
 // ErrorJSON is returned with "application/json" content type and non-2XX status code.
diff --git a/pkg/identifierutil/identifierutil.go b/pkg/identifierutil/identifierutil.go
index e9a23f0d..8f950fce 100644
--- a/pkg/identifierutil/identifierutil.go
+++ b/pkg/identifierutil/identifierutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package identifierutil
 
 import "strings"
diff --git a/pkg/infoutil/infoutil.go b/pkg/infoutil/infoutil.go
index 19884e3b..c3c2469b 100644
--- a/pkg/infoutil/infoutil.go
+++ b/pkg/infoutil/infoutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package infoutil
 
 import (
diff --git a/pkg/instance/ansible.go b/pkg/instance/ansible.go
index 28d40085..ad424415 100644
--- a/pkg/instance/ansible.go
+++ b/pkg/instance/ansible.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package instance
 
 import (
diff --git a/pkg/instance/create.go b/pkg/instance/create.go
index 4941efbc..b9088785 100644
--- a/pkg/instance/create.go
+++ b/pkg/instance/create.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package instance
 
 import (
diff --git a/pkg/instance/delete.go b/pkg/instance/delete.go
index 48cedd18..c4078d48 100644
--- a/pkg/instance/delete.go
+++ b/pkg/instance/delete.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package instance
 
 import (
diff --git a/pkg/instance/start.go b/pkg/instance/start.go
index 80b4dc44..b53de081 100644
--- a/pkg/instance/start.go
+++ b/pkg/instance/start.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package instance
 
 import (
diff --git a/pkg/instance/stop.go b/pkg/instance/stop.go
index ba42aa88..b98eb806 100644
--- a/pkg/instance/stop.go
+++ b/pkg/instance/stop.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package instance
 
 import (
diff --git a/pkg/ioutilx/ioutilx.go b/pkg/ioutilx/ioutilx.go
index efee8203..ea1fcf1e 100644
--- a/pkg/ioutilx/ioutilx.go
+++ b/pkg/ioutilx/ioutilx.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package ioutilx
 
 import (
diff --git a/pkg/iso9660util/iso9660util.go b/pkg/iso9660util/iso9660util.go
index 149b3d41..45b82982 100644
--- a/pkg/iso9660util/iso9660util.go
+++ b/pkg/iso9660util/iso9660util.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package iso9660util
 
 import (
diff --git a/pkg/limatmpl/locator.go b/pkg/limatmpl/locator.go
index ddb9b61b..1a6abc03 100644
--- a/pkg/limatmpl/locator.go
+++ b/pkg/limatmpl/locator.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limatmpl
 
 import (
diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go
index 8ea2f385..342ec2e4 100644
--- a/pkg/limayaml/defaults.go
+++ b/pkg/limayaml/defaults.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/limayaml.go b/pkg/limayaml/limayaml.go
index 3f4e8520..f9990f45 100644
--- a/pkg/limayaml/limayaml.go
+++ b/pkg/limayaml/limayaml.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/load.go b/pkg/limayaml/load.go
index 58a47a0a..87cb4890 100644
--- a/pkg/limayaml/load.go
+++ b/pkg/limayaml/load.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/marshal.go b/pkg/limayaml/marshal.go
index f0694636..051769c9 100644
--- a/pkg/limayaml/marshal.go
+++ b/pkg/limayaml/marshal.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/validate.go b/pkg/limayaml/validate.go
index e60e3740..111719bd 100644
--- a/pkg/limayaml/validate.go
+++ b/pkg/limayaml/validate.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/localpathutil/localpathutil.go b/pkg/localpathutil/localpathutil.go
index ba5124dc..3081763b 100644
--- a/pkg/localpathutil/localpathutil.go
+++ b/pkg/localpathutil/localpathutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package localpathutil
 
 import (
diff --git a/pkg/lockutil/lockutil_unix.go b/pkg/lockutil/lockutil_unix.go
index 1c9e18c1..0679b7c2 100644
--- a/pkg/lockutil/lockutil_unix.go
+++ b/pkg/lockutil/lockutil_unix.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://github.com/containerd/nerdctl/blob/v0.13.0/pkg/lockutil/lockutil_unix.go
 /*
    Copyright The containerd Authors.
diff --git a/pkg/lockutil/lockutil_windows.go b/pkg/lockutil/lockutil_windows.go
index f191559a..6653ae3f 100644
--- a/pkg/lockutil/lockutil_windows.go
+++ b/pkg/lockutil/lockutil_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://github.com/containerd/nerdctl/blob/v0.13.0/pkg/lockutil/lockutil_windows.go
 /*
    Copyright The containerd Authors.
diff --git a/pkg/logrusutil/logrusutil.go b/pkg/logrusutil/logrusutil.go
index 98a76d9d..109c2981 100644
--- a/pkg/logrusutil/logrusutil.go
+++ b/pkg/logrusutil/logrusutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package logrusutil
 
 import (
diff --git a/pkg/must/must.go b/pkg/must/must.go
index 8dbada99..cec07544 100644
--- a/pkg/must/must.go
+++ b/pkg/must/must.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package must
 
 func Must[T any](obj T, err error) T {
diff --git a/pkg/nativeimgutil/nativeimgutil.go b/pkg/nativeimgutil/nativeimgutil.go
index 3f2a368a..eca397c9 100644
--- a/pkg/nativeimgutil/nativeimgutil.go
+++ b/pkg/nativeimgutil/nativeimgutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package nativeimgutil provides image utilities that do not depend on `qemu-img` binary.
 package nativeimgutil
 
diff --git a/pkg/networks/commands.go b/pkg/networks/commands.go
index 8003812d..c5bccc5f 100644
--- a/pkg/networks/commands.go
+++ b/pkg/networks/commands.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/config.go b/pkg/networks/config.go
index a7707d36..984a7a51 100644
--- a/pkg/networks/config.go
+++ b/pkg/networks/config.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/const.go b/pkg/networks/const.go
index 16671fd6..8baf4920 100644
--- a/pkg/networks/const.go
+++ b/pkg/networks/const.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 const (
diff --git a/pkg/networks/networks.go b/pkg/networks/networks.go
index cf2d376b..12a1555d 100644
--- a/pkg/networks/networks.go
+++ b/pkg/networks/networks.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import "net"
diff --git a/pkg/networks/reconcile/reconcile.go b/pkg/networks/reconcile/reconcile.go
index c40ab4b3..35c269ef 100644
--- a/pkg/networks/reconcile/reconcile.go
+++ b/pkg/networks/reconcile/reconcile.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/sudoers.go b/pkg/networks/sudoers.go
index 08a45f59..3b15fdd4 100644
--- a/pkg/networks/sudoers.go
+++ b/pkg/networks/sudoers.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/usernet/client.go b/pkg/networks/usernet/client.go
index 94e372ab..014b9397 100644
--- a/pkg/networks/usernet/client.go
+++ b/pkg/networks/usernet/client.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/usernet/config.go b/pkg/networks/usernet/config.go
index ec0f0d84..76940d60 100644
--- a/pkg/networks/usernet/config.go
+++ b/pkg/networks/usernet/config.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/usernet/dnshosts/dnshosts.go b/pkg/networks/usernet/dnshosts/dnshosts.go
index 6d0f4501..00272f3b 100644
--- a/pkg/networks/usernet/dnshosts/dnshosts.go
+++ b/pkg/networks/usernet/dnshosts/dnshosts.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://raw.githubusercontent.com/abiosoft/colima/v0.5.5/daemon/process/gvproxy/dnshosts_test.go
 /*
 	MIT License
diff --git a/pkg/networks/usernet/gvproxy.go b/pkg/networks/usernet/gvproxy.go
index 02c86e89..814dab0f 100644
--- a/pkg/networks/usernet/gvproxy.go
+++ b/pkg/networks/usernet/gvproxy.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/usernet/recoincile.go b/pkg/networks/usernet/recoincile.go
index d0026654..7304e724 100644
--- a/pkg/networks/usernet/recoincile.go
+++ b/pkg/networks/usernet/recoincile.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/usernet/udpfileconn.go b/pkg/networks/usernet/udpfileconn.go
index fa804d5c..96b64e3d 100644
--- a/pkg/networks/usernet/udpfileconn.go
+++ b/pkg/networks/usernet/udpfileconn.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/validate.go b/pkg/networks/validate.go
index 8f11dfdc..4ae9eaf2 100644
--- a/pkg/networks/validate.go
+++ b/pkg/networks/validate.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/osutil/dns_darwin.go b/pkg/osutil/dns_darwin.go
index a1949cb9..01358be6 100644
--- a/pkg/osutil/dns_darwin.go
+++ b/pkg/osutil/dns_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/dns_others.go b/pkg/osutil/dns_others.go
index e02f804c..032974d7 100644
--- a/pkg/osutil/dns_others.go
+++ b/pkg/osutil/dns_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 func DNSAddresses() ([]string, error) {
diff --git a/pkg/osutil/machineid.go b/pkg/osutil/machineid.go
index caf1be3e..4bdc6e17 100644
--- a/pkg/osutil/machineid.go
+++ b/pkg/osutil/machineid.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osutil_linux.go b/pkg/osutil/osutil_linux.go
index f4a1d1ef..cec55451 100644
--- a/pkg/osutil/osutil_linux.go
+++ b/pkg/osutil/osutil_linux.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osutil_others.go b/pkg/osutil/osutil_others.go
index ace79fd0..e10d5f9d 100644
--- a/pkg/osutil/osutil_others.go
+++ b/pkg/osutil/osutil_others.go
@@ -1,5 +1,8 @@
 //go:build !linux && !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osutil_unix.go b/pkg/osutil/osutil_unix.go
index a8764a8c..e220c472 100644
--- a/pkg/osutil/osutil_unix.go
+++ b/pkg/osutil/osutil_unix.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osutil_windows.go b/pkg/osutil/osutil_windows.go
index 4849597d..ead56d70 100644
--- a/pkg/osutil/osutil_windows.go
+++ b/pkg/osutil/osutil_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osversion_darwin.go b/pkg/osutil/osversion_darwin.go
index 6c72c983..477a1c00 100644
--- a/pkg/osutil/osversion_darwin.go
+++ b/pkg/osutil/osversion_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/osversion_others.go b/pkg/osutil/osversion_others.go
index c54d0f1d..2d2781fb 100644
--- a/pkg/osutil/osversion_others.go
+++ b/pkg/osutil/osversion_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/rosetta_darwin.go b/pkg/osutil/rosetta_darwin.go
index 48e58ae7..d0b1069d 100644
--- a/pkg/osutil/rosetta_darwin.go
+++ b/pkg/osutil/rosetta_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/rosetta_others.go b/pkg/osutil/rosetta_others.go
index 71170313..c9e9ba27 100644
--- a/pkg/osutil/rosetta_others.go
+++ b/pkg/osutil/rosetta_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 func IsBeingRosettaTranslated() bool {
diff --git a/pkg/osutil/user.go b/pkg/osutil/user.go
index d1883c59..ce72c98c 100644
--- a/pkg/osutil/user.go
+++ b/pkg/osutil/user.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
@@ -144,6 +147,8 @@ func LimaUser(limaVersion string, warn bool) *user.User {
 			home, err := call([]string{"cygpath", limaUser.HomeDir})
 			if err != nil {
 				logrus.Debug(err)
+			} else {
+				home += ".linux"
 			}
 			if home == "" {
 				drive := filepath.VolumeName(limaUser.HomeDir)
@@ -151,6 +156,7 @@ func LimaUser(limaVersion string, warn bool) *user.User {
 				// replace C: with /c
 				prefix := strings.ToLower(fmt.Sprintf("/%c", drive[0]))
 				home = strings.Replace(home, drive, prefix, 1)
+				home += ".linux"
 			}
 			if !regexPath.MatchString(limaUser.HomeDir) {
 				warning := fmt.Sprintf("local home %q is not a valid Linux path (must match %q); using %q home instead",
diff --git a/pkg/portfwd/client.go b/pkg/portfwd/client.go
index 0f104fdf..1c24c069 100644
--- a/pkg/portfwd/client.go
+++ b/pkg/portfwd/client.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwd/control_others.go b/pkg/portfwd/control_others.go
index 82f1c890..d6e666ac 100644
--- a/pkg/portfwd/control_others.go
+++ b/pkg/portfwd/control_others.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwd/control_windows.go b/pkg/portfwd/control_windows.go
index d9e3dc04..db41ab11 100644
--- a/pkg/portfwd/control_windows.go
+++ b/pkg/portfwd/control_windows.go
@@ -1,10 +1,12 @@
-//go:build windows
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
 
 package portfwd
 
 import (
-	"golang.org/x/sys/windows"
 	"syscall"
+
+	"golang.org/x/sys/windows"
 )
 
 func Control(_, _ string, c syscall.RawConn) (err error) {
diff --git a/pkg/portfwd/forward.go b/pkg/portfwd/forward.go
index e6475dfa..846fb98b 100644
--- a/pkg/portfwd/forward.go
+++ b/pkg/portfwd/forward.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwd/listener.go b/pkg/portfwd/listener.go
index 9911edcb..edd798f0 100644
--- a/pkg/portfwd/listener.go
+++ b/pkg/portfwd/listener.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwd/listener_darwin.go b/pkg/portfwd/listener_darwin.go
index d5f83a7c..f884550f 100644
--- a/pkg/portfwd/listener_darwin.go
+++ b/pkg/portfwd/listener_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwd/listener_others.go b/pkg/portfwd/listener_others.go
index 74473f7b..bab11084 100644
--- a/pkg/portfwd/listener_others.go
+++ b/pkg/portfwd/listener_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwd
 
 import (
diff --git a/pkg/portfwdserver/server.go b/pkg/portfwdserver/server.go
index 985fbeb3..54f48a6e 100644
--- a/pkg/portfwdserver/server.go
+++ b/pkg/portfwdserver/server.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package portfwdserver
 
 import (
diff --git a/pkg/progressbar/progressbar.go b/pkg/progressbar/progressbar.go
index eea971df..32e8b1d6 100644
--- a/pkg/progressbar/progressbar.go
+++ b/pkg/progressbar/progressbar.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package progressbar
 
 import (
diff --git a/pkg/ptr/ptr.go b/pkg/ptr/ptr.go
index 4fb6d49d..c3640b2f 100644
--- a/pkg/ptr/ptr.go
+++ b/pkg/ptr/ptr.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package ptr holds utilities for taking pointer references to values.
 package ptr
 
diff --git a/pkg/qemu/entitlementutil/entitlementutil.go b/pkg/qemu/entitlementutil/entitlementutil.go
index 9d73581e..afe2db96 100644
--- a/pkg/qemu/entitlementutil/entitlementutil.go
+++ b/pkg/qemu/entitlementutil/entitlementutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package entitlementutil provides a workaround for https://github.com/lima-vm/lima/issues/1742
 package entitlementutil
 
diff --git a/pkg/qemu/imgutil/imgutil.go b/pkg/qemu/imgutil/imgutil.go
index d181161f..2fffbfd1 100644
--- a/pkg/qemu/imgutil/imgutil.go
+++ b/pkg/qemu/imgutil/imgutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package imgutil
 
 import (
diff --git a/pkg/qemu/qemu.go b/pkg/qemu/qemu.go
index 13cb263e..ede6686c 100644
--- a/pkg/qemu/qemu.go
+++ b/pkg/qemu/qemu.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package qemu
 
 import (
diff --git a/pkg/qemu/qemu_driver.go b/pkg/qemu/qemu_driver.go
index 23b75488..81d7739a 100644
--- a/pkg/qemu/qemu_driver.go
+++ b/pkg/qemu/qemu_driver.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package qemu
 
 import (
diff --git a/pkg/reflectutil/reflectutil.go b/pkg/reflectutil/reflectutil.go
index 7cdd5f5a..1a49df09 100644
--- a/pkg/reflectutil/reflectutil.go
+++ b/pkg/reflectutil/reflectutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // This file has been adapted from https://github.com/containerd/nerdctl/blob/v1.0.0/pkg/reflectutil/reflectutil.go
 /*
    Copyright The containerd Authors.
diff --git a/pkg/snapshot/snapshot.go b/pkg/snapshot/snapshot.go
index c6c41730..520a41d9 100644
--- a/pkg/snapshot/snapshot.go
+++ b/pkg/snapshot/snapshot.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package snapshot
 
 import (
diff --git a/pkg/sshutil/format.go b/pkg/sshutil/format.go
index 772b4857..c2efda18 100644
--- a/pkg/sshutil/format.go
+++ b/pkg/sshutil/format.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package sshutil
 
 import (
diff --git a/pkg/sshutil/sshutil.go b/pkg/sshutil/sshutil.go
index 563bc5ed..891279d2 100644
--- a/pkg/sshutil/sshutil.go
+++ b/pkg/sshutil/sshutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package sshutil
 
 import (
diff --git a/pkg/store/dirnames/dirnames.go b/pkg/store/dirnames/dirnames.go
index 1b5a250e..89118ed0 100644
--- a/pkg/store/dirnames/dirnames.go
+++ b/pkg/store/dirnames/dirnames.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package dirnames
 
 import (
diff --git a/pkg/store/disk.go b/pkg/store/disk.go
index aa815d01..c4d0f2a9 100644
--- a/pkg/store/disk.go
+++ b/pkg/store/disk.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/store/filenames/filenames.go b/pkg/store/filenames/filenames.go
index ebb76a0c..659a6af7 100644
--- a/pkg/store/filenames/filenames.go
+++ b/pkg/store/filenames/filenames.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // Package filenames defines the names of the files that appear under an instance dir
 // or inside the config directory.
 //
diff --git a/pkg/store/instance.go b/pkg/store/instance.go
index 7daf4537..2ddd4380 100644
--- a/pkg/store/instance.go
+++ b/pkg/store/instance.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/store/instance_unix.go b/pkg/store/instance_unix.go
index 10b340ab..4f509be3 100644
--- a/pkg/store/instance_unix.go
+++ b/pkg/store/instance_unix.go
@@ -1,5 +1,8 @@
 //go:build !windows
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import "github.com/lima-vm/lima/pkg/limayaml"
diff --git a/pkg/store/instance_windows.go b/pkg/store/instance_windows.go
index d7457ec2..85d5e189 100644
--- a/pkg/store/instance_windows.go
+++ b/pkg/store/instance_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/store/store.go b/pkg/store/store.go
index 84885c32..60732d10 100644
--- a/pkg/store/store.go
+++ b/pkg/store/store.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/sysprof/network_darwin.go b/pkg/sysprof/network_darwin.go
index 87871adb..fabd12d8 100644
--- a/pkg/sysprof/network_darwin.go
+++ b/pkg/sysprof/network_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package sysprof
 
 type SPNetworkDataType struct {
diff --git a/pkg/sysprof/sysprof_darwin.go b/pkg/sysprof/sysprof_darwin.go
index d7fdf398..e555287c 100644
--- a/pkg/sysprof/sysprof_darwin.go
+++ b/pkg/sysprof/sysprof_darwin.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package sysprof
 
 import (
diff --git a/pkg/textutil/textutil.go b/pkg/textutil/textutil.go
index 26b4ce17..e02e63ad 100644
--- a/pkg/textutil/textutil.go
+++ b/pkg/textutil/textutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package textutil
 
 import (
diff --git a/pkg/uiutil/uiutil.go b/pkg/uiutil/uiutil.go
index 2491b86c..d5c5f508 100644
--- a/pkg/uiutil/uiutil.go
+++ b/pkg/uiutil/uiutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package uiutil
 
 import (
diff --git a/pkg/usrlocalsharelima/usrlocalsharelima.go b/pkg/usrlocalsharelima/usrlocalsharelima.go
index 72cb22d0..fcaca4ad 100644
--- a/pkg/usrlocalsharelima/usrlocalsharelima.go
+++ b/pkg/usrlocalsharelima/usrlocalsharelima.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usrlocalsharelima
 
 import (
diff --git a/pkg/version/version.go b/pkg/version/version.go
index 829b0467..c3e1fd30 100644
--- a/pkg/version/version.go
+++ b/pkg/version/version.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package version
 
 // Version is filled on compilation time.
diff --git a/pkg/version/versionutil/versionutil.go b/pkg/version/versionutil/versionutil.go
index d95d11bd..b4390fe7 100644
--- a/pkg/version/versionutil/versionutil.go
+++ b/pkg/version/versionutil/versionutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package versionutil
 
 import (
diff --git a/pkg/vz/disk.go b/pkg/vz/disk.go
index 4e5c7b23..596bc1ba 100644
--- a/pkg/vz/disk.go
+++ b/pkg/vz/disk.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/errors_darwin.go b/pkg/vz/errors_darwin.go
index 7d5b870a..d5bc7549 100644
--- a/pkg/vz/errors_darwin.go
+++ b/pkg/vz/errors_darwin.go
@@ -1,5 +1,8 @@
 //go:build darwin && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import "errors"
diff --git a/pkg/vz/network_darwin.go b/pkg/vz/network_darwin.go
index cbd506a4..39f0cb90 100644
--- a/pkg/vz/network_darwin.go
+++ b/pkg/vz/network_darwin.go
@@ -1,5 +1,8 @@
 //go:build darwin && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/rosetta_directory_share.go b/pkg/vz/rosetta_directory_share.go
index aac0f00a..f1b193a7 100644
--- a/pkg/vz/rosetta_directory_share.go
+++ b/pkg/vz/rosetta_directory_share.go
@@ -1,5 +1,8 @@
 //go:build darwin && !arm64 && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/rosetta_directory_share_arm64.go b/pkg/vz/rosetta_directory_share_arm64.go
index 4d8a173e..a692dc9f 100644
--- a/pkg/vz/rosetta_directory_share_arm64.go
+++ b/pkg/vz/rosetta_directory_share_arm64.go
@@ -1,5 +1,8 @@
 //go:build darwin && arm64 && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/vm_darwin.go b/pkg/vz/vm_darwin.go
index aeb43076..9324b430 100644
--- a/pkg/vz/vm_darwin.go
+++ b/pkg/vz/vm_darwin.go
@@ -1,5 +1,8 @@
 //go:build darwin && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/vz_driver_darwin.go b/pkg/vz/vz_driver_darwin.go
index e05afb70..63a1ef6c 100644
--- a/pkg/vz/vz_driver_darwin.go
+++ b/pkg/vz/vz_driver_darwin.go
@@ -1,5 +1,8 @@
 //go:build darwin && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/vz/vz_driver_others.go b/pkg/vz/vz_driver_others.go
index b8e414e1..66265628 100644
--- a/pkg/vz/vz_driver_others.go
+++ b/pkg/vz/vz_driver_others.go
@@ -1,5 +1,8 @@
 //go:build !darwin || no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/windows/process_windows.go b/pkg/windows/process_windows.go
index a885d7a5..9c88bbaf 100644
--- a/pkg/windows/process_windows.go
+++ b/pkg/windows/process_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package windows
 
 import (
diff --git a/pkg/windows/registry_windows.go b/pkg/windows/registry_windows.go
index 76a77132..9ba599b3 100644
--- a/pkg/windows/registry_windows.go
+++ b/pkg/windows/registry_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package windows
 
 import (
diff --git a/pkg/windows/wsl_util_windows.go b/pkg/windows/wsl_util_windows.go
index a3fe3138..33e92d91 100644
--- a/pkg/windows/wsl_util_windows.go
+++ b/pkg/windows/wsl_util_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package windows
 
 import (
diff --git a/pkg/wsl2/fs.go b/pkg/wsl2/fs.go
index b21186e0..c116396d 100644
--- a/pkg/wsl2/fs.go
+++ b/pkg/wsl2/fs.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package wsl2
 
 import (
diff --git a/pkg/wsl2/vm_windows.go b/pkg/wsl2/vm_windows.go
index 4b54ba73..d0b537e3 100644
--- a/pkg/wsl2/vm_windows.go
+++ b/pkg/wsl2/vm_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package wsl2
 
 import (
diff --git a/pkg/wsl2/wsl_driver_others.go b/pkg/wsl2/wsl_driver_others.go
index 7a116e5e..4ad86d02 100644
--- a/pkg/wsl2/wsl_driver_others.go
+++ b/pkg/wsl2/wsl_driver_others.go
@@ -1,5 +1,8 @@
 //go:build !windows || no_wsl
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package wsl2
 
 import (
diff --git a/pkg/wsl2/wsl_driver_windows.go b/pkg/wsl2/wsl_driver_windows.go
index cdf0c292..5adcb5ed 100644
--- a/pkg/wsl2/wsl_driver_windows.go
+++ b/pkg/wsl2/wsl_driver_windows.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package wsl2
 
 import (
diff --git a/pkg/yqutil/yqutil.go b/pkg/yqutil/yqutil.go
index 1b0a6ab9..64c83b57 100644
--- a/pkg/yqutil/yqutil.go
+++ b/pkg/yqutil/yqutil.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package yqutil
 
 import (
diff --git a/website/Makefile b/website/Makefile
index 83e3e37e..d58a8607 100644
--- a/website/Makefile
+++ b/website/Makefile
@@ -1,3 +1,5 @@
+# SPDX-FileCopyrightText: Copyright The Lima Authors
+# SPDX-License-Identifier: Apache-2.0
 # See also: package.json
 NPM ?= npm
 



Test patch:
diff --git a/cmd/limactl/editflags/editflags_test.go b/cmd/limactl/editflags/editflags_test.go
index 51d9a076..2dceac15 100644
--- a/cmd/limactl/editflags/editflags_test.go
+++ b/cmd/limactl/editflags/editflags_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package editflags
 
 import (
diff --git a/pkg/autostart/autostart_test.go b/pkg/autostart/autostart_test.go
index 58b8fb39..d4070244 100644
--- a/pkg/autostart/autostart_test.go
+++ b/pkg/autostart/autostart_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package autostart
 
 import (
diff --git a/pkg/cidata/cidata_test.go b/pkg/cidata/cidata_test.go
index daa0dd11..1e3fafc5 100644
--- a/pkg/cidata/cidata_test.go
+++ b/pkg/cidata/cidata_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package cidata
 
 import (
diff --git a/pkg/cidata/fuzz_test.go b/pkg/cidata/fuzz_test.go
index baebe645..4305b13a 100644
--- a/pkg/cidata/fuzz_test.go
+++ b/pkg/cidata/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package cidata
 
 import (
diff --git a/pkg/cidata/template_test.go b/pkg/cidata/template_test.go
index 79be8a95..31f7b2df 100644
--- a/pkg/cidata/template_test.go
+++ b/pkg/cidata/template_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package cidata
 
 import (
diff --git a/pkg/downloader/downloader_test.go b/pkg/downloader/downloader_test.go
index 045805bc..48d4f467 100644
--- a/pkg/downloader/downloader_test.go
+++ b/pkg/downloader/downloader_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package downloader
 
 import (
diff --git a/pkg/downloader/fuzz_test.go b/pkg/downloader/fuzz_test.go
index e52f28ae..5b6ba071 100644
--- a/pkg/downloader/fuzz_test.go
+++ b/pkg/downloader/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package downloader
 
 import (
diff --git a/pkg/guestagent/iptables/iptables_test.go b/pkg/guestagent/iptables/iptables_test.go
index 263d2ec3..2830591f 100644
--- a/pkg/guestagent/iptables/iptables_test.go
+++ b/pkg/guestagent/iptables/iptables_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package iptables
 
 import (
diff --git a/pkg/guestagent/kubernetesservice/kubernetesservice_test.go b/pkg/guestagent/kubernetesservice/kubernetesservice_test.go
index c1ff43cb..94630ecf 100644
--- a/pkg/guestagent/kubernetesservice/kubernetesservice_test.go
+++ b/pkg/guestagent/kubernetesservice/kubernetesservice_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package kubernetesservice
 
 import (
diff --git a/pkg/guestagent/procnettcp/fuzz_test.go b/pkg/guestagent/procnettcp/fuzz_test.go
index c29af227..9d3fa7b3 100644
--- a/pkg/guestagent/procnettcp/fuzz_test.go
+++ b/pkg/guestagent/procnettcp/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package procnettcp
 
 import (
diff --git a/pkg/guestagent/procnettcp/procnettcp_test.go b/pkg/guestagent/procnettcp/procnettcp_test.go
index e994028a..f61467ee 100644
--- a/pkg/guestagent/procnettcp/procnettcp_test.go
+++ b/pkg/guestagent/procnettcp/procnettcp_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package procnettcp
 
 import (
diff --git a/pkg/hostagent/dns/dns_test.go b/pkg/hostagent/dns/dns_test.go
index feaeecf7..c9644974 100644
--- a/pkg/hostagent/dns/dns_test.go
+++ b/pkg/hostagent/dns/dns_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package dns
 
 import (
diff --git a/pkg/identifierutil/identifierutil_test.go b/pkg/identifierutil/identifierutil_test.go
index 15286bfa..a8ec2a74 100644
--- a/pkg/identifierutil/identifierutil_test.go
+++ b/pkg/identifierutil/identifierutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package identifierutil
 
 import (
diff --git a/pkg/iso9660util/fuzz_test.go b/pkg/iso9660util/fuzz_test.go
index b07e24e3..b3cf9a72 100644
--- a/pkg/iso9660util/fuzz_test.go
+++ b/pkg/iso9660util/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package iso9660util
 
 import (
diff --git a/pkg/limayaml/defaults_test.go b/pkg/limayaml/defaults_test.go
index a4855786..81d40dbe 100644
--- a/pkg/limayaml/defaults_test.go
+++ b/pkg/limayaml/defaults_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/limayaml_test.go b/pkg/limayaml/limayaml_test.go
index 20e2c774..345dee54 100644
--- a/pkg/limayaml/limayaml_test.go
+++ b/pkg/limayaml/limayaml_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/load_test.go b/pkg/limayaml/load_test.go
index c5bb5c2d..8f96a069 100644
--- a/pkg/limayaml/load_test.go
+++ b/pkg/limayaml/load_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/marshal_test.go b/pkg/limayaml/marshal_test.go
index dda6d2b5..29f2f72c 100644
--- a/pkg/limayaml/marshal_test.go
+++ b/pkg/limayaml/marshal_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/limayaml/validate_test.go b/pkg/limayaml/validate_test.go
index 4895531e..5623166f 100644
--- a/pkg/limayaml/validate_test.go
+++ b/pkg/limayaml/validate_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package limayaml
 
 import (
diff --git a/pkg/lockutil/lockutil_test.go b/pkg/lockutil/lockutil_test.go
index 25225152..b72ad6b6 100644
--- a/pkg/lockutil/lockutil_test.go
+++ b/pkg/lockutil/lockutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package lockutil
 
 import (
diff --git a/pkg/logrusutil/logrusutil_test.go b/pkg/logrusutil/logrusutil_test.go
index 84e95c74..a2fb381e 100644
--- a/pkg/logrusutil/logrusutil_test.go
+++ b/pkg/logrusutil/logrusutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package logrusutil
 
 import (
diff --git a/pkg/nativeimgutil/fuzz_test.go b/pkg/nativeimgutil/fuzz_test.go
index 82d021d6..7a3face5 100644
--- a/pkg/nativeimgutil/fuzz_test.go
+++ b/pkg/nativeimgutil/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package nativeimgutil
 
 import (
diff --git a/pkg/nativeimgutil/nativeimgutil_test.go b/pkg/nativeimgutil/nativeimgutil_test.go
index 64df728b..71c4d4d1 100644
--- a/pkg/nativeimgutil/nativeimgutil_test.go
+++ b/pkg/nativeimgutil/nativeimgutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package nativeimgutil
 
 import (
diff --git a/pkg/networks/commands_darwin_test.go b/pkg/networks/commands_darwin_test.go
index d44179e1..5ee47ffb 100644
--- a/pkg/networks/commands_darwin_test.go
+++ b/pkg/networks/commands_darwin_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/commands_test.go b/pkg/networks/commands_test.go
index 7ec20c9f..b3b958b5 100644
--- a/pkg/networks/commands_test.go
+++ b/pkg/networks/commands_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/config_test.go b/pkg/networks/config_test.go
index e8057429..75c5f94c 100644
--- a/pkg/networks/config_test.go
+++ b/pkg/networks/config_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package networks
 
 import (
diff --git a/pkg/networks/usernet/config_test.go b/pkg/networks/usernet/config_test.go
index 164622cd..832085a4 100644
--- a/pkg/networks/usernet/config_test.go
+++ b/pkg/networks/usernet/config_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/networks/usernet/dnshosts/dnshosts_test.go b/pkg/networks/usernet/dnshosts/dnshosts_test.go
index c8e1984d..9e6f3261 100644
--- a/pkg/networks/usernet/dnshosts/dnshosts_test.go
+++ b/pkg/networks/usernet/dnshosts/dnshosts_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 // From https://raw.githubusercontent.com/abiosoft/colima/v0.5.5/daemon/process/gvproxy/dnshosts_test.go
 /*
 	MIT License
diff --git a/pkg/networks/usernet/gvproxy_test.go b/pkg/networks/usernet/gvproxy_test.go
index 11f7863c..bc4e77df 100644
--- a/pkg/networks/usernet/gvproxy_test.go
+++ b/pkg/networks/usernet/gvproxy_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package usernet
 
 import (
diff --git a/pkg/osutil/machineid_test.go b/pkg/osutil/machineid_test.go
index 2ac71806..0e2a2162 100644
--- a/pkg/osutil/machineid_test.go
+++ b/pkg/osutil/machineid_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/osutil/user_test.go b/pkg/osutil/user_test.go
index fe1aa054..0cf1cc57 100644
--- a/pkg/osutil/user_test.go
+++ b/pkg/osutil/user_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package osutil
 
 import (
diff --git a/pkg/ptr/ptr_test.go b/pkg/ptr/ptr_test.go
index 7bad73ad..936169cd 100644
--- a/pkg/ptr/ptr_test.go
+++ b/pkg/ptr/ptr_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package ptr
 
 import (
diff --git a/pkg/qemu/imgutil/imgutil_test.go b/pkg/qemu/imgutil/imgutil_test.go
index b9c8dfc6..bb630f48 100644
--- a/pkg/qemu/imgutil/imgutil_test.go
+++ b/pkg/qemu/imgutil/imgutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package imgutil
 
 import (
diff --git a/pkg/qemu/qemu_test.go b/pkg/qemu/qemu_test.go
index 4f2dd8ee..422e1fbb 100644
--- a/pkg/qemu/qemu_test.go
+++ b/pkg/qemu/qemu_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package qemu
 
 import (
diff --git a/pkg/sshutil/sshutil_test.go b/pkg/sshutil/sshutil_test.go
index ef2b754d..972c3037 100644
--- a/pkg/sshutil/sshutil_test.go
+++ b/pkg/sshutil/sshutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package sshutil
 
 import (
diff --git a/pkg/store/fuzz_test.go b/pkg/store/fuzz_test.go
index f4527891..511bbdb7 100644
--- a/pkg/store/fuzz_test.go
+++ b/pkg/store/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/store/instance_test.go b/pkg/store/instance_test.go
index bdbbba7d..b0b87c1c 100644
--- a/pkg/store/instance_test.go
+++ b/pkg/store/instance_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package store
 
 import (
diff --git a/pkg/templatestore/templatestore.go b/pkg/templatestore/templatestore.go
index 4ee0d87b..ec486fe2 100644
--- a/pkg/templatestore/templatestore.go
+++ b/pkg/templatestore/templatestore.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package templatestore
 
 import (
diff --git a/pkg/textutil/textutil_test.go b/pkg/textutil/textutil_test.go
index 033e2d29..b8784ece 100644
--- a/pkg/textutil/textutil_test.go
+++ b/pkg/textutil/textutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package textutil
 
 import (
diff --git a/pkg/version/versionutil/versionutil_test.go b/pkg/version/versionutil/versionutil_test.go
index 46f69a79..d6526ae8 100644
--- a/pkg/version/versionutil/versionutil_test.go
+++ b/pkg/version/versionutil/versionutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package versionutil
 
 import (
diff --git a/pkg/vz/network_darwin_test.go b/pkg/vz/network_darwin_test.go
index ead4135e..7e8c976c 100644
--- a/pkg/vz/network_darwin_test.go
+++ b/pkg/vz/network_darwin_test.go
@@ -1,5 +1,8 @@
 //go:build darwin && !no_vz
 
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package vz
 
 import (
diff --git a/pkg/yqutil/fuzz_test.go b/pkg/yqutil/fuzz_test.go
index 0ac06321..368f85ba 100644
--- a/pkg/yqutil/fuzz_test.go
+++ b/pkg/yqutil/fuzz_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package yqutil
 
 import (
diff --git a/pkg/yqutil/yqutil_test.go b/pkg/yqutil/yqutil_test.go
index e1055435..e1785cad 100644
--- a/pkg/yqutil/yqutil_test.go
+++ b/pkg/yqutil/yqutil_test.go
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright The Lima Authors
+// SPDX-License-Identifier: Apache-2.0
+
 package yqutil
 
 import (