Full Code of lima-vm/lima for AI

master 69751d55f379 cached
676 files
2.3 MB
635.1k tokens
2343 symbols
1 requests
Download .txt
Showing preview only (2,524K chars total). Download the full file or copy to clipboard to get everything.
Repository: lima-vm/lima
Branch: master
Commit: 69751d55f379
Files: 676
Total size: 2.3 MB

Directory structure:
gitextract_kwe40__b/

├── .codespellrc
├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yaml
│   │   ├── config.yml
│   │   └── feature_request.yaml
│   ├── actions/
│   │   ├── setup_cache_for_template/
│   │   │   └── action.yml
│   │   └── upload_failure_logs_if_exists/
│   │       └── action.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── codeql.yaml
│       ├── release.yml
│       ├── scorecard.yml
│       ├── spell.yml
│       └── test.yml
├── .gitignore
├── .gitmodules
├── .golangci.yml
├── .ls-lint.yml
├── .markdownlint.json
├── .protolint.yaml
├── .shellcheckrc
├── .yamllint
├── LICENSE
├── MAINTAINERS.md
├── Makefile
├── NOTICE
├── README.md
├── ROADMAP.md
├── cmd/
│   ├── apptainer.lima
│   ├── docker.lima
│   ├── kubectl.lima
│   ├── lima
│   ├── lima-driver-krunkit/
│   │   └── main_darwin_arm64.go
│   ├── lima-driver-qemu/
│   │   └── main.go
│   ├── lima-driver-vz/
│   │   └── main_darwin.go
│   ├── lima-driver-wsl2/
│   │   └── main_windows.go
│   ├── lima-guestagent/
│   │   ├── daemon_linux.go
│   │   ├── fake_cloud_init_darwin.go
│   │   ├── install_systemd_linux.go
│   │   ├── lima-guestagent.TEMPLATE.service
│   │   ├── main.go
│   │   ├── root_darwin.go
│   │   ├── root_linux.go
│   │   └── root_others.go
│   ├── lima.bat
│   ├── limactl/
│   │   ├── clone.go
│   │   ├── completion.go
│   │   ├── copy.go
│   │   ├── debug.go
│   │   ├── delete.go
│   │   ├── disk.go
│   │   ├── edit.go
│   │   ├── editflags/
│   │   │   ├── editflags.go
│   │   │   └── editflags_test.go
│   │   ├── factory-reset.go
│   │   ├── gendoc.go
│   │   ├── genschema.go
│   │   ├── guest-install.go
│   │   ├── hostagent.go
│   │   ├── info.go
│   │   ├── list.go
│   │   ├── main.go
│   │   ├── main_darwin.go
│   │   ├── main_qemu.go
│   │   ├── main_windows.go
│   │   ├── network.go
│   │   ├── protect.go
│   │   ├── prune.go
│   │   ├── restart.go
│   │   ├── shell.go
│   │   ├── shell_test.go
│   │   ├── show-ssh.go
│   │   ├── snapshot.go
│   │   ├── start-at-login.go
│   │   ├── start-at-login_unix.go
│   │   ├── start-at-login_windows.go
│   │   ├── start.go
│   │   ├── stop.go
│   │   ├── sudoers.go
│   │   ├── sudoers_darwin.go
│   │   ├── sudoers_nodarwin.go
│   │   ├── template.go
│   │   ├── tunnel.go
│   │   ├── unprotect.go
│   │   ├── usernet.go
│   │   └── watch.go
│   ├── limactl-mcp/
│   │   └── main.go
│   ├── limactl-url-fedora-rawhide
│   ├── nerdctl.lima
│   ├── podman.lima
│   └── yq/
│       └── yq.go
├── docs/
│   └── README.md
├── go.mod
├── go.sum
├── hack/
│   ├── allowed-licenses.txt
│   ├── ansible-test.yaml
│   ├── bats/
│   │   ├── README.md
│   │   ├── extras/
│   │   │   ├── README.md
│   │   │   ├── colima.bats
│   │   │   ├── freebsd.bats
│   │   │   ├── k8s.bats
│   │   │   └── port-monitor.bats
│   │   ├── helpers/
│   │   │   ├── limactl.bash
│   │   │   ├── load.bash
│   │   │   └── logs.bash
│   │   └── tests/
│   │       ├── copy.bats
│   │       ├── list.bats
│   │       ├── mcp.bats
│   │       ├── path.bats
│   │       ├── preserve-env.bats
│   │       ├── protect.bats
│   │       ├── shell-sync.bats
│   │       ├── shell.bats
│   │       ├── url-github.bats
│   │       └── yq.bats
│   ├── brew-install-version.sh
│   ├── cache-common-inc.sh
│   ├── calculate-cache.sh
│   ├── codesign/
│   │   └── debugserver
│   ├── common.inc.sh
│   ├── debug-cache.sh
│   ├── gogenerate/
│   │   └── protoc.sh
│   ├── inject-cmdline-to-template.sh
│   ├── install-qemu.sh
│   ├── ltag/
│   │   ├── bash.txt
│   │   ├── dockerfile.txt
│   │   ├── go.txt
│   │   └── makefile.txt
│   ├── oss-fuzz-build.sh
│   ├── test-mount-home.sh
│   ├── test-nonplain-static-port-forward.sh
│   ├── test-plain-static-port-forward.sh
│   ├── test-port-forwarding.pl
│   ├── test-selinux.sh
│   ├── test-templates/
│   │   ├── alpine-iso-9p-writable.yaml
│   │   ├── net-user-v2.yaml
│   │   └── test-misc.yaml
│   ├── test-templates.sh
│   ├── test-upgrade.sh
│   ├── toolexec-for-codesign.sh
│   ├── tools/
│   │   ├── go.mod
│   │   ├── go.sum
│   │   └── pinversion.go
│   ├── update-template-almalinux-kitten.sh
│   ├── update-template-almalinux.sh
│   ├── update-template-alpine.sh
│   ├── update-template-archlinux.sh
│   ├── update-template-centos-stream.sh
│   ├── update-template-debian.sh
│   ├── update-template-fedora.sh
│   ├── update-template-freebsd.sh
│   ├── update-template-macos.sh
│   ├── update-template-opensuse.sh
│   ├── update-template-oraclelinux.sh
│   ├── update-template-rocky.sh
│   ├── update-template-ubuntu.sh
│   ├── update-template.sh
│   └── validate-artifact.sh
├── pkg/
│   ├── apfs/
│   │   ├── chown.go
│   │   ├── chown_darwin_test.go
│   │   ├── fletcher64.go
│   │   ├── fletcher64_test.go
│   │   └── types.go
│   ├── autostart/
│   │   ├── autostart.go
│   │   ├── autostart_test.go
│   │   ├── launchd/
│   │   │   ├── io.lima-vm.autostart.INSTANCE.plist
│   │   │   ├── launchd.go
│   │   │   └── launchd_test.go
│   │   ├── managers.go
│   │   ├── managers_darwin.go
│   │   ├── managers_linux.go
│   │   ├── managers_others.go
│   │   └── systemd/
│   │       ├── lima-vm@INSTANCE.service
│   │       ├── systemd.go
│   │       ├── systemd_linux.go
│   │       ├── systemd_others.go
│   │       └── systemd_test.go
│   ├── bicopy/
│   │   └── bicopy.go
│   ├── cacheutil/
│   │   └── cacheutil.go
│   ├── cidata/
│   │   ├── cidata.TEMPLATE.d/
│   │   │   ├── boot.FreeBSD/
│   │   │   │   └── 05-lima-mounts.sh
│   │   │   ├── boot.Linux/
│   │   │   │   ├── 00-alpine-user-group.sh
│   │   │   │   ├── 00-check-rtc-and-wait-ntp.sh
│   │   │   │   ├── 00-guest-home.sh
│   │   │   │   ├── 00-modprobe.sh
│   │   │   │   ├── 00-reboot-if-required.sh
│   │   │   │   ├── 01-alpine-ash-as-bash.sh
│   │   │   │   ├── 04-persistent-data-volume.sh
│   │   │   │   ├── 05-lima-disks.sh
│   │   │   │   ├── 05-lima-mounts.sh
│   │   │   │   ├── 06-enable-mdns-on-systemd.sh
│   │   │   │   ├── 06-etc-hosts.sh
│   │   │   │   ├── 07-etc-environment.sh
│   │   │   │   ├── 08-shell-prompt.sh
│   │   │   │   ├── 09-host-dns-setup.sh
│   │   │   │   ├── 10-alpine-prep.sh
│   │   │   │   ├── 11-colorterm-environment.sh
│   │   │   │   ├── 20-rootless-base.sh
│   │   │   │   ├── 25-guestagent-base.sh
│   │   │   │   ├── 30-install-packages.sh
│   │   │   │   ├── 35-setup-packages.sh
│   │   │   │   └── 40-install-containerd.sh
│   │   │   ├── boot.essential.FreeBSD/
│   │   │   │   └── 00-freebsd-user-group.sh
│   │   │   ├── boot.sh
│   │   │   ├── etc_environment
│   │   │   ├── lima.env
│   │   │   ├── meta-data
│   │   │   ├── network-config
│   │   │   ├── param.env
│   │   │   ├── user-data
│   │   │   ├── util/
│   │   │   │   └── compare_version.sh
│   │   │   └── util.FreeBSD/
│   │   │       └── print_cidata_fstab.lua
│   │   ├── cidata.go
│   │   ├── cidata_test.go
│   │   ├── cloudinittypes/
│   │   │   ├── metadata.go
│   │   │   └── userdata.go
│   │   ├── fuzz_test.go
│   │   ├── template.go
│   │   └── template_test.go
│   ├── copytool/
│   │   ├── copytool.go
│   │   ├── copytool_test.go
│   │   ├── rsync.go
│   │   └── scp.go
│   ├── debugutil/
│   │   └── debugutil.go
│   ├── downloader/
│   │   ├── downloader.go
│   │   ├── downloader_test.go
│   │   ├── fuzz_test.go
│   │   └── testdata/
│   │       └── downloader.txt
│   ├── driver/
│   │   ├── driver.go
│   │   ├── external/
│   │   │   ├── client/
│   │   │   │   ├── client.go
│   │   │   │   └── methods.go
│   │   │   ├── driver.pb.desc
│   │   │   ├── driver.pb.go
│   │   │   ├── driver.proto
│   │   │   ├── driver_grpc.pb.go
│   │   │   ├── gen.go
│   │   │   └── server/
│   │   │       ├── methods.go
│   │   │       └── server.go
│   │   ├── krunkit/
│   │   │   ├── boot.Linux/
│   │   │   │   ├── 00-add-user-to-video-render-group.sh
│   │   │   │   └── 01-gpu-device-perms.sh
│   │   │   ├── errors_darwin_arm64.go
│   │   │   ├── krunkit_darwin_arm64.go
│   │   │   └── krunkit_driver_darwin_arm64.go
│   │   ├── qemu/
│   │   │   ├── entitlementutil/
│   │   │   │   └── entitlementutil.go
│   │   │   ├── qemu.go
│   │   │   ├── qemu_driver.go
│   │   │   ├── qemu_test.go
│   │   │   └── register.go
│   │   ├── vz/
│   │   │   ├── boot.Linux/
│   │   │   │   └── 05-rosetta-volume.sh
│   │   │   ├── errors_darwin.go
│   │   │   ├── network_darwin.go
│   │   │   ├── network_darwin_test.go
│   │   │   ├── register.go
│   │   │   ├── rosetta_directory_share.go
│   │   │   ├── rosetta_directory_share_arm64.go
│   │   │   ├── vm_darwin.go
│   │   │   ├── vm_darwin_amd64.go
│   │   │   ├── vm_darwin_arm64.go
│   │   │   ├── vsock_forwarder.go
│   │   │   └── vz_driver_darwin.go
│   │   └── wsl2/
│   │       ├── boot.Linux/
│   │       │   └── 02-no-cloud-init-setup.sh
│   │       ├── errors_windows.go
│   │       ├── fs.go
│   │       ├── lima-init.TEMPLATE
│   │       ├── register.go
│   │       ├── vm_windows.go
│   │       └── wsl_driver_windows.go
│   ├── driverutil/
│   │   ├── disk.go
│   │   ├── disk_test.go
│   │   ├── instance.go
│   │   └── vm.go
│   ├── editutil/
│   │   ├── editorcmd/
│   │   │   └── editorcmd.go
│   │   └── editutil.go
│   ├── envutil/
│   │   ├── envutil.go
│   │   └── envutil_test.go
│   ├── executil/
│   │   ├── command.go
│   │   ├── opts_others.go
│   │   └── opts_windows.go
│   ├── fileutils/
│   │   └── download.go
│   ├── freeport/
│   │   ├── freeport.go
│   │   ├── freeport_unix.go
│   │   └── freeport_windows.go
│   ├── fsutil/
│   │   ├── fsutil_linux.go
│   │   └── fsutil_others.go
│   ├── guestagent/
│   │   ├── api/
│   │   │   ├── client/
│   │   │   │   ├── client.go
│   │   │   │   └── credentials.go
│   │   │   ├── gen.go
│   │   │   ├── guestservice.pb.desc
│   │   │   ├── guestservice.pb.go
│   │   │   ├── guestservice.proto
│   │   │   ├── guestservice_grpc.pb.go
│   │   │   ├── ipport.go
│   │   │   └── server/
│   │   │       └── server.go
│   │   ├── fakecloudinit/
│   │   │   └── fakecloudinit_darwin.go
│   │   ├── guestagent.go
│   │   ├── guestagent_linux.go
│   │   ├── kubernetesservice/
│   │   │   ├── kubernetesservice.go
│   │   │   ├── kubernetesservice_test.go
│   │   │   └── types.go
│   │   ├── serialport/
│   │   │   ├── serialconn_linux.go
│   │   │   ├── seriallistener_linux.go
│   │   │   └── serialport_linux.go
│   │   ├── sockets/
│   │   │   ├── sockets.go
│   │   │   ├── sockets_linux.go
│   │   │   └── sockets_linux_test.go
│   │   ├── ticker/
│   │   │   ├── compound.go
│   │   │   ├── ebpf_linux.go
│   │   │   ├── simple.go
│   │   │   └── ticker.go
│   │   └── timesync/
│   │       ├── timesync_linux.go
│   │       └── timesync_others.go
│   ├── guestpatch/
│   │   └── macos/
│   │       └── macos_darwin.go
│   ├── hostagent/
│   │   ├── api/
│   │   │   ├── api.go
│   │   │   ├── client/
│   │   │   │   └── client.go
│   │   │   └── server/
│   │   │       └── server.go
│   │   ├── dns/
│   │   │   ├── dns.go
│   │   │   └── dns_test.go
│   │   ├── events/
│   │   │   ├── events.go
│   │   │   └── watcher.go
│   │   ├── hostagent.go
│   │   ├── hostagent_unix.go
│   │   ├── hostagent_windows.go
│   │   ├── inotify.go
│   │   ├── inotify_darwin.go
│   │   ├── inotify_linux.go
│   │   ├── inotify_others.go
│   │   ├── inotify_test.go
│   │   ├── mount.go
│   │   ├── port.go
│   │   ├── port_darwin.go
│   │   ├── port_others.go
│   │   ├── port_windows.go
│   │   ├── requirements.go
│   │   └── timesync.go
│   ├── httpclientutil/
│   │   ├── httpclientutil.go
│   │   ├── httpclientutil_others.go
│   │   └── httpclientutil_windows.go
│   ├── httputil/
│   │   └── httputil.go
│   ├── identifiers/
│   │   ├── validate.go
│   │   └── validate_test.go
│   ├── imgutil/
│   │   ├── manager.go
│   │   ├── nativeimgutil/
│   │   │   ├── asifutil/
│   │   │   │   ├── asif_darwin.go
│   │   │   │   ├── asif_darwin_test.go
│   │   │   │   └── asif_others.go
│   │   │   ├── fuzz_test.go
│   │   │   ├── nativeimgutil.go
│   │   │   └── nativeimgutil_test.go
│   │   └── proxyimgutil/
│   │       └── proxyimgutil.go
│   ├── instance/
│   │   ├── ansible.go
│   │   ├── clone.go
│   │   ├── create.go
│   │   ├── delete.go
│   │   ├── hostname/
│   │   │   ├── hostname.go
│   │   │   └── hostname_test.go
│   │   ├── restart.go
│   │   ├── start.go
│   │   ├── start_unix.go
│   │   ├── start_windows.go
│   │   └── stop.go
│   ├── ioutilx/
│   │   └── ioutilx.go
│   ├── iso9660util/
│   │   ├── fuzz_test.go
│   │   ├── iso9660util.go
│   │   └── joliet.go
│   ├── jsonschemautil/
│   │   ├── jsonschemautil.go
│   │   ├── jsonschemautil_test.go
│   │   └── testdata/
│   │       ├── invalid.yaml
│   │       ├── schema.json
│   │       └── valid.yaml
│   ├── limactlutil/
│   │   └── limactlutil.go
│   ├── limainfo/
│   │   └── limainfo.go
│   ├── limatmpl/
│   │   ├── abs.go
│   │   ├── abs_test.go
│   │   ├── embed.go
│   │   ├── embed_test.go
│   │   ├── github.go
│   │   ├── locator.go
│   │   ├── locator_test.go
│   │   └── template.go
│   ├── limatype/
│   │   ├── dirnames/
│   │   │   └── dirnames.go
│   │   ├── filenames/
│   │   │   └── filenames.go
│   │   ├── lima_instance.go
│   │   └── lima_yaml.go
│   ├── limayaml/
│   │   ├── containerd.yaml
│   │   ├── defaults.go
│   │   ├── defaults_test.go
│   │   ├── defaults_unix.go
│   │   ├── defaults_unix_test.go
│   │   ├── defaults_windows.go
│   │   ├── limayaml_test.go
│   │   ├── load.go
│   │   ├── load_test.go
│   │   ├── marshal.go
│   │   ├── marshal_test.go
│   │   ├── validate.go
│   │   ├── validate_test.go
│   │   └── validate_unix_test.go
│   ├── localpathutil/
│   │   └── localpathutil.go
│   ├── lockutil/
│   │   ├── lockutil_test.go
│   │   ├── lockutil_unix.go
│   │   └── lockutil_windows.go
│   ├── logrusutil/
│   │   ├── logrusutil.go
│   │   └── logrusutil_test.go
│   ├── mcp/
│   │   ├── msi/
│   │   │   ├── filesystem.go
│   │   │   ├── msi.go
│   │   │   └── shell.go
│   │   └── toolset/
│   │       ├── filesystem.go
│   │       ├── shell.go
│   │       └── toolset.go
│   ├── must/
│   │   └── must.go
│   ├── networks/
│   │   ├── commands.go
│   │   ├── commands_darwin_test.go
│   │   ├── commands_test.go
│   │   ├── config.go
│   │   ├── config_test.go
│   │   ├── const.go
│   │   ├── networks.TEMPLATE.yaml
│   │   ├── networks.go
│   │   ├── reconcile/
│   │   │   └── reconcile.go
│   │   ├── sudoers.go
│   │   ├── usernet/
│   │   │   ├── client.go
│   │   │   ├── config.go
│   │   │   ├── config_test.go
│   │   │   ├── dnshosts/
│   │   │   │   ├── dnshosts.go
│   │   │   │   └── dnshosts_test.go
│   │   │   ├── gvproxy.go
│   │   │   ├── gvproxy_test.go
│   │   │   ├── recoincile.go
│   │   │   └── udpfileconn.go
│   │   └── validate.go
│   ├── osutil/
│   │   ├── dns_darwin.go
│   │   ├── dns_others.go
│   │   ├── exit.go
│   │   ├── file.go
│   │   ├── machineid.go
│   │   ├── machineid_test.go
│   │   ├── mount_darwin.go
│   │   ├── osutil_linux.go
│   │   ├── osutil_others.go
│   │   ├── osutil_unix.go
│   │   ├── osutil_windows.go
│   │   ├── osversion_darwin.go
│   │   ├── osversion_others.go
│   │   ├── rosetta_darwin.go
│   │   ├── rosetta_others.go
│   │   ├── user.go
│   │   └── user_test.go
│   ├── plist/
│   │   ├── plist.go
│   │   └── plist_test.go
│   ├── plugins/
│   │   └── plugins.go
│   ├── portfwd/
│   │   ├── client.go
│   │   ├── control_others.go
│   │   ├── control_windows.go
│   │   ├── forward.go
│   │   ├── listener.go
│   │   ├── listener_darwin.go
│   │   └── listener_others.go
│   ├── portfwdserver/
│   │   └── server.go
│   ├── progressbar/
│   │   └── progressbar.go
│   ├── ptr/
│   │   ├── ptr.go
│   │   └── ptr_test.go
│   ├── qemuimgutil/
│   │   ├── qemuimgutil.go
│   │   └── qemuimgutil_test.go
│   ├── reflectutil/
│   │   └── reflectutil.go
│   ├── registry/
│   │   ├── registry.go
│   │   └── registry_test.go
│   ├── snapshot/
│   │   └── snapshot.go
│   ├── sshutil/
│   │   ├── format.go
│   │   ├── sshutil.go
│   │   └── sshutil_test.go
│   ├── store/
│   │   ├── disk.go
│   │   ├── disk_test.go
│   │   ├── fuzz_test.go
│   │   ├── instance.go
│   │   ├── instance_test.go
│   │   ├── store.go
│   │   └── store_test.go
│   ├── sysprof/
│   │   ├── network_darwin.go
│   │   └── sysprof_darwin.go
│   ├── templatestore/
│   │   └── templatestore.go
│   ├── textutil/
│   │   ├── textutil.go
│   │   └── textutil_test.go
│   ├── uiutil/
│   │   └── uiutil.go
│   ├── usrlocal/
│   │   └── usrlocal.go
│   ├── version/
│   │   ├── version.go
│   │   └── versionutil/
│   │       ├── versionutil.go
│   │       └── versionutil_test.go
│   ├── windows/
│   │   ├── process_windows.go
│   │   ├── registry_windows.go
│   │   └── wsl_util_windows.go
│   └── yqutil/
│       ├── fuzz_test.go
│       ├── yqutil.go
│       └── yqutil_test.go
├── templates/
│   ├── README.md
│   ├── _default/
│   │   └── mounts.yaml
│   ├── _images/
│   │   ├── almalinux-10.yaml
│   │   ├── almalinux-8.yaml
│   │   ├── almalinux-9.yaml
│   │   ├── almalinux-kitten-10.yaml
│   │   ├── alpine-iso.yaml
│   │   ├── alpine.yaml
│   │   ├── archlinux.yaml
│   │   ├── centos-stream-10.yaml
│   │   ├── centos-stream-9.yaml
│   │   ├── debian-11.yaml
│   │   ├── debian-12.yaml
│   │   ├── debian-13.yaml
│   │   ├── fedora-41.yaml
│   │   ├── fedora-42.yaml
│   │   ├── fedora-43.yaml
│   │   ├── freebsd-15.yaml
│   │   ├── macos-15.yaml
│   │   ├── macos-26.yaml
│   │   ├── opensuse-leap-15.yaml
│   │   ├── opensuse-leap-16.yaml
│   │   ├── oraclelinux-10.yaml
│   │   ├── oraclelinux-8.yaml
│   │   ├── oraclelinux-9.yaml
│   │   ├── rocky-10.yaml
│   │   ├── rocky-8.yaml
│   │   ├── rocky-9.yaml
│   │   ├── ubuntu-20.04.yaml
│   │   ├── ubuntu-22.04.yaml
│   │   ├── ubuntu-24.04.yaml
│   │   ├── ubuntu-24.10.yaml
│   │   ├── ubuntu-25.04.yaml
│   │   └── ubuntu-25.10.yaml
│   ├── almalinux-10.yaml
│   ├── almalinux-8.yaml
│   ├── almalinux-9.yaml
│   ├── almalinux-kitten-10.yaml
│   ├── alpine-iso.yaml
│   ├── alpine.yaml
│   ├── apptainer-rootful.yaml
│   ├── apptainer.yaml
│   ├── archlinux.yaml
│   ├── buildkit.yaml
│   ├── centos-stream-10.yaml
│   ├── centos-stream-9.yaml
│   ├── debian-11.yaml
│   ├── debian-12.yaml
│   ├── debian-13.yaml
│   ├── default.yaml
│   ├── docker-rootful.yaml
│   ├── docker.yaml
│   ├── experimental/
│   │   ├── alsa.yaml
│   │   ├── debian-sid.yaml
│   │   ├── fedora-rawhide.yaml
│   │   ├── freebsd-16.yaml
│   │   ├── gentoo.yaml
│   │   ├── opensuse-tumbleweed.yaml
│   │   ├── rke2.yaml
│   │   ├── u7s.yaml
│   │   ├── ubuntu-26.04.yaml
│   │   ├── vnc.yaml
│   │   └── wsl2.yaml
│   ├── faasd.yaml
│   ├── fedora-41.yaml
│   ├── fedora-42.yaml
│   ├── fedora-43.yaml
│   ├── freebsd-15.yaml
│   ├── homebrew-macos.yaml
│   ├── k0s.yaml
│   ├── k3s.yaml
│   ├── k8s.yaml
│   ├── linuxbrew.yaml
│   ├── macos-15.yaml
│   ├── macos-26.yaml
│   ├── opensuse-leap-15.yaml
│   ├── opensuse-leap-16.yaml
│   ├── oraclelinux-10.yaml
│   ├── oraclelinux-8.yaml
│   ├── oraclelinux-9.yaml
│   ├── podman-rootful.yaml
│   ├── podman.yaml
│   ├── rocky-10.yaml
│   ├── rocky-8.yaml
│   ├── rocky-9.yaml
│   ├── ubuntu-20.04.yaml
│   ├── ubuntu-22.04.yaml
│   ├── ubuntu-24.04.yaml
│   ├── ubuntu-24.10.yaml
│   ├── ubuntu-25.04.yaml
│   └── ubuntu-25.10.yaml
├── vz.entitlements
└── website/
    ├── .gitignore
    ├── .nvmrc
    ├── Makefile
    ├── README.md
    ├── assets/
    │   └── scss/
    │       └── _variables_project.scss
    ├── config.yaml
    ├── content/
    │   └── en/
    │       ├── _index.html
    │       ├── docs/
    │       │   ├── _index.md
    │       │   ├── community/
    │       │   │   ├── _index.md
    │       │   │   ├── contributing.md
    │       │   │   ├── governance.md
    │       │   │   ├── roadmap.md
    │       │   │   └── subprojects.md
    │       │   ├── config/
    │       │   │   ├── _index.md
    │       │   │   ├── ai/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── inside/
    │       │   │   │   │   └── _index.md
    │       │   │   │   └── outside/
    │       │   │   │       ├── _index.md
    │       │   │   │       └── gemini.md
    │       │   │   ├── disk.md
    │       │   │   ├── environment-variables.md
    │       │   │   ├── gpu.md
    │       │   │   ├── mount.md
    │       │   │   ├── multi-arch.md
    │       │   │   ├── network/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── user-v2.md
    │       │   │   │   ├── user.md
    │       │   │   │   └── vmnet.md
    │       │   │   ├── plugin/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── cli.md
    │       │   │   │   ├── url.md
    │       │   │   │   └── vm.md
    │       │   │   ├── port.md
    │       │   │   └── vmtype/
    │       │   │       ├── _index.md
    │       │   │       ├── krunkit.md
    │       │   │       ├── qemu.md
    │       │   │       ├── vz.md
    │       │   │       └── wsl2.md
    │       │   ├── dev/
    │       │   │   ├── _index.md
    │       │   │   ├── drivers.md
    │       │   │   ├── git.md
    │       │   │   ├── internals.md
    │       │   │   └── testing/
    │       │   │       ├── _index.md
    │       │   │       └── bats-style.md
    │       │   ├── examples/
    │       │   │   ├── _index.md
    │       │   │   ├── ai.md
    │       │   │   ├── containers/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── apptainer/
    │       │   │   │   │   └── _index.md
    │       │   │   │   ├── containerd/
    │       │   │   │   │   ├── _index.md
    │       │   │   │   │   └── advanced/
    │       │   │   │   │       ├── _index.md
    │       │   │   │   │       ├── bypass4netns.md
    │       │   │   │   │       ├── gomodjail.md
    │       │   │   │   │       └── stargz.md
    │       │   │   │   ├── docker/
    │       │   │   │   │   └── _index.md
    │       │   │   │   ├── kubernetes/
    │       │   │   │   │   └── _index.md
    │       │   │   │   └── podman/
    │       │   │   │       └── _index.md
    │       │   │   ├── gha.md
    │       │   │   └── vscode.md
    │       │   ├── faq/
    │       │   │   ├── _index.md
    │       │   │   └── colima.md
    │       │   ├── installation/
    │       │   │   ├── _index.md
    │       │   │   └── source.md
    │       │   ├── reference/
    │       │   │   └── _index.md
    │       │   ├── releases/
    │       │   │   ├── _index.md
    │       │   │   ├── breaking.md
    │       │   │   ├── deprecated.md
    │       │   │   └── experimental.md
    │       │   ├── security/
    │       │   │   └── _index.md
    │       │   ├── talks/
    │       │   │   └── _index.md
    │       │   ├── templates/
    │       │   │   ├── _index.md
    │       │   │   └── github.md
    │       │   └── usage/
    │       │       ├── _index.md
    │       │       ├── guests/
    │       │       │   ├── _index.md
    │       │       │   ├── freebsd.md
    │       │       │   ├── linux.md
    │       │       │   └── macos.md
    │       │       └── ssh.md
    │       └── search.md
    ├── data/
    │   ├── adopters.yaml
    │   └── helpfullinks.yaml
    ├── go.mod
    ├── go.sum
    ├── hugo.toml
    ├── layouts/
    │   ├── 404.html
    │   ├── partials/
    │   │   ├── footer.html
    │   │   └── navbar.html
    │   └── shortcodes/
    │       ├── blocks/
    │       │   ├── adopters.html
    │       │   ├── cncf.html
    │       │   ├── cover.html
    │       │   └── helpfullinks.html
    │       ├── fixlinks.html
    │       └── readtemplates.html
    ├── netlify.toml
    ├── package.json
    └── static/
        └── images/
            └── internals/
                └── lima-sequence-diagram.puml

================================================
FILE CONTENTS
================================================

================================================
FILE: .codespellrc
================================================
# https://github.com/codespell-project/codespell#using-a-config-file

[codespell]

# Comma separated list of dirs to be skipped.
skip = .git,go.mod,go.sum,*.pb.desc,*/node_modules/*,*/public/js/*,*/public/scss/*

# Comma separated list of words to be ignored. Words must be lowercased.
ignore-words-list = ans,distroname,testof,hda,ststr,archtypes,sme

# Check file names as well.
check-filenames = true


================================================
FILE: .editorconfig
================================================
root = true

[*]
trim_trailing_whitespace = true
insert_final_newline = true

# Protobuf descriptors are binary files
[*.pb.desc]
insert_final_newline = unset
trim_trailing_whitespace = unset


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yaml
================================================
name: Bug report
description: Report a potential bug
body:
- type: textarea
  attributes:
    label: Description
    description: Please make sure to include the version of Lima and the host OS


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Ask a question (GitHub Discussions)
  url: https://github.com/lima-vm/lima/discussions
  about: We use GitHub Discussions for questions, GitHub issues for tracking bug reports and feature requests
- name: Chat with Lima users and developers
  url: https://slack.cncf.io/
  about: CNCF slack has `#lima` channel


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yaml
================================================
name: Feature request
description: Request a feature
body:
- type: textarea
  attributes:
    label: Description


================================================
FILE: .github/actions/setup_cache_for_template/action.yml
================================================
name: 'setup cache for template'
description: 'setup cache for template'
inputs:
  arch:
    description: arch to setup cache for
    required: false
  template:
    description: template yaml file
    required: true
runs:
  using: "composite"
  steps:
  - name: "detect platform for download directory"
    id: detect-platform
    run: |
      if [[ "$(uname)" == "Darwin" ]]; then
        download_dir=~/Library/Caches/lima/download
      else
        download_dir=~/.cache/lima/download
      fi
      echo "download-dir=$download_dir" >> "$GITHUB_OUTPUT"
    shell: bash
  - name: "create cache parameters from template"
    if: always()
    id: cache-params-from-template
    run: |
      set -eux
      source hack/cache-common-inc.sh
      print_cache_informations_from_template "${{ inputs.template }}" "${{ inputs.arch }}" >> "$GITHUB_OUTPUT"
    shell: bash

  - name: "Cache ${{ steps.cache-params-from-template.outputs.image-path }}"
    if: ${{ steps.cache-params-from-template.outputs.image-key != '' }}
    # avoid using `~` in path that will be expanded to platform specific home directory
    uses: actions/cache@v4
    with:
      path: ${{ steps.cache-params-from-template.outputs.image-path }}
      key: ${{ steps.cache-params-from-template.outputs.image-key }}
      enableCrossOsArchive: true

  - name: "Cache ${{ steps.cache-params-from-template.outputs.kernel-path }}"
    if: ${{ steps.cache-params-from-template.outputs.kernel-key != '' }}
    # avoid using `~` in path that will be expanded to platform specific home directory
    uses: actions/cache@v4
    with:
      path: ${{ steps.cache-params-from-template.outputs.kernel-path }}
      key: ${{ steps.cache-params-from-template.outputs.kernel-key }}
      enableCrossOsArchive: true

  - name: "Cache ${{ steps.cache-params-from-template.outputs.initrd-path }}"
    if: ${{ steps.cache-params-from-template.outputs.initrd-key != '' }}
    # avoid using `~` in path that will be expanded to platform specific home directory
    uses: actions/cache@v4
    with:
      path: ${{ steps.cache-params-from-template.outputs.initrd-path }}
      key: ${{ steps.cache-params-from-template.outputs.initrd-key }}
      enableCrossOsArchive: true

  - name: "Cache ${{ steps.cache-params-from-template.outputs.containerd-key }}"
    if: ${{ steps.cache-params-from-template.outputs.containerd-key != '' }}
    uses: actions/cache@v4
    with:
      path: ${{ steps.cache-params-from-template.outputs.containerd-path }}
      key: ${{ steps.cache-params-from-template.outputs.containerd-key }}
      enableCrossOsArchive: true

  - name: "Create symbolic link named ${{ steps.detect-platform.outputs.download-dir }} pointing to .download"
    run: |
      set -eux
      [ -d .download ] || mkdir -p .download
      path_to_cache=${{ steps.detect-platform.outputs.download-dir }}
      mkdir -p "$(dirname "$path_to_cache")"
      ln -sfn "$PWD/.download" "$path_to_cache"
    shell: bash


================================================
FILE: .github/actions/upload_failure_logs_if_exists/action.yml
================================================
name: 'upload failure-logs if exists'
description: 'upload failure-logs if exists'
inputs:
  suffix:
    description: suffix to append to the name of the artifact
    required: false
    default: ''
runs:
  using: "composite"
  steps:
  - name: "Check if failure-logs exists"
    if: always()
    id: check-if-failure-logs-exists
    run: echo "exists=$([ -d "failure-logs" ] && echo "true" || echo "false")" >> "$GITHUB_OUTPUT"
    shell: bash
  - id: normalize-suffix
    # To avoid using special characters in artifact name, normalize the suffix
    if: steps.check-if-failure-logs-exists.outputs.exists == 'true'
    run: |
      suffix="${{ inputs.suffix }}"
      suffix="${suffix//[^a-zA-Z0-9_]/_}"
      suffix="${suffix:+-$suffix}"
      echo "result=$suffix" >> "$GITHUB_OUTPUT"
    shell: bash
  - name: "Upload failure-logs"
    if: steps.check-if-failure-logs-exists.outputs.exists == 'true'
    uses: actions/upload-artifact@v4
    with:
      name: failure-logs-${{ github.job }}${{ steps.normalize-suffix.outputs.result }}
      path: failure-logs/


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: gomod
  directories:
  - "/"
  - "/hack/tools"
  schedule:
    interval: daily
  open-pull-requests-limit: 10
  groups:
    golang-x:
      patterns:
      - "golang.org/x/*"
    k8s:
      patterns:
      - "k8s.io/*"
- package-ecosystem: github-actions
  directory: "/"
  schedule:
    interval: daily
  open-pull-requests-limit: 10


================================================
FILE: .github/workflows/codeql.yaml
================================================
name: "CodeQL Advanced"

on:
  # paths-ignore should be kept in sync with test.yml
  push:
    branches: ["master"]
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
  pull_request:
    branches: ["master"]
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
  schedule:
  - cron: '33 19 * * 5'
  workflow_dispatch:

permissions:
  contents: read

jobs:
  analyze:
    name: Analyze (${{ matrix.language }})
    runs-on: 'ubuntu-latest'
    permissions:
      security-events: write
      # required to fetch internal or private CodeQL packs
      packages: read

    strategy:
      fail-fast: false
      matrix:
        include:
        - language: go
          build-mode: autobuild
    steps:
    - name: Checkout repository
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2

    - name: Initialize CodeQL
      uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8  # v4.33.0
      with:
        languages: ${{ matrix.language }}
        build-mode: ${{ matrix.build-mode }}

    - if: matrix.build-mode == 'manual'
      shell: bash
      run: |
        echo 'If you are using a "manual" build mode for one or more of the' \
          'languages you are analyzing, replace this with the commands to build' \
          'your code, for example:'
        echo '  make bootstrap'
        echo '  make release'
        exit 1

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8  # v4.33.0
      with:
        category: "/language:${{matrix.language}}"


================================================
FILE: .github/workflows/release.yml
================================================
# Forked from https://github.com/containerd/nerdctl/blob/v0.8.1/.github/workflows/release.yml
# Apache License 2.0

name: Release
on:
  # paths-ignore should be kept in sync with test.yml
  push:
    branches:
    - 'master'
    tags:
    - 'v*'
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
  pull_request:
    branches:
    - 'master'
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
env:
  GO111MODULE: on
  GOTOOLCHAIN: local
permissions:
  contents: read

jobs:
  artifacts-darwin:
    name: Artifacts Darwin
    # The latest release of macOS is used to enable new features.
    # https://github.com/lima-vm/lima/issues/2767
    #
    # Apparently, a binary built on a newer version of macOS can still run on
    # an older release of macOS without an error.
    # This is quite different from Linux and glibc.
    runs-on: macos-26
    timeout-minutes: 20
    steps:
    - name: "Show xcode and SDK version"
      run: |
        # Xcode version
        xcodebuild -version
        # macOS SDK version
        xcrun --show-sdk-version || true
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make darwin artifacts
      run: make artifacts-darwin
    - name: "Upload artifacts"
      uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f  # v7.0.0
      with:
        name: artifacts-darwin
        path: _artifacts/
  release:
    # An old release of Ubuntu is chosen for glibc compatibility
    runs-on: ubuntu-22.04
    needs: artifacts-darwin
    timeout-minutes: 20
    # The maximum access is "read" for PRs from public forked repos
    # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
    permissions:
      contents: write  # for releases
      id-token: write  # for provenances
      attestations: write  # for provenances
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c  # v8.0.1
      with:
        name: artifacts-darwin
        path: _artifacts/
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Install gcc
      run: |
        sudo apt-get update
        sudo apt-get install -y gcc-x86-64-linux-gnu gcc-aarch64-linux-gnu
    - name: "Compile binaries"
      run: make artifacts-linux
    - name: "Make misc artifacts"
      run: make artifacts-misc
    - name: "Validate artifactts"
      run: ./hack/validate-artifact.sh ./_artifacts/*.tar.gz
    - name: "SHA256SUMS"
      run: |
        ( cd _artifacts; sha256sum *.tar.gz ) | tee /tmp/SHA256SUMS
        mv /tmp/SHA256SUMS _artifacts/SHA256SUMS
    - name: "The sha256sum of the SHA256SUMS file"
      run: (cd _artifacts; sha256sum SHA256SUMS)
    - name: "Prepare the release note"
      run: |
        shasha=$(sha256sum _artifacts/SHA256SUMS | awk '{print $1}')
        cat <<-EOF | tee /tmp/release-note.txt
        (Changes to be documented)

        ## Usage
        \`\`\`console
        $ limactl create
        $ limactl start
        ...
        INFO[0029] READY. Run \`lima\` to open the shell.

        $ lima uname
        Linux
        \`\`\`

        - - -
        The binaries were built automatically on GitHub Actions.
        The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

        The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
        - - -
        Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])
        EOF
    - uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32  # v4.1.0
      if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
      with:
        subject-path: _artifacts/*
    - name: "Create release"
      if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        tag="${GITHUB_REF##*/}"
        gh release create -F /tmp/release-note.txt --draft --title "${tag}" "${tag}" _artifacts/*


================================================
FILE: .github/workflows/scorecard.yml
================================================
name: Scorecard supply-chain security
on:
  # For Branch-Protection check. Only the default branch is supported. See
  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
  branch_protection_rule:
  # To guarantee Maintained check is occasionally updated. See
  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
  schedule:
  - cron: '23 13 * * 4'
  push:
    branches:
    - master
  workflow_dispatch:

# Declare default permissions as read only.
permissions: read-all

jobs:
  analysis:
    name: Scorecard analysis
    runs-on: ubuntu-latest
    permissions:
      # Needed to upload the results to code-scanning dashboard.
      security-events: write
      # Needed to publish results and get a badge (see publish_results below).
      id-token: write

    steps:
    - name: "Checkout code"
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
      with:
        persist-credentials: false

    - name: "Run analysis"
      uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a  # v2.4.3
      with:
        results_file: results.sarif
        results_format: sarif
        # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
        # - you want to enable the Branch-Protection check on a *public* repository, or
        # - you are installing Scorecard on a *private* repository
        # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
        # repo_token: ${{ secrets.SCORECARD_TOKEN }}

        # Public repositories:
        #   - Publish results to OpenSSF REST API for easy access by consumers
        #   - Allows the repository to include the Scorecard badge.
        #   - See https://github.com/ossf/scorecard-action#publishing-results.
        publish_results: true

    # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
    # format to the repository Actions tab.
    - name: "Upload artifact"
      uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f  # v7.0.0
      with:
        name: SARIF file
        path: results.sarif
        retention-days: 5

    # Upload the results to GitHub's code scanning dashboard (optional).
    # Commenting out will disable upload of results to your repo's Code Scanning dashboard
    - name: "Upload to code-scanning"
      uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8  # v4.33.0
      with:
        sarif_file: results.sarif


================================================
FILE: .github/workflows/spell.yml
================================================
# split from test.yml so as to run spell checks for doc-only PRs too
name: spell

on:
  push:
    branches:
    - master
    - 'release/**'
  pull_request:

permissions:
  contents: read

jobs:
  spell:
    name: "Spell check"
    runs-on: ubuntu-24.04
    timeout-minutes: 5
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579  # v2.2
      with:
        check_filenames: true
        check_hidden: true
        # by default, codespell uses configuration from the .codespellrc


================================================
FILE: .github/workflows/test.yml
================================================
name: test

on:
  push:
    branches:
    - master
    - 'release/**'
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
  pull_request:
    paths-ignore:
    - "docs/**"
    - "website/**"
    - "**.md"
env:
  LIMACTL_CREATE_ARGS: ""
  GOTOOLCHAIN: local

permissions: read-all

jobs:
  lints:
    name: "Lints"
    runs-on: ubuntu-24.04
    timeout-minutes: 30
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Install protoc and Go plugins
      run: |
        sudo apt-get update
        sudo apt-get install -y protobuf-compiler
        make install-protoc-tools
    - name: Verify generated files
      run: make generate check-generated
    - name: Run nobin
      run: >-
        go tool -modfile=./hack/tools/go.mod nobin
        --allow-emoji
        --allow-escape
        --gitignore
        --skip-ext pb.desc
        --skip 'website/static/images/**/*.{gif,png}'
        --skip 'docs/reports/**/*.pdf'
    - name: Run editorconfig-checker
      run: go tool -modfile=./hack/tools/go.mod editorconfig-checker
    - name: Run yamllint
      run: yamllint .
    - name: Install shellcheck
      run: |
        sudo apt-get update
        sudo apt-get install -y shellcheck
    - name: Run file and directory name linter
      uses: ls-lint/action@02e380fe8733d499cbfc9e22276de5085508a5bd  # v2.3.1
    - name: Run shellcheck
      run: find . -name '*.sh' | xargs shellcheck
    - name: Run shfmt
      run: find . -name '*.sh' | xargs go tool -modfile=./hack/tools/go.mod shfmt -s -d
    - name: Check hyperlinks
      uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411  # v2.8.0
      with:
        args: >-
          --exclude https://img.shields.io
          --exclude http://127.0.0.1:8080
          --exclude https://github.com/lima-vm/lima/releases/download
          --exclude https://xbarapp.com
          --exclude https://api.github.com
          README.md
        token: ${{ secrets.GITHUB_TOKEN }}
    - name: Install go-licenses
      # TODO: move to `go tool` after upgrading to v2
      run: go install github.com/google/go-licenses@v1.6.0
    - name: Check licenses
      # the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
      # hashicorp/hcl/v2 is MPL-2.0; covered by the CNCF license exception for hashicorp/hcl
      # see also https://github.com/cncf/foundation/issues/1242
      run: go-licenses check --include_tests --ignore github.com/hashicorp/hcl/v2 ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
    - name: Check license boilerplates
      run: go tool -modfile=./hack/tools/go.mod ltag -t ./hack/ltag --check -v
    - name: Check protobuf files
      run: go tool -modfile=./hack/tools/go.mod protolint .

  lint-go:
    name: "Lint Go"
    timeout-minutes: 30
    strategy:
      matrix:
        runs-on: [ubuntu-24.04, macos-26, windows-2025]
    runs-on: ${{ matrix.runs-on }}
    steps:
    - name: Force git to use LF
      # This step is required on Windows to work around golangci-lint issues with formatters. See https://github.com/golangci/golangci-lint/discussions/5840
      # TODO: replace with a checkout option when https://github.com/actions/checkout/issues/226 is implemented
      if: runner.os == 'Windows'
      run: |
        git config --global core.autocrlf false
        git config --global core.eol lf
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - id: golangci-lint-version
      shell: bash
      working-directory: hack/tools
      run: |
        echo "GOLANGCI_LINT_VERSION=$(go list -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2)" >> $GITHUB_OUTPUT
    - name: Run golangci-lint
      uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20  # v9.2.0
      with:
        version: ${{ steps.golangci-lint-version.outputs.GOLANGCI_LINT_VERSION }}
        args: --verbose

  security:
    name: "Vulncheck"
    runs-on: ubuntu-24.04
    timeout-minutes: 5
    steps:
    - uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee  # v1.0.4

  unit:
    name: "Unit tests"
    runs-on: ubuntu-24.04
    timeout-minutes: 30
    strategy:
      fail-fast: false
      matrix:
        # For non-Homebrew we have to support an old release of Go
        go-version: ["oldstable", "stable"]
    steps:
    - name: Install test dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y --no-install-recommends qemu-utils
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: ${{ matrix.go-version }}
    - name: Unit tests
      run: go test -v ./...
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Verify templates match `limactl edit` format
      run: |
        find templates -name '*.yaml' -exec limactl edit --set 'del(.nothing)' {} \;
        git diff-index --exit-code HEAD
    - name: Uninstall
      run: sudo make uninstall

  windows:
    name: "Windows tests (WSL2)"
    runs-on: windows-2025
    timeout-minutes: 30
    steps:
    - name: Enable WSL2
      run: |
        wsl --set-default-version 2
        wsl --shutdown
        wsl --update
        wsl --status
        wsl --version
        wsl --list --online
    - name: Install WSL2 distro
      timeout-minutes: 1
      run: |
        # FIXME: At least one distro has to be installed here,
        # otherwise `wsl --list --verbose` (called from Lima) fails:
        # https://github.com/lima-vm/lima/pull/1826#issuecomment-1729993334
        # The distro image itself is not consumed by Lima.
        # Starting with WSL2 version 2.5.7.0 the distro will be rejected
        # if it doesn't contain /bin/sh and /etc.
        # ------------------------------------------------------------------
        mkdir dummy
        mkdir dummy\bin
        mkdir dummy\etc
        echo "" >dummy\bin\sh
        tar -cf dummy.tar --format ustar -C dummy .
        wsl --import dummy $env:TEMP dummy.tar
        wsl --list --verbose
    - name: Set gitconfig
      run: |
        git config --global core.autocrlf false
        git config --global core.eol lf
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Unit tests
      run: go test -v ./...
    - name: Make
      run: make
    - name: Integration tests (WSL2, Windows host)
      run: |
        $env:PATH = "$pwd\_output\bin;" + 'C:\msys64\usr\bin;' + $env:PATH
        pacman -Sy --noconfirm openbsd-netcat diffutils socat w3m
        $env:MSYS2_ENV_CONV_EXCL = 'HOME_HOST;HOME_GUEST;_LIMA_WINDOWS_EXTRA_PATH'
        $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'
        $env:_LIMA_WINDOWS_EXTRA_PATH = 'C:\Program Files\Git\usr\bin'
        bash.exe -c "./hack/test-templates.sh templates/experimental/wsl2.yaml"

  windows-qemu:
    name: "Windows tests (QEMU)"
    runs-on: windows-2025
    timeout-minutes: 30
    steps:
    - name: Set gitconfig
      run: |
        git config --global core.autocrlf false
        git config --global core.eol lf
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install QEMU
      run: |
        winget install --silent --accept-source-agreements --accept-package-agreements --disable-interactivity SoftwareFreedomConservancy.QEMU
    - name: Integration tests (QEMU, Windows host)
      run: |
        $env:PATH = "$pwd\_output\bin;" + 'C:\msys64\usr\bin;' + 'C:\Program Files\QEMU;' + $env:PATH
        pacman -Sy --noconfirm openbsd-netcat diffutils socat w3m
        $env:MSYS2_ENV_CONV_EXCL = 'HOME_HOST;HOME_GUEST;_LIMA_WINDOWS_EXTRA_PATH'
        $env:HOME_HOST = $(cygpath.exe "$env:USERPROFILE")
        $env:HOME_GUEST = "$env:HOME_HOST"
        $env:LIMACTL_CREATE_ARGS = '--vm-type=qemu'
        $env:_LIMA_WINDOWS_EXTRA_PATH = 'C:\Program Files\Git\usr\bin'
        bash.exe -c "./hack/test-templates.sh templates/default.yaml"

  qemu:
    name: "Integration tests (QEMU, macOS host)"
    runs-on: macos-15-large  # Intel
    timeout-minutes: 120
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Unit tests
      run: go test -v ./...
    - name: Make
      run: make
    - name: "Inject `no_timer_check` to kernel cmdline"
      # workaround to https://github.com/lima-vm/lima/issues/84
      run: |
        export PATH="$PWD/_output/bin:$PATH"
        ./hack/inject-cmdline-to-template.sh _output/share/lima/templates/_images/ubuntu.yaml no_timer_check
    - name: Install
      run: sudo make install
    - name: Validate jsonschema
      run: make schema-limayaml.json
    - name: Validate templates
      # Can't validate base templates in `_default` because they have no images
      run: find -L templates -name '*.yaml' ! -path '*/_default/*' | xargs limactl validate
    - name: Install test dependencies
      # QEMU:      required by Lima itself
      # bash:      required by test-templates.sh (OS version of bash is too old)
      # coreutils: required by test-templates.sh for the "timeout" command
      # w3m :      required by test-templates.sh for port forwarding tests
      # socat:     required by test-templates.sh for port forwarding tests
      run: brew install qemu bash coreutils w3m socat
    - name: "Adjust LIMACTL_CREATE_ARGS"
      run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu" >>$GITHUB_ENV
    - name: Cache image used by default.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/default.yaml
    - name: "Show cache"
      run: ./hack/debug-cache.sh
    - name: "Test default.yaml"
      uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08  # v3.0.2
      with:
        timeout_minutes: 30
        retry_on: error
        max_attempts: 3
        command: ./hack/test-templates.sh templates/default.yaml
    # GHA macOS is slow and flaky, so we only test default.yaml here.
    # Other yamls are tested on Linux instances.
    #
    - if: always()
      uses: ./.github/actions/upload_failure_logs_if_exists
    - name: "Show cache"
      if: always()
      run: ./hack/debug-cache.sh

  # Non-default templates are tested on Linux instances of GHA,
  # as they seem more stable than macOS instances.
  qemu-linux:
    name: "Integration tests (QEMU, Linux host)"
    runs-on: ubuntu-24.04
    timeout-minutes: 120
    strategy:
      fail-fast: false
      matrix:
        # Most templates use 9p as the mount type
        template:
        - alpine.yaml
        - debian.yaml  # reverse-sshfs
        - fedora.yaml
        - archlinux.yaml
        - opensuse.yaml
        - docker.yaml
        - ../hack/test-templates/alpine-iso-9p-writable.yaml  # Covers alpine-iso.yaml
        - ../hack/test-templates/net-user-v2.yaml
        - ../hack/test-templates/test-misc.yaml  # TODO: merge net-user-v2 into test-misc
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Cache image used by templates/${{ matrix.template }}
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/${{ matrix.template }}
    - name: Install test dependencies
      run: |
        sudo apt-get update
        sudo ./hack/install-qemu.sh
        sudo apt-get install -y --no-install-recommends socat w3m
    - name: Install ansible-playbook
      run: |
        sudo apt-get install -y --no-install-recommends ansible
      if: matrix.template == '../hack/test-templates/test-misc.yaml'
    - name: "Show cache"
      run: ./hack/debug-cache.sh
    - name: "Test"
      uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08  # v3.0.2
      with:
        timeout_minutes: 30
        retry_on: error
        max_attempts: 3
        command: ./hack/test-templates.sh templates/${{ matrix.template }}
    - if: always()
      uses: ./.github/actions/upload_failure_logs_if_exists
      with:
        suffix: ${{ matrix.template }}
    - name: "Show cache"
      run: ./hack/debug-cache.sh

  bats:
    name: "Integration tests (BATS)"
    runs-on: ubuntu-24.04
    timeout-minutes: 30
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
      with:
        # BATS tests don't expect lima version warnings like:
        # msg="treating lima version \"ea336ae\" from \"/Users/runner/.lima-bats/dummy/lima-version\" as very latest release"
        fetch-depth: 0
        submodules: true
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Install test dependencies
      run: |
        sudo apt-get update
        sudo ./hack/install-qemu.sh
    - name: Cache image used by templates/default.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/default.yaml
    - name: "Run BATS integration tests"
      run: make bats
      env:
        # The url-github.bats tests makes GitHub API requests
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: Cache image used by templates/k8s.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/k8s.yaml
    - name: "Run BATS k8s tests"
      run: ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/extras/k8s.bats
      env:
        LIMA_BATS_ALL_TESTS_RETRIES: 3
    - name: Cache image used by templates/freebsd.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/freebsd.yaml
    - name: "Run BATS freebsd tests"
      run: |
        set -eux -o pipefail
        # xorriso is required for creating Joliet filesystem
        sudo apt-get install -y xorriso
        ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/extras/freebsd.bats

  colima:
    name: "Colima tests (QEMU, Linux host)"
    runs-on: ubuntu-24.04
    timeout-minutes: 120
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
      with:
        # fetch-depth is set to 0 to let `limactl --version` print semver-ish version
        # fetch-depth: 0 is required for Colima integration test because Colima
        # checks Lima's version and requires proper semantic version format
        fetch-depth: 0
        ref: ${{ github.event.pull_request.head.sha }}
        submodules: true
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Install colima
      id: install-colima
      run: |
        git clone https://github.com/abiosoft/colima
        cd colima
        latest="$(git tag --sort=-v:refname | head -n1)"
        git checkout "$latest"
        make
        sudo make install
        echo "version=$latest" >>$GITHUB_OUTPUT
    - name: Install test dependencies
      run: |
        sudo apt-get update
        sudo ./hack/install-qemu.sh
    - name: Cache colima
      uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7  # v5.0.4
      with:
        path: ~/.cache/colima
        key: colima-${{ steps.install-colima.outputs.version }}
    - name: Run BATS colima tests
      run: ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/extras/colima.bats

  vmnet:
    name: "VMNet tests (QEMU)"
    runs-on: macos-15-large  # Intel
    timeout-minutes: 120
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: "Inject `no_timer_check` to kernel cmdline"
      # workaround to https://github.com/lima-vm/lima/issues/84
      run: |
        export PATH="$PWD/_output/bin:$PATH"
        ./hack/inject-cmdline-to-template.sh _output/share/lima/templates/_images/ubuntu.yaml no_timer_check
    - name: Install
      run: sudo make install
    - name: "Adjust LIMACTL_CREATE_ARGS"
      run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu --network=lima:shared" >>$GITHUB_ENV
    - name: Cache image used by default .yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/default.yaml
    - name: Install test dependencies
      run: brew install qemu bash coreutils w3m socat
    - name: Install socket_vmnet
      env:
        SOCKET_VMNET_VERSION: v1.2.2
      run: |
        (
          cd ~
          git clone https://github.com/lima-vm/socket_vmnet
          cd socket_vmnet
          git checkout $SOCKET_VMNET_VERSION
          sudo git config --global --add safe.directory /Users/runner/socket_vmnet
          sudo make PREFIX=/opt/socket_vmnet install
        )
        limactl sudoers | sudo tee /etc/sudoers.d/lima
    - name: Unit test (pkg/networks) with socket_vmnet
      # Set -count=1 to disable cache
      run: go test -v -count=1 ./pkg/networks/...
    - name: Test socket_vmnet
      uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08  # v3.0.2
      with:
        timeout_minutes: 30
        retry_on: error
        max_attempts: 3
        command: ./hack/test-templates.sh templates/default.yaml
    - if: always()
      uses: ./.github/actions/upload_failure_logs_if_exists

  upgrade:
    name: "Upgrade tests (QEMU, macOS host)"
    runs-on: macos-15-large  # Intel
    timeout-minutes: 120
    strategy:
      matrix:
        oldver: ["v0.15.1"]  # The default VM type was always QEMU until Lima v1.0
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - name: Fetch homebrew-core commit messages
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
      with:
        # needed by ./hack/brew-install-version.sh
        repository: homebrew/homebrew-core
        path: homebrew-core
        fetch-depth: 0
        filter: tree:0
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Cache image used by ${{ matrix.oldver }}/examples/ubuntu-lts.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: https://raw.githubusercontent.com/lima-vm/lima/${{ matrix.oldver }}/examples/ubuntu-lts.yaml
    - name: Install test dependencies
      run: |
        brew install bash coreutils
        # QEMU 9.1.0 seems to break on GitHub runners, both on Monterey and Ventura
        # We revert back to 8.2.1, which seems to work fine
        git config --global user.name "GitHub Actions Bot"
        git config --global user.email "nobody@localhost"
        ./hack/brew-install-version.sh qemu 8.2.1
    - name: Test
      uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08  # v3.0.2
      with:
        timeout_minutes: 30
        retry_on: error
        max_attempts: 3
        command: ./hack/test-upgrade.sh ${{ matrix.oldver }} ${{ github.sha }}
    - if: always()
      uses: ./.github/actions/upload_failure_logs_if_exists

  vz:
    name: "Integration tests (vz)"
    runs-on: macos-15-large  # Intel
    timeout-minutes: 120
    strategy:
      fail-fast: false
      matrix:
        template:
        - default.yaml
    steps:
    - name: "Adjust LIMACTL_CREATE_ARGS"
      # --cpus=1 is needed for running vz on GHA: https://github.com/lima-vm/lima/pull/1511#issuecomment-1574937888
      run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --cpus 1 --memory 1" >>$GITHUB_ENV
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Cache image used by templates/${{ matrix.template }}
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/${{ matrix.template }}
    - name: Install test dependencies
      run: brew install bash coreutils w3m socat
    - name: Uninstall qemu
      run: brew uninstall --ignore-dependencies --force qemu
    - name: Test
      run: ./hack/test-templates.sh templates/${{ matrix.template }}
    - if: failure()
      uses: ./.github/actions/upload_failure_logs_if_exists
      with:
        suffix: ${{ matrix.template }}

  # gomodjail is a library sandbox for Go
  # https://github.com/AkihiroSuda/gomodjail
  #
  # This is an early experiment.
  # CI failures that only occurs with gomodjail shall not block merging PRs.
  gomodjail:
    name: "gomodjail (experimental; failures shall not block merging PRs)"
    runs-on: macos-15-large  # Intel
    timeout-minutes: 30
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Install gomodjail
      run: |
        set -eux -o pipefail
        git clone https://github.com/AkihiroSuda/gomodjail
        cd gomodjail
        make binaries install
    - name: Install Lima
      # gomodjail depends on symbols
      run: |
        make KEEP_SYMBOLS=1 binaries
        sudo make install
    - name: Cache image used by templates/default.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/default.yaml
    - name: Smoke test
      run: gomodjail run --go-mod=./go.mod -- limactl start --tty=false

  cross:
    name: "Cross-compile (NetBSD, DragonFlyBSD)"
    runs-on: ubuntu-24.04
    timeout-minutes: 30
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - run: GOOS=netbsd go build ./...
    - run: GOOS=dragonfly go build ./...

  qemu-linux-old:
    name: "Smoke tests (QEMU, old Linux host)"
    runs-on: ubuntu-22.04  # QEMU 6.2
    timeout-minutes: 30
    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
    - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417  # v6.3.0
      with:
        go-version: stable
    - name: Make
      run: make
    - name: Install
      run: sudo make install
    - name: Cache image used by templates/default.yaml
      uses: ./.github/actions/setup_cache_for_template
      with:
        template: templates/default.yaml
    - name: Install test dependencies
      run: |
        sudo apt-get update
        sudo ./hack/install-qemu.sh
    - name: Smoke test
      run: limactl start --tty=false


================================================
FILE: .gitignore
================================================
_output/
_artifacts/
lima.REJECTED.yaml
default-template.yaml
schema-limayaml.json
.config


================================================
FILE: .gitmodules
================================================
[submodule "hack/bats/lib/bats-core"]
	path = hack/bats/lib/bats-core
	url = https://github.com/bats-core/bats-core.git
	branch = master
[submodule "hack/bats/lib/bats-file"]
	path = hack/bats/lib/bats-file
	url = https://github.com/bats-core/bats-file.git
	branch = master
[submodule "hack/bats/lib/bats-assert"]
	path = hack/bats/lib/bats-assert
	url = https://github.com/bats-core/bats-assert.git
	branch = master
[submodule "hack/bats/lib/bats-support"]
	path = hack/bats/lib/bats-support
	url = https://github.com/bats-core/bats-support.git
	branch = master


================================================
FILE: .golangci.yml
================================================
# golangci-lint configuration file.
# https://golangci-lint.run/usage/configuration/
version: "2"
run:
  concurrency: 6
linters:
  default: none
  enable:
  - bodyclose
  - copyloopvar
  - depguard
  - dupword
  - errcheck
  - errorlint
  - forbidigo
  - gocritic
  - godot
  - govet
  - ineffassign
  - intrange
  - misspell
  - modernize
  - nakedret
  - noctx
  - nolintlint
  - perfsprint
  - revive
  - staticcheck
  - unconvert
  - unused
  - usetesting
  - whitespace
  settings:
    depguard:
      rules:
        main:
          deny:
          - pkg: golang.org/x/net/context
            desc: use the 'context' package from the standard library
          - pkg: math/rand$
            desc: use the 'math/rand/v2' package
    errorlint:
      asserts: false
    forbidigo:
      forbid:
      - pattern: ^print(ln)?$
        msg: Do not use builtin print functions. It's for bootstrapping only and may be removed in the future.
      - pattern: ^fmt\.Print.*$
        msg: Do not use fmt.Print statements.
      - pattern: ^testing.T.Fatal.*$
        msg: Use assert functions from the gotest.tools/v3/assert package instead.
      - pattern: ^sort.*$
        msg: Use sorting functions from the slices package instead.
      analyze-types: true
    gocritic:
      disabled-checks:
      - appendCombine
      - sloppyReassign
      - unlabelStmt
      - rangeValCopy
      - hugeParam
      - importShadow
      - sprintfQuotedString
      - builtinShadow
      - filepathJoin
      # See "Tags" section in https://github.com/go-critic/go-critic#usage
      enabled-tags:
      - diagnostic
      - performance
      - style
      - opinionated
      - experimental
      settings:
        ifElseChain:
          # Min number of if-else blocks that makes the warning trigger.
          minThreshold: 3
    modernize:
      disable:
      - omitzero
    perfsprint:
      int-conversion: false
      integer-format: false
      err-error: false
      errorf: true
      sprintf1: false
      strconcat: false
      concat-loop: false
    revive:
      # Set below 0.8 to enable error-strings
      confidence: 0.6
      # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
      rules:
      - name: bare-return
      - name: blank-imports
      - name: context-as-argument
      - name: context-keys-type
      - name: deep-exit
      - name: dot-imports
        arguments:
        - allowedPackages:
          - github.com/lima-vm/lima/v2/pkg/must
      - name: empty-block
      - name: error-naming
      - name: error-return
      - name: error-strings
      - name: errorf
      - name: exported
        disabled: true
      - name: increment-decrement
      - name: indent-error-flow
      - name: package-comments
        disabled: true
      - name: package-directory-mismatch
      - name: range
      - name: receiver-naming
      - name: redefines-builtin-id
      - name: superfluous-else
      - name: time-naming
      - name: unexported-return
      - name: unnecessary-format
      - name: unreachable-code
      - name: unused-parameter
      - name: use-any
      - name: var-declaration
      - name: var-naming
    staticcheck:
      # https://staticcheck.dev/docs/configuration/options/#checks
      checks:
      - all
      - -QF1001  # apply De Morgan's law
      - -QF1008  # remove embedded field from selector
      - -SA3000  # false positive for Go 1.15+. See https://github.com/golang/go/issues/34129
      - -ST1000
      - -ST1001  # duplicates revive.dot-imports
      - -ST1022
    usetesting:
      os-temp-dir: true
      context-background: true
      context-todo: true
  exclusions:
    presets:
    - common-false-positives
    - legacy
    - std-error-handling
    rules:
    # Allow using Uid, Gid in pkg/osutil.
    - path: pkg/osutil/
      text: '(?i)(uid)|(gid)'
    # Disable some linters for test files.
    - linters:
      - godot
      path: _test\.go
    # Allow "api" package names in hostagent and guestagent.
    - linters:
      - revive
      path: pkg/(hostagent|guestagent)/api/
      text: avoid meaningless package names
issues:
  # Maximum issues count per one linter.
  max-issues-per-linter: 0
  # Maximum count of issues with the same text.
  max-same-issues: 0
formatters:
  enable:
  - gci
  - gofmt
  - gofumpt
  settings:
    gci:
      sections:
      - standard
      - default
      - localmodule


================================================
FILE: .ls-lint.yml
================================================
# ls-lint configuration file.
# https://ls-lint.org/2.2/configuration/the-basics.html
ls:
  .dir: kebab-case
  .go: snake_case
  .lima: snake_case
  .sh: kebab-case
  .TEMPLATE.yaml: kebab-case
  .yaml: kebab-case
  .yml: kebab-case

  .github:
    .yaml: snake_case

  cmd/limactl:
    # valid names are `show-ssh.go`, `show-ssh_windows.go` or `show-ssh_test.go`
    .go: lowercase

  templates:
    # _default and _images have leading underscores
    .dir: lowercase

  website/content:
    .dir: lowercase

ignore:
- .git
- .golangci.yml
- .ls-lint.yml
- '_output'
- '**/*.pb\.go'
- hack/common.inc.sh
- pkg/cidata/cidata.TEMPLATE.d
- pkg/cidata/cidata.TEMPLATE.d/util/compare_version.sh
- website
# "ubuntu-24.04" does not follow the kebab-case
- '**/ubuntu-*\.yaml'
# "boot.<OS>" does not follow the kebab-case
- '**/boot.*'


================================================
FILE: .markdownlint.json
================================================
{
  "first-line-h1": false,
  "no-inline-html": false,
  "blanks-around-headers": false,
  "blanks-around-lists": false,
  "blanks-around-fences": false,
  "commands-show-output": false,
  "ul-style": false,
  "line-length": false
}


================================================
FILE: .protolint.yaml
================================================
# This is the configuration for protolint.
# See https://github.com/yoheimuta/protolint/blob/v0.55.6/_example/config/.protolint.yaml for details.
---
lint:
  rules:
    # Enable all default rules.
    no_default: false
  rules_option:
    # MAX_LINE_LENGTH rule option.
    max_line_length:
      max_chars: 100


================================================
FILE: .shellcheckrc
================================================
source-path=SCRIPTDIR


================================================
FILE: .yamllint
================================================
---

extends: default

ignore: |
  # this is a yaml template, needs to be executed
  pkg/cidata/cloud-config.yaml

rules:
  indentation:
    indent-sequences: false
  truthy:
    allowed-values: ['true', 'false', 'on', 'off']
  comments-indentation: disable
  document-start: disable
  line-length: disable


================================================
FILE: LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: MAINTAINERS.md
================================================
Moved to <https://lima-vm.io/docs/community/governance/>.


================================================
FILE: Makefile
================================================
# 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://*$$::')

GO ?= go
TAR ?= tar
ZIP ?= zip
PLANTUML ?= plantuml # may also be "java -jar plantuml.jar" if installed elsewhere

GOARCH ?= $(shell $(GO) env GOARCH)
GOHOSTARCH := $(shell $(GO) env GOHOSTARCH)
GOHOSTOS := $(shell $(GO) env GOHOSTOS)
GOOS ?= $(shell $(GO) env GOOS)
ifeq ($(GOOS),windows)
bat = .bat
exe = .exe
endif

ifeq ($(GOOS),darwin)
MACOS_SDK_VERSION = $(shell xcrun --show-sdk-version | cut -d . -f 1)
# xcrun command seems to fail even when the SDK is available:
# > xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
ifeq ($(MACOS_SDK_VERSION),)
MACOS_SDK_VERSION = $(shell readlink /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk | sed -E -e "s/^MacOSX//" -e "s/\.[0-9]+\.sdk//")
endif
endif

DEFAULT_ADDITIONAL_DRIVERS :=
ifeq ($(GOOS),darwin)
ifeq ($(GOARCH),arm64)
ifeq ($(shell test $(MACOS_SDK_VERSION) -ge 14; echo $$?),0)
# krunkit needs macOS 14 or later: https://github.com/containers/libkrun/blob/main/README.md#macos-efi-variant
DEFAULT_ADDITIONAL_DRIVERS += krunkit
endif
endif
endif
ADDITIONAL_DRIVERS ?= $(DEFAULT_ADDITIONAL_DRIVERS)

GO_BUILDTAGS ?=
ifeq ($(GOOS),darwin)
ifeq ($(shell test $(MACOS_SDK_VERSION) -lt 13; echo $$?),0)
# The "vz" mode needs macOS 13 SDK or later
GO_BUILDTAGS += no_vz
endif
endif

ifeq ($(GOHOSTOS),windows)
WINVER_MAJOR=$(shell powershell.exe "[System.Environment]::OSVersion.Version.Major")
ifeq ($(WINVER_MAJOR),10)
WINVER_BUILD=$(shell powershell.exe "[System.Environment]::OSVersion.Version.Build")
WINVER_BUILD_HIGH_ENOUGH=$(shell powershell.exe $(WINVER_BUILD) -ge 19041)
ifeq ($(WINVER_BUILD_HIGH_ENOUGH),False)
GO_BUILDTAGS += no_wsl
endif
endif
endif

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

VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags 2>/dev/null)
VERSION_TRIMMED := $(VERSION:v%=%)

ifeq ($(VERSION),)
$(error VERSION could not be determined. Build from a git repo or run: make VERSION=vX.Y.Z)
endif

# `DEBUG` flag to build binaries with debug information for use by `dlv exec`.
# This implies KEEP_DWARF=1 and KEEP_SYMBOLS=1.
DEBUG ?=
GO_BUILD_GCFLAGS ?=
KEEP_DWARF ?=
KEEP_SYMBOLS ?=
ifeq ($(DEBUG),1)
	# Disable optimizations and inlining to make debugging easier.
	GO_BUILD_GCFLAGS = -gcflags="all=-N -l"
	# Keep the symbol table
	KEEP_DWARF = 1
	# Enable DWARF generation
	KEEP_SYMBOLS = 1
endif

GO_BUILD_LDFLAGS_W := true
ifeq ($(KEEP_DWARF),1)
	GO_BUILD_LDFLAGS_W = false
endif

GO_BUILD_LDFLAGS_S := true
ifeq ($(KEEP_SYMBOLS),1)
	GO_BUILD_LDFLAGS_S = false
endif
# `-s`: Strip the symbol table according to the KEEP_SYMBOLS config
# `-w`: Disable DWARF generation according to the KEEP_DWARF config
# `-X`: Embed version information.
GO_BUILD_LDFLAGS := -ldflags="-s=$(GO_BUILD_LDFLAGS_S) -w=$(GO_BUILD_LDFLAGS_W) -X $(PACKAGE)/pkg/version.Version=$(VERSION)"
# `go -version -m` returns -tags with comma-separated list, because space-separated list is deprecated in go1.13.
# converting to comma-separated list is useful for comparing with the output of `go version -m`.
GO_BUILD_FLAG_TAGS := $(addprefix -tags=,$(shell echo "$(GO_BUILDTAGS)"|tr " " "\n"|paste -sd "," -))
GO_BUILD := $(strip $(GO) build $(GO_BUILD_GCFLAGS) $(GO_BUILD_LDFLAGS) $(GO_BUILD_FLAG_TAGS))

################################################################################
# Features
.NOTPARALLEL:
.SECONDEXPANSION:

################################################################################
.PHONY: all
all: binaries manpages

################################################################################
# Help
.PHONY: help
help:
	@echo  '  binaries        - Build all binaries'
	@echo  '  manpages        - Build manual pages'
	@echo
	@echo  '  help-variables  - Show Makefile variables'
	@echo  '  help-targets    - Show additional Makefile targets'

.PHONY: help-variables
help-variables:
	@echo  '# Variables that can be overridden.'
	@echo
	@echo  '- PREFIX       (directory)  : Installation prefix (default: /usr/local)'
	@echo  '- KEEP_DWARF   (1 or 0)     : Whether to keep DWARF information (default: 0)'
	@echo  '- KEEP_SYMBOLS (1 or 0)     : Whether to keep symbols (default: 0)'
	@echo  '- DEBUG        (1 or 0)     : Whether to build with debug information (default: 0)'

.PHONY: help-targets
help-targets:
	@echo  '# Targets can be categorized by their location.'
	@echo
	@echo  'Targets for files in _output/bin/:'
	@echo  '- limactl                   : Build limactl, and lima'
	@echo  '- lima                      : Copy lima, and lima.bat'
	@echo  '- helpers                   : Copy nerdctl.lima, apptainer.lima, docker.lima, podman.lima, and kubectl.lima'
	@echo
	@echo  'Targets for files in _output/libexec/lima/:'
	@echo  '- limactl-plugins           : Build limactl-* CLI plugins'
	@echo
	@echo  'Targets for files in _output/share/lima/:'
	@echo  '- guestagents               : Build guestagents'
	@echo  '- native-guestagent         : Build guestagent for native arch'
	@echo  '- additional-guestagents    : Build guestagents for archs other than native arch'
	@echo  '- <arch>-guestagent         : Build guestagent for <arch>: $(sort $(LINUX_GUESTAGENT_ARCHS))'
	@echo
	@echo  'Targets for files in _output/share/lima/templates/:'
	@echo  '- templates                 : Copy templates'
	@echo  '- template_experimentals    : Copy experimental templates to experimental/'
	@echo  '- default_template          : Copy default.yaml template'
	@echo  '- update-templates          : Update templates'
	@echo
	@echo  'Targets for files in _output/share/doc/lima:'
	@echo  '- documentation             : Copy documentation to _output/share/doc/lima'
	@echo  '- create-links-in-doc-dir   : Create some symlinks pointing ../../lima/templates'
	@echo
	@echo  '# e.g. to install limactl, helpers, native guestagent, and templates:'
	@echo  '#   make native install'

.PHONY: help-artifact
help-artifact:
	@echo  '# Targets for building artifacts to _artifacts/'
	@echo
	@echo  'Targets to building multiple archs artifacts for GOOS:'
	@echo  '- artifacts                 : Build artifacts for current OS and supported archs'
	@echo  '- artifacts-<GOOS>          : Build artifacts for supported archs and <GOOS>: darwin, linux, or windows'
	@echo
	@echo  'Targets to building GOOS and ARCH (GOARCH, or uname -m) specific artifacts:'
	@echo  '- artifact                  : Build artifacts for current GOOS and GOARCH'
	@echo  '- artifact-<GOOS>           : Build artifacts for current GOARCH and <GOOS>: darwin, linux, or windows'
	@echo  '- artifact-<ARCH>           : Build artifacts for current GOOS with <ARCH>: amd64, arm64, x86_64, or aarch64'
	@echo  '- artifact-<GOOS>-<ARCH>    : Build artifacts for <GOOS> and <ARCH>'
	@echo
	@echo  '# GOOS and GOARCH can be specified with make parameters or environment variables.'
	@echo  '# e.g. to build artifact for linux and arm64:'
	@echo  '#   make GOOS=linux GOARCH=arm64 artifact'
	@echo
	@echo  'Targets for miscellaneous artifacts:'
	@echo  '- artifacts-misc            : Build artifacts for go.mod, go.sum, and vendor'

################################################################################
# convenience targets
exe: _output/bin/limactl$(exe)

.PHONY: minimal native
minimal: clean limactl native-guestagent default_template
native: clean limactl limactl-plugins helpers native-guestagent templates template_experimentals additional-drivers

################################################################################
# These configs were once customizable but should no longer be changed.
CONFIG_GUESTAGENT_OS_LINUX=y
CONFIG_GUESTAGENT_OS_DARWIN=
ifeq ($(GOOS),darwin)
ifeq ($(GOARCH),arm64)
CONFIG_GUESTAGENT_OS_DARWIN=y
endif
endif
CONFIG_GUESTAGENT_ARCH_X8664=y
CONFIG_GUESTAGENT_ARCH_AARCH64=y
CONFIG_GUESTAGENT_ARCH_ARMV7L=y
CONFIG_GUESTAGENT_ARCH_PPC64LE=y
CONFIG_GUESTAGENT_ARCH_RISCV64=y
CONFIG_GUESTAGENT_ARCH_S390X=y
CONFIG_GUESTAGENT_COMPRESS=y

################################################################################
.PHONY: binaries
binaries: limactl helpers limactl-plugins guestagents \
	templates template_experimentals \
	documentation create-links-in-doc-dir

################################################################################
# _output/bin
.PHONY: limactl lima helpers
limactl: _output/bin/limactl$(exe) lima

### Listing Dependencies

# returns a list of files expanded from $(1) excluding directories and files ending with '_test.go'.
find_files_excluding_dir_and_test = $(shell find $(1) ! -type d ! -name '*_test.go')
FILES_IN_PKG = $(call find_files_excluding_dir_and_test, ./pkg)

# returns a list of files which are dependencies for the command $(1).
dependencies_for_cmd = go.mod $(call find_files_excluding_dir_and_test, ./cmd/$(1)) $(FILES_IN_PKG)

### Force Building Targets

# returns GOVERSION, CGO*, GO*, -ldflags, and -tags build variables from the output of `go version -m $(1)`.
# When CGO_* variables are not set, they are not included in the output.
# Because the CGO_* variables are not set means that those values are default values,
# it can be assumed that those values are same if the GOVERSION is same.
# $(1): target binary
extract_build_vars = $(shell \
	($(GO) version -m $(1) 2>&- || echo $(1):) | \
	awk 'FNR==1{print "GOVERSION="$$2}$$2~/^(CGO|GO|-gcflags|-ldflags|-tags).*=.+$$/{sub("^.*"$$2,$$2); print $$0}' \
)

# a list of keys from the GO build variables to be used for calling `go env`.
# keys starting with '-' are excluded because `go env` does not support those keys.
# $(1): extracted build variables from the binary
keys_in_build_vars = $(filter-out -%,$(shell for i in $(1); do echo $${i%%=*}; done))

# a list of GO build variables to build the target binary.
# $(1): target binary. expecting ENVS_$(2) is set to use the environment variables for the target binary.
# $(2): key of the GO build variable to be used for calling `go env`.
go_build_vars = $(shell \
	$(ENVS_$(1)) $(GO) env $(2) | \
	awk '/ /{print "\""$$0"\""; next}{print}' | \
	for k in $(2); do read -r v && echo "$$k=$${v}"; done \
) $(GO_BUILD_GCFLAGS) $(GO_BUILD_LDFLAGS) $(GO_BUILD_FLAG_TAGS)

# returns the difference between $(1) and $(2).
diff = $(filter-out $(2),$(1))$(filter-out $(1),$(2))

# returns diff between the GO build variables in the binary $(1) and the building variables.
# $(1): target binary
# $(2): extracted GO build variables from the binary
compare_build_vars = $(call diff,$(call go_build_vars,$(1),$(call keys_in_build_vars,$(2))),$(2))

# returns "force" if the GO build variables in the binary $(1) is different from the building variables.
# $(1): target binary. expecting ENVS_$(1) is set to use the environment variables for the target binary.
force_build = $(if $(call compare_build_vars,$(1),$(call extract_build_vars,$(1))),force,)

# returns the file name without .gz extension. It also gunzips the file with .gz extension if exists.
# $(1): target file
gunzip_if_exists = $(shell f=$(1); f=$${f%.gz}; test -f "$${f}.gz" && (set -x; gunzip -f "$${f}.gz") ; echo "$${f}")

# call force_build with passing output of gunzip_if_exists as an argument.
# $(1): target file
force_build_with_gunzip = $(call force_build,$(call gunzip_if_exists,$(1)))

force: # placeholder for force build

################################################################################
# _output/bin/limactl$(exe)

# dependencies for limactl
LIMACTL_DEPS = $(call dependencies_for_cmd,limactl)
ifeq ($(GOOS),darwin)
LIMACTL_DEPS += vz.entitlements
endif

# environment variables for limactl. this variable is used for checking force build.
#
# The hostagent must be compiled with CGO_ENABLED=1 so that net.LookupIP() in the DNS server
# calls the native resolver library and not the simplistic version in the Go library.
ENVS__output/bin/limactl$(exe) = CGO_ENABLED=1 GOOS="$(GOOS)" GOARCH="$(GOARCH)" CC="$(CC)"

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

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

_output/bin/limactl$(exe): $(LIMACTL_DEPS) $$(call force_build,$$@)
ifneq ($(GOOS),windows) #
	@rm -rf _output/bin/limactl.exe
else
	@rm -rf _output/bin/limactl
endif
	$(ENVS_$@) $(GO_BUILD) -tags '$(GO_BUILDTAGS_LIMACTL)' -o $@ ./cmd/limactl
ifeq ($(GOOS),darwin)
	codesign -f -v --entitlements vz.entitlements -s - $@
endif

LIBEXEC_LIMA := _output/libexec/lima

limactl-plugins: $(LIBEXEC_LIMA)/limactl-mcp$(exe) $(LIBEXEC_LIMA)/limactl-url-fedora-rawhide

$(LIBEXEC_LIMA)/limactl-mcp$(exe): $(call dependencies_for_cmd,limactl-mcp) $$(call force_build,$$@)
	@mkdir -p $(LIBEXEC_LIMA)
	$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/limactl-mcp

$(LIBEXEC_LIMA)/limactl-url-fedora-rawhide: cmd/limactl-url-fedora-rawhide
	cp -aL $< $@

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

LIMA_CMDS = $(sort lima lima$(bat)) # $(sort ...) deduplicates the list
LIMA_DEPS = $(addprefix _output/bin/,$(LIMA_CMDS))
lima: $(LIMA_DEPS)

HELPER_CMDS = nerdctl.lima apptainer.lima docker.lima podman.lima kubectl.lima
HELPERS_DEPS = $(addprefix _output/bin/,$(HELPER_CMDS))
helpers: $(HELPERS_DEPS)

_output/bin/%: ./cmd/% | _output/bin
	cp -a $< $@

MKDIR_TARGETS += _output/bin

################################################################################
# _output/share/lima/lima-guestagent
LINUX_GUESTAGENT_PATH_COMMON = _output/share/lima/lima-guestagent.Linux-
DARWIN_GUESTAGENT_PATH_COMMON = _output/share/lima/lima-guestagent.Darwin-

# How to add architecture specific guestagent:
# 1. Add the architecture to GUESTAGENT_ARCHS
# 2. Add ENVS_$(*_GUESTAGENT_PATH_COMMON)<arch> to set GOOS, GOARCH, and other necessary environment variables
LINUX_GUESTAGENT_ARCHS = aarch64 armv7l ppc64le riscv64 s390x x86_64
DARWIN_GUESTAGENT_ARCHS = aarch64

ifeq ($(CONFIG_GUESTAGENT_OS_LINUX),y)
ALL_GUESTAGENTS_NOT_COMPRESSED += $(addprefix $(LINUX_GUESTAGENT_PATH_COMMON),$(LINUX_GUESTAGENT_ARCHS))
endif
ifeq ($(CONFIG_GUESTAGENT_OS_DARWIN),y)
ALL_GUESTAGENTS_NOT_COMPRESSED += $(addprefix $(DARWIN_GUESTAGENT_PATH_COMMON),$(DARWIN_GUESTAGENT_ARCHS))
endif
ifeq ($(CONFIG_GUESTAGENT_COMPRESS),y)
gz=.gz
endif

ALL_GUESTAGENTS = $(addsuffix $(gz),$(ALL_GUESTAGENTS_NOT_COMPRESSED))

# guestagent path for the given platform. it may has .gz extension if CONFIG_GUESTAGENT_COMPRESS is enabled.
# $(1): operating system (os)
# $(2): list of architectures
guestagent_path = $(foreach arch,$(2),$($(1)_GUESTAGENT_PATH_COMMON)$(arch)$(gz))

ifeq ($(CONFIG_GUESTAGENT_OS_LINUX),y)
NATIVE_GUESTAGENT_ARCH = $(shell echo $(GOARCH) | sed -e s/arm64/aarch64/ -e s/arm/armv7l/ -e s/amd64/x86_64/)
NATIVE_GUESTAGENT = $(call guestagent_path,LINUX,$(NATIVE_GUESTAGENT_ARCH))
ADDITIONAL_GUESTAGENT_ARCHS = $(filter-out $(NATIVE_GUESTAGENT_ARCH),$(LINUX_GUESTAGENT_ARCHS))
ADDITIONAL_GUESTAGENTS = $(call guestagent_path,LINUX,$(ADDITIONAL_GUESTAGENT_ARCHS))
endif
ifeq ($(CONFIG_GUESTAGENT_OS_DARWIN),y)
ifeq ($(GOARCH),arm64)
NATIVE_GUESTAGENT_ARCH = aarch64
NATIVE_GUESTAGENT += $(call guestagent_path,DARWIN,$(NATIVE_GUESTAGENT_ARCH))
endif
endif
# No ADDITIONAL_GUESTAGENTS for Darwin, as only one architecture is supported.

# config_guestagent_arch returns expanded value of CONFIG_GUESTAGENT_ARCH_<arch>
# $(1): architecture
# CONFIG_GUESTAGENT_ARCH_<arch> naming convention: uppercase, remove '_'
config_guestagent_arch = $(filter y,$(CONFIG_GUESTAGENT_ARCH_$(shell echo $(1)|tr -d _|tr a-z A-Z)))

# guestagent_path_enabled_by_config returns the path to the guestagent binary for the given architecture,
# or an empty string if the CONFIG_GUESTAGENT_ARCH_<arch> is not set.
guestagent_path_enabled_by_config = $(if $(call config_guestagent_arch,$(2)),$(call guestagent_path,$(1),$(2)))

ifeq ($(CONFIG_GUESTAGENT_OS_LINUX),y)
# apply CONFIG_GUESTAGENT_ARCH_*
GUESTAGENTS += $(foreach arch,$(LINUX_GUESTAGENT_ARCHS),$(call guestagent_path_enabled_by_config,LINUX,$(arch)))
endif
ifeq ($(CONFIG_GUESTAGENT_OS_DARWIN),y)
GUESTAGENTS += $(call guestagent_path,DARWIN,aarch64)
endif

.PHONY: guestagents native-guestagent additional-guestagents
guestagents: $(GUESTAGENTS)
native-guestagent: $(NATIVE_GUESTAGENT)
additional-guestagents: $(ADDITIONAL_GUESTAGENTS)
%-guestagent:
	@[ "$(findstring $(*),$(LINUX_GUESTAGENT_ARCHS))" == "$(*)" ] && make $(call guestagent_path,LINUX,$*)
	@[ "$(findstring $(*),$(DARWIN_GUESTAGENT_ARCHS))" == "$(*)" ] && make $(call guestagent_path,DARWIN,$*)

# environment variables for linux-guestagent. these variable are used for checking force build.
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)aarch64 = CGO_ENABLED=0 GOOS=linux GOARCH=arm64
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)armv7l = CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)ppc64le = CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)riscv64 = CGO_ENABLED=0 GOOS=linux GOARCH=riscv64
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)s390x = CGO_ENABLED=0 GOOS=linux GOARCH=s390x
ENVS_$(LINUX_GUESTAGENT_PATH_COMMON)x86_64 = CGO_ENABLED=0 GOOS=linux GOARCH=amd64
ENVS_$(DARWIN_GUESTAGENT_PATH_COMMON)aarch64 = CGO_ENABLED=0 GOOS=darwin GOARCH=arm64
$(ALL_GUESTAGENTS_NOT_COMPRESSED): $(call dependencies_for_cmd,lima-guestagent) $$(call force_build_with_gunzip,$$@) | _output/share/lima
	$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/lima-guestagent
	chmod 644 $@
$(LINUX_GUESTAGENT_PATH_COMMON)%.gz: $(LINUX_GUESTAGENT_PATH_COMMON)% $$(call force_build_with_gunzip,$$@)
	@set -x; gzip -n $<
$(DARWIN_GUESTAGENT_PATH_COMMON)%.gz: $(DARWIN_GUESTAGENT_PATH_COMMON)% $$(call force_build_with_gunzip,$$@)
	@set -x; gzip -n $<

MKDIR_TARGETS += _output/share/lima

################################################################################
# _output/share/lima/templates
TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard templates/*))))
TEMPLATE_DEFAULTS = ${addprefix _output/share/lima/templates/_default/,$(notdir $(wildcard templates/_default/*))}
TEMPLATE_IMAGES = $(addprefix _output/share/lima/templates/_images/,$(notdir $(wildcard templates/_images/*)))
TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard templates/experimental/*)))

.PHONY: default_template templates template_experimentals
default_template: _output/share/lima/templates/default.yaml
templates: $(TEMPLATES) $(TEMPLATE_DEFAULTS) $(TEMPLATE_IMAGES)
template_experimentals: $(TEMPLATE_EXPERIMENTALS)

$(TEMPLATES): | _output/share/lima/templates
$(TEMPLATE_DEFAULTS): | _output/share/lima/templates/_default
$(TEMPLATE_IMAGES): | _output/share/lima/templates/_images
$(TEMPLATE_EXPERIMENTALS): | _output/share/lima/templates/experimental
MKDIR_TARGETS += _output/share/lima/templates _output/share/lima/templates/_default _output/share/lima/templates/_images _output/share/lima/templates/experimental

_output/share/lima/templates/%: templates/%
	cp -aL $< $@

# returns "force" if GOOS==windows, or GOOS!=windows and the file $(1) is not a symlink.
# $(1): target file
# On Windows, always copy to ensure the target has the same file as the source.
force_link = $(if $(filter windows,$(GOOS)),force,$(shell test ! -L $(1) && echo force))

################################################################################
# templates/_images

# fedora-N.yaml should not be updated to refer to Fedora N+1 images
TEMPLATES_TO_BE_UPDATED = $(filter-out $(wildcard templates/_images/fedora*.yaml),$(wildcard templates/_images/*.yaml))

.PHONY: update-templates
update-templates: $(TEMPLATES_TO_BE_UPDATED)
	./hack/update-template.sh $^

################################################################################
# _output/share/doc/lima
DOCUMENTATION = $(addprefix _output/share/doc/lima/,$(wildcard *.md) LICENSE SECURITY.md VERSION)

.PHONY: documentation
documentation: $(DOCUMENTATION)

_output/share/doc/lima/SECURITY.md: | _output/share/doc/lima
	echo "Moved to https://github.com/lima-vm/.github/blob/main/SECURITY.md" > $@

_output/share/doc/lima/VERSION: | _output/share/doc/lima
	echo $(VERSION) > $@

_output/share/doc/lima/%: % | _output/share/doc/lima
	cp -aL $< $@

MKDIR_TARGETS += _output/share/doc/lima

.PHONY: create-links-in-doc-dir
create-links-in-doc-dir: _output/share/doc/lima/templates
_output/share/doc/lima/templates: _output/share/lima/templates $$(call force_link,$$@)
# remove the existing directory or symlink
	rm -rf $@
ifneq ($(GOOS),windows)
	ln -sf ../../lima/templates $@
else
# copy from templates built in build process
	cp -aL $< $@
endif

################################################################################
# returns difference between GOOS GOARCH and GOHOSTOS GOHOSTARCH.
cross_compiling = $(call diff,$(GOOS) $(GOARCH),$(GOHOSTOS) $(GOHOSTARCH))
# returns true if cross_compiling is empty.
native_compiling = $(if $(cross_compiling),,true)

################################################################################
# _output/share/man/man1
.PHONY: manpages
# Set limactl.1 as explicit dependency.
# It's uncertain how many manpages will be generated by `make`,
# because `limactl` generates them without corresponding source code for the manpages.
manpages: _output/share/man/man1/limactl.1
_output/share/man/man1/limactl.1: _output/bin/limactl$(exe)
	@mkdir -p _output/share/man/man1
ifeq ($(native_compiling),true)
# The manpages are generated by limactl, so the limactl binary must be native.
	$< generate-doc _output/share/man/man1 \
		--output _output --prefix $(PREFIX)
endif

################################################################################
.PHONY: docsy
# Set limactl.md as explicit dependency.
# It's uncertain how many docsy pages will be generated by `make`,
# because `limactl` generates them without corresponding source code for the docsy pages.
docsy: website/_output/docsy/limactl.md website/_output/docsy-mcp/mcp.md
website/_output/docsy/limactl.md: _output/bin/limactl$(exe)
	@mkdir -p website/_output/docsy
ifeq ($(native_compiling),true)
# The docs are generated by limactl, so the limactl binary must be native.
	$< generate-doc --type docsy website/_output/docsy \
		--output _output --prefix $(PREFIX)
endif
website/_output/docsy-mcp/mcp.md: _output/libexec/lima/limactl-mcp$(exe)
	@mkdir -p website/_output/docsy-mcp
ifeq ($(native_compiling),true)
	$< generate-doc website/_output/docsy-mcp
endif

################################################################################
default-template.yaml: _output/bin/limactl$(exe)
ifeq ($(native_compiling),true)
	$< tmpl copy --embed-all templates/default.yaml $@
endif

schema-limayaml.json: _output/bin/limactl$(exe) templates/default.yaml default-template.yaml
ifeq ($(native_compiling),true)
	# validate both the original template (with the "base" etc), and the embedded template
	$< generate-jsonschema --schemafile $@ templates/default.yaml default-template.yaml
endif

.PHONY: check-jsonschema
check-jsonschema: schema-limayaml.json templates/default.yaml default-template.yaml
	check-jsonschema --schemafile schema-limayaml.json templates/default.yaml default-template.yaml

################################################################################
.PHONY: diagrams
diagrams: docs/lima-sequence-diagram.png
docs/lima-sequence-diagram.png: docs/images/lima-sequence-diagram.puml
	$(PLANTUML) ./docs/images/lima-sequence-diagram.puml

################################################################################
.PHONY: install
install: uninstall
	mkdir -p "$(DEST)"
	# Use tar rather than cp, for better symlink handling
	( cd _output && $(TAR) c * | $(TAR) -xv --no-same-owner -C "$(DEST)" )
	if [ "$(shell uname -s )" != "Linux" -a ! -e "$(DEST)/bin/nerdctl" ]; then ln -sf nerdctl.lima "$(DEST)/bin/nerdctl"; fi
	if [ "$(shell uname -s )" != "Linux" -a ! -e "$(DEST)/bin/apptainer" ]; then ln -sf apptainer.lima "$(DEST)/bin/apptainer"; fi

.PHONY: uninstall
uninstall:
	@test -f "$(DEST)/bin/lima" || echo "lima not found in $(DEST) prefix"
	rm -rf \
		"$(DEST)/bin/lima" \
		"$(DEST)/bin/lima$(bat)" \
		"$(DEST)/bin/limactl$(exe)" \
		"$(DEST)/bin/nerdctl.lima" \
		"$(DEST)/bin/apptainer.lima" \
		"$(DEST)/bin/docker.lima" \
		"$(DEST)/bin/podman.lima" \
		"$(DEST)/bin/kubectl.lima" \
		"$(DEST)/share/man/man1/lima.1" \
		"$(DEST)/share/man/man1/limactl"*".1" \
		"$(DEST)/share/lima" \
		"$(DEST)/share/doc/lima" \
		"$(DEST)/libexec/lima/limactl-mcp$(exe)" \
		"$(DEST)/libexec/lima/limactl-url-fedora-rawhide" \
		"$(DEST)/libexec/lima/lima-driver-qemu$(exe)" \
		"$(DEST)/libexec/lima/lima-driver-vz$(exe)" \
		"$(DEST)/libexec/lima/lima-driver-wsl2$(exe)" \
		"$(DEST)/libexec/lima/lima-driver-krunkit$(exe)"
	if [ "$$(readlink "$(DEST)/bin/nerdctl")" = "nerdctl.lima" ]; then rm "$(DEST)/bin/nerdctl"; fi
	if [ "$$(readlink "$(DEST)/bin/apptainer")" = "apptainer.lima" ]; then rm "$(DEST)/bin/apptainer"; fi

.PHONY: check-generated
check-generated:
	git diff --exit-code || \
		(echo "Please run 'make generate' when making changes to proto files and check-in the generated file changes" && false)

.PHONY: bats
bats: native limactl-plugins
	PATH=$$PWD/_output/bin:$$PATH ./hack/bats/lib/bats-core/bin/bats --timing ./hack/bats/tests

.PHONY: lint
lint: check-generated
	nobin --allow-emoji --allow-escape --gitignore --skip-ext pb.desc --skip 'website/static/images/**/*.{gif,png}' --skip 'docs/reports/**/*.pdf'
	editorconfig-checker
	golangci-lint run ./...
	yamllint .
	ls-lint
	find . -name '*.sh' ! -path "./.git/*" | xargs shellcheck
	find . -name '*.sh' ! -path "./.git/*" | xargs shfmt -s -d
	# the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
	# hashicorp/hcl/v2 is MPL-2.0; covered by the CNCF license exception for hashicorp/hcl
	# see also https://github.com/cncf/foundation/issues/1242
	go-licenses check --include_tests --ignore github.com/hashicorp/hcl/v2 ./... --allowed_licenses=$$(cat ./hack/allowed-licenses.txt)
	ltag -t ./hack/ltag --check -v
	protolint .

.PHONY: clean
clean:
	rm -rf _output vendor

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

.PHONY: generate
generate:
	go generate ./...

################################################################################
# _artifacts/lima-$(VERSION_TRIMMED)-$(ARTIFACT_OS)-$(ARTIFACT_UNAME_M)
# _artifacts/lima-additional-guestagents-$(VERSION_TRIMMED)-$(ARTIFACT_OS)-$(ARTIFACT_UNAME_M)
.PHONY: artifact

# returns the capitalized string of $(1).
capitalize = $(shell echo "$(1)"|awk '{print toupper(substr($$0,1,1)) tolower(substr($$0,2))}')

# returns the architecture name converted from GOARCH to GNU coreutils uname -m.
to_uname_m = $(foreach arch,$(1),$(shell echo $(arch) | sed 's/amd64/x86_64/' | sed 's/arm64/aarch64/'))

ARTIFACT_FILE_EXTENSIONS := .tar.gz

ifeq ($(GOOS),darwin)
# returns the architecture name converted from GOARCH to macOS's uname -m.
to_uname_m = $(foreach arch,$(1),$(shell echo $(arch) | sed 's/amd64/x86_64/'))
else ifeq ($(GOOS),linux)
# CC is required for cross-compiling on Linux.
# On Debian, Ubuntu, and related distributions, compilers are named like x86_64-linux-gnu-gcc
# On Fedora, RHEL, and related distributions, the equivalent is x86_64-redhat-linux-gcc
# On openSUSE and as a generic fallback, gcc is used
CC := $(shell \
	if command -v $(call to_uname_m,$(GOARCH))-redhat-linux-gcc >/dev/null 2>&1; then \
		echo $(call to_uname_m,$(GOARCH))-redhat-linux-gcc; \
	elif command -v $(call to_uname_m,$(GOARCH))-linux-gnu-gcc >/dev/null 2>&1; then \
		echo $(call to_uname_m,$(GOARCH))-linux-gnu-gcc; \
	else \
		echo gcc; \
	fi)
else ifeq ($(GOOS),windows)
# artifact in zip format also provided for Windows.
ARTIFACT_FILE_EXTENSIONS += .zip
endif

# artifacts: artifacts-$(GOOS)
ARTIFACT_OS = $(call capitalize,$(GOOS))
ARTIFACT_UNAME_M = $(call to_uname_m,$(GOARCH))
ARTIFACT_PATH_COMMON = _artifacts/lima-$(VERSION_TRIMMED)-$(ARTIFACT_OS)-$(ARTIFACT_UNAME_M)
ARTIFACT_ADDITIONAL_GUESTAGENTS_PATH_COMMON = _artifacts/lima-additional-guestagents-$(VERSION_TRIMMED)-$(ARTIFACT_OS)-$(ARTIFACT_UNAME_M)

artifact: $(addprefix $(ARTIFACT_PATH_COMMON),$(ARTIFACT_FILE_EXTENSIONS)) \
	$(addprefix $(ARTIFACT_ADDITIONAL_GUESTAGENTS_PATH_COMMON),$(ARTIFACT_FILE_EXTENSIONS))

ARTIFACT_DES =  _output/bin/limactl$(exe) limactl-plugins $(LIMA_DEPS) $(HELPERS_DEPS) \
	$(NATIVE_GUESTAGENT) \
	$(TEMPLATES) $(TEMPLATE_IMAGES) $(TEMPLATE_DEFAULTS) $(TEMPLATE_EXPERIMENTALS) \
	additional-drivers \
	$(DOCUMENTATION) _output/share/doc/lima/templates \
	_output/share/man/man1/limactl.1

# file targets
$(ARTIFACT_PATH_COMMON).tar.gz: $(ARTIFACT_DES) | _artifacts
	$(TAR) -C _output/ --no-xattrs -czvf $@ ./

$(ARTIFACT_ADDITIONAL_GUESTAGENTS_PATH_COMMON).tar.gz:
	# FIXME: do not exec make from make
	make clean additional-guestagents
	$(TAR) -C _output/ --no-xattrs -czvf $@ ./

$(ARTIFACT_PATH_COMMON).zip: $(ARTIFACT_DES) | _artifacts
	cd _output && $(ZIP) -r ../$@ *

$(ARTIFACT_ADDITIONAL_GUESTAGENTS_PATH_COMMON).zip:
	make clean additional-guestagents
	cd _output && $(ZIP) -r ../$@ *

# generate manpages using native limactl.
manpages-using-native-limactl: GOOS = $(GOHOSTOS)
manpages-using-native-limactl: GOARCH = $(GOHOSTARCH)
manpages-using-native-limactl: manpages

# returns "manpages-using-native-limactl" if $(1) is not equal to $(GOHOSTOS).
# $(1): GOOS
generate_manpages_if_needed = $(if $(filter $(if $(1),$(1),$(GOOS)),$(GOHOSTOS)),,manpages-using-native-limactl)

# build native arch first, then build other archs.
artifact_goarchs = arm64 amd64
goarchs_native_and_others = $(GOHOSTARCH) $(filter-out $(GOHOSTARCH),$(artifact_goarchs))

# artifacts is artifact bundles for each OS.
# if target GOOS is native, build native arch first, generate manpages, then build other archs.
# if target GOOS is not native, build native limactl, generate manpages, then build the target GOOS with archs.
.PHONY: artifacts artifacts-darwin artifacts-linux artifacts-windows
artifacts: $$(addprefix artifact-$$(GOOS)-,$$(goarchs_native_and_others))
artifacts-darwin: $$(call generate_manpages_if_needed,darwin) $$(addprefix artifact-darwin-,$$(goarchs_native_and_others))
artifacts-linux: $$(call generate_manpages_if_needed,linux) $$(addprefix artifact-linux-,$$(goarchs_native_and_others))
artifacts-windows: $$(call generate_manpages_if_needed,windows) $$(addprefix artifact-windows-,$$(goarchs_native_and_others))

# set variables for artifact variant targets.
artifact-darwin% artifact-darwin: GOOS = darwin
artifact-linux% artifact-linux: GOOS = linux
artifact-windows% artifact-windows: GOOS = windows
artifact-%-amd64 artifact-%-x86_64 artifact-amd64 artifact-x86_64: GOARCH = amd64
artifact-%-arm64 artifact-%-aarch64 artifact-arm64 artifact-aarch64: GOARCH = arm64

# build cross arch binaries.
artifact-%: $$(call generate_manpages_if_needed)
	make clean artifact GOOS=$(GOOS) GOARCH=$(GOARCH)

.PHONY: artifacts-misc
artifacts-misc: | _artifacts
	go mod vendor
	$(TAR) --no-xattrs -czf _artifacts/lima-$(VERSION_TRIMMED)-go-mod-vendor.tar.gz go.mod go.sum vendor

MKDIR_TARGETS += _artifacts

################################################################################
# This target must be placed after any changes to the `MKDIR_TARGETS` variable.
# It seems that variable expansion in Makefile targets is not done recursively.
$(MKDIR_TARGETS):
	mkdir -p $@


================================================
FILE: NOTICE
================================================
Lima
Copyright The Lima Authors.

This project contains portions of other projects that are licensed under the terms of Apache License 2.0.
The NOTICE files of those projects are replicated here for compliance of the section 4(d) of the license.

=== https://github.com/containerd/containerd ===
https://github.com/containerd/containerd/blob/v2.1.1/LICENSE
https://github.com/containerd/containerd/blob/v2.1.1/NOTICE

> Docker
> Copyright 2012-2015 Docker, Inc.
>
> This product includes software developed at Docker, Inc. (https://www.docker.com).
>
> The following is courtesy of our legal counsel:
>
>
> Use and transfer of Docker may be subject to certain restrictions by the
> United States and other governments.
> It is your responsibility to ensure that your use and/or transfer does not
> violate applicable laws.
>
> For more information, please see https://www.bis.doc.gov
>
> See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.


================================================
FILE: README.md
================================================
[[🌎**Web site**]](https://lima-vm.io/)
[[📖**Documentation**]](https://lima-vm.io/docs/)
[[👤**Slack (`#lima`)**]](https://slack.cncf.io)

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="website/static/images/logo-dark.svg">
  <img alt="Shows a stylized 'Lima' text in bold, modern font" src="website/static/images/logo.svg" width=400 />
</picture>

# Lima: Linux Machines

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/lima-vm/lima)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/6505/badge)](https://www.bestpractices.dev/projects/6505)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/lima-vm/lima/badge)](https://scorecard.dev/viewer/?uri=github.com/lima-vm/lima)

[Lima](https://lima-vm.io/) launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2).

The original goal of Lima was to promote [containerd](https://containerd.io) including [nerdctl (contaiNERD ctl)](https://github.com/containerd/nerdctl)
to Mac users, but Lima can be used for non-container applications as well.

Lima also supports other container engines (Docker, Podman, Kubernetes, etc.) and non-macOS hosts (Linux, NetBSD, etc.).

## Getting started
Set up (Homebrew):
```bash
brew install lima
limactl start
```

To run Linux commands:
```bash
lima uname -a
```

To run containers with containerd:
```bash
lima nerdctl run --rm hello-world
```

To run containers with Docker:
```bash
limactl start template:docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run --rm hello-world
```

To run containers with Kubernetes:
```bash
limactl start template:k8s
export KUBECONFIG=$(limactl list k8s --format 'unix://{{.Dir}}/copied-from-guest/kubeconfig.yaml')
kubectl apply -f ...
```

See <https://lima-vm.io/docs/> for the further information.

## Contributing

We welcome contributions! Please see our [Contributing Guide](https://lima-vm.io/docs/community/contributing/) for details on:

- **Developer Certificate of Origin (DCO)**: All commits must be signed off with `git commit -s`
- Code licensing and pull request guidelines
- Testing requirements

## Community
### Adopters

Container environments:
- [Rancher Desktop](https://rancherdesktop.io/): Kubernetes and container management to the desktop
- [Colima](https://github.com/abiosoft/colima): Docker (and Kubernetes) on macOS with minimal setup
- [Finch](https://github.com/runfinch/finch): Finch is a command line client for local container development
- [Podman Desktop](https://podman-desktop.io/): Podman Desktop GUI has a plug-in for Lima virtual machines

GUI:
- [Lima xbar plugin](https://github.com/unixorn/lima-xbar-plugin): [xbar](https://xbarapp.com/) plugin to start/stop VMs from the menu bar and see their running status.
- [lima-gui](https://github.com/afbjorklund/lima-gui): Qt GUI for Lima

### Communication channels
<!-- Duplicated from https://lima-vm.io/docs/community/ -->
- [GitHub Discussions](https://github.com/lima-vm/lima/discussions)
- `#lima` channel in the CNCF Slack
  - New account: <https://slack.cncf.io/>
  - Login: <https://cloud-native.slack.com/>
- Zoom meetings (tentatively monthly)
  - Meeting notes & agenda proposals: https://github.com/lima-vm/lima/discussions/categories/meetings
  - Calendar: https://zoom-lfx.platform.linuxfoundation.org/meetings/lima

### Social media accounts

Follow us for project updates, release announcements, and community news:

- https://x.com/@TheLimaProject
- https://mastodon.social/@TheLimaProject

### Code of Conduct
Lima follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).

- - -
**We are a [Cloud Native Computing Foundation](https://cncf.io/) incubating project.**

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://www.cncf.io/wp-content/uploads/2022/07/cncf-white-logo.svg">
  <img src="https://www.cncf.io/wp-content/uploads/2022/07/cncf-color-bg.svg" width=300 />
</picture>

The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see [Trademark Usage](https://www.linuxfoundation.org/legal/trademark-usage).


================================================
FILE: ROADMAP.md
================================================
Moved to <https://lima-vm.io/docs/community/roadmap/>.


================================================
FILE: cmd/apptainer.lima
================================================
#!/bin/sh
set -eu
: "${LIMA_INSTANCE:=apptainer}"
: "${APPTAINER_BINDPATH:=}"

if [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
  echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE template:apptainer\` to create a new instance" >&2
  exit 1
elif [ "$(limactl ls -f '{{ .Status }}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
  echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
  exit 1
fi
export LIMA_INSTANCE
if [ -n "$APPTAINER_BINDPATH" ]; then
  APPTAINER_BINDPATH="$APPTAINER_BINDPATH,"
fi
APPTAINER_BINDPATH="$APPTAINER_BINDPATH$HOME"
exec lima APPTAINER_BINDPATH="$APPTAINER_BINDPATH" apptainer "$@"


================================================
FILE: cmd/docker.lima
================================================
#!/bin/sh
set -eu

# Environment Variables
# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is "docker".

: "${LIMA_INSTANCE:=docker}"
: "${DOCKER:=docker}"

if [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
  echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE template:docker\` to create a new instance" >&2
  exit 1
elif [ "$(limactl ls -f '{{ .Status }}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
  echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
  exit 1
fi
DOCKER=$(command -v "$DOCKER" || true)
if [ -n "$DOCKER" ]; then
  DOCKER_HOST=$(limactl list "$LIMA_INSTANCE" --format 'unix://{{.Dir}}/sock/docker.sock')
  export DOCKER_HOST
  exec "$DOCKER" "$@"
else
  export LIMA_INSTANCE
  exec lima docker "$@"
fi


================================================
FILE: cmd/kubectl.lima
================================================
#!/bin/sh
set -eu

# Environment Variables
# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is empty.

: "${LIMA_INSTANCE:=}"
: "${KUBECTL:=kubectl}"

if [ -z "$LIMA_INSTANCE" ]; then
  if [ "$(limactl ls -q k3s 2>/dev/null)" = "k3s" ]; then
    LIMA_INSTANCE=k3s
  elif [ "$(limactl ls -q k8s 2>/dev/null)" = "k8s" ]; then
    LIMA_INSTANCE=k8s
  else
    echo "No k3s or k8s existing instances found. Either create one with" >&2
    echo "limactl create --name=k3s template:k3s" >&2
    echo "limactl create --name=k8s template:k8s" >&2
    echo "or set LIMA_INSTANCE to the name of your Kubernetes instance" >&2
    exit 1
  fi
  if [ "$(limactl ls -f '{{.Status}}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
    echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
    exit 1
  fi
elif [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
  echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE\` to create a new instance" >&2
  exit 1
elif [ "$(limactl ls -f '{{ .Status }}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
  echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
  exit 1
fi
KUBECTL=$(command -v "$KUBECTL" || true)
if [ -n "$KUBECTL" ]; then
  KUBECONFIG=$(limactl list "$LIMA_INSTANCE" --format '{{.Dir}}/copied-from-guest/kubeconfig.yaml')
  export KUBECONFIG
  exec "$KUBECTL" "$@"
else
  export LIMA_INSTANCE
  exec lima sudo kubectl "$@"
fi


================================================
FILE: cmd/lima
================================================
#!/bin/sh

# SPDX-FileCopyrightText: Copyright The Lima Authors
# SPDX-License-Identifier: Apache-2.0

set -eu

# Environment Variables
# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is "default".
# LIMA_SHELL: Specifies the shell interpreter to use inside the Lima instance. Default is the user's shell configured inside the instance.
# LIMA_WORKDIR: Specifies the initial working directory inside the Lima instance. Default is the current directory from the host.
# LIMACTL: Specifies the path to the limactl binary. Default is "limactl" in $PATH.

: "${LIMA_INSTANCE:=default}"
: "${LIMA_SHELL:=}"
: "${LIMA_WORKDIR:=}"
: "${LIMACTL:=limactl}"

if [ "$#" -eq 1 ]; then
  if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    base="$(basename "$0")"
    echo "Usage: ${base} [COMMAND...]"
    echo
    echo "${base} is an alias for \"${LIMACTL} shell ${LIMA_INSTANCE}\"."
    echo "The instance name (\"${LIMA_INSTANCE}\") can be changed by specifying \$LIMA_INSTANCE."
    echo
    echo "The shell and initial workdir inside the instance can be specified via \$LIMA_SHELL"
    echo "and \$LIMA_WORKDIR."
    echo
    echo "See \`${LIMACTL} shell --help\` for further information."
    exit 0
  elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
    exec "$LIMACTL" "$@"
  fi
fi

set - --instance "$LIMA_INSTANCE" "$@"
if [ -n "${LIMA_SHELL}" ]; then
  set - --shell "$LIMA_SHELL" "$@"
fi
if [ -n "${LIMA_WORKDIR}" ]; then
  set - --workdir "$LIMA_WORKDIR" "$@"
fi
# Avoid converting paths with MSYS2
MSYS2_ARG_CONV_EXCL="*"
export MSYS2_ARG_CONV_EXCL
exec "$LIMACTL" shell "$@"


================================================
FILE: cmd/lima-driver-krunkit/main_darwin_arm64.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"context"

	"github.com/lima-vm/lima/v2/pkg/driver/external/server"
	"github.com/lima-vm/lima/v2/pkg/driver/krunkit"
)

// To be used as an external driver for Lima.
func main() {
	server.Serve(context.Background(), krunkit.New())
}


================================================
FILE: cmd/lima-driver-qemu/main.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"context"

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

// To be used as an external driver for Lima.
func main() {
	server.Serve(context.Background(), qemu.New())
}


================================================
FILE: cmd/lima-driver-vz/main_darwin.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"context"

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

// To be used as an external driver for Lima.
func main() {
	server.Serve(context.Background(), vz.New())
}


================================================
FILE: cmd/lima-driver-wsl2/main_windows.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"context"

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

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


================================================
FILE: cmd/lima-guestagent/daemon_linux.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"errors"
	"net"
	"os"
	"os/signal"
	"syscall"
	"time"

	"github.com/mdlayher/vsock"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/guestagent"
	"github.com/lima-vm/lima/v2/pkg/guestagent/api/server"
	"github.com/lima-vm/lima/v2/pkg/guestagent/serialport"
	"github.com/lima-vm/lima/v2/pkg/guestagent/ticker"
	"github.com/lima-vm/lima/v2/pkg/portfwdserver"
)

const hostCID = 2

type cidFilteredListener struct {
	*vsock.Listener
}

func (l *cidFilteredListener) Accept() (net.Conn, error) {
	for {
		conn, err := l.Listener.Accept()
		if err != nil {
			return nil, err
		}
		if vsockConn, ok := conn.(*vsock.Conn); ok {
			if addr, ok := vsockConn.RemoteAddr().(*vsock.Addr); ok {
				if addr.ContextID != hostCID {
					logrus.Warnf("rejected vsock connection from unauthorized CID %d", addr.ContextID)
					conn.Close()
					continue
				}
			}
		}
		return conn, nil
	}
}

func newDaemonCommand() *cobra.Command {
	daemonCommand := &cobra.Command{
		Use:   "daemon",
		Short: "Run the daemon",
		RunE:  daemonAction,
	}
	daemonCommand.Flags().String("runtime-dir", "/run/lima-guestagent", "Directory to store runtime state")
	daemonCommand.Flags().Duration("tick", 3*time.Second, "Tick for polling events")
	daemonCommand.Flags().Int("vsock-port", 0, "Use vsock server instead a UNIX socket")
	daemonCommand.Flags().String("virtio-port", "", "Use virtio server instead a UNIX socket")
	return daemonCommand
}

func daemonAction(cmd *cobra.Command, _ []string) error {
	ctx := cmd.Context()
	runtimeDir, err := cmd.Flags().GetString("runtime-dir")
	if err != nil {
		return err
	}
	if err := os.MkdirAll(runtimeDir, 0o755); err != nil {
		return err
	}
	socket := "/run/lima-guestagent.sock"
	tick, err := cmd.Flags().GetDuration("tick")
	if err != nil {
		return err
	}
	vSockPort, err := cmd.Flags().GetInt("vsock-port")
	if err != nil {
		return err
	}
	virtioPort, err := cmd.Flags().GetString("virtio-port")
	if err != nil {
		return err
	}
	if tick == 0 {
		return errors.New("tick must be specified")
	}
	if os.Geteuid() != 0 {
		return errors.New("must run as the root user")
	}

	logrus.Infof("event tick: %v", tick)
	simpleTicker := ticker.NewSimpleTicker(time.NewTicker(tick))
	tickerInst := simpleTicker
	// See /sys/kernel/debug/tracing/available_events for the list of available tracepoints
	tracepoints := []string{"syscalls:sys_exit_bind"}
	if ebpfTicker, err := ticker.NewEbpfTicker(tracepoints); err != nil {
		logrus.WithError(err).Warn("failed to create eBPF ticker, falling back to simple ticker")
	} else {
		logrus.Infof("using eBPF ticker with tracepoints: %v", tracepoints)
		tickerInst = ticker.NewCompoundTicker(simpleTicker, ebpfTicker)
	}

	ctx, stop := signal.NotifyContext(ctx, syscall.SIGTERM)
	defer stop()
	go func() {
		<-ctx.Done()
		logrus.Debug("Received SIGTERM, shutting down the guest agent")
	}()
	agent, err := guestagent.New(ctx, tickerInst, runtimeDir)
	if err != nil {
		return err
	}

	err = os.RemoveAll(socket)
	if err != nil {
		return err
	}

	var l net.Listener
	if virtioPort != "" {
		qemuL, err := serialport.Listen("/dev/virtio-ports/" + virtioPort)
		if err != nil {
			return err
		}
		l = qemuL
		logrus.Infof("serving the guest agent on qemu serial file: %s", virtioPort)
	} else if vSockPort != 0 {
		vsockL, err := vsock.Listen(uint32(vSockPort), nil)
		if err != nil {
			return err
		}
		l = &cidFilteredListener{Listener: vsockL}
		logrus.Infof("serving the guest agent on vsock port: %d (host CID only)", vSockPort)
	} else {
		var lc net.ListenConfig
		socketL, err := lc.Listen(ctx, "unix", socket)
		if err != nil {
			return err
		}
		if err := os.Chmod(socket, 0o777); err != nil {
			return err
		}
		l = socketL
		logrus.Infof("serving the guest agent on %q", socket)
	}
	defer logrus.Debug("exiting lima-guestagent daemon")
	return server.StartServer(ctx, l, &server.GuestServer{Agent: agent, TunnelS: portfwdserver.NewTunnelServer()})
}


================================================
FILE: cmd/lima-guestagent/fake_cloud_init_darwin.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/guestagent/fakecloudinit"
)

func newFakeCloudInitCommand() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "fake-cloud-init",
		Short: "Run fake cloud-init",
		RunE:  fakeCloudInitAction,
	}
	return cmd
}

func fakeCloudInitAction(cmd *cobra.Command, _ []string) error {
	ctx := cmd.Context()
	return fakecloudinit.Run(ctx)
}


================================================
FILE: cmd/lima-guestagent/install_systemd_linux.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"bytes"
	_ "embed"
	"errors"
	"fmt"
	"os"
	"os/exec"
	"path/filepath"
	"slices"
	"strings"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/textutil"
)

func newInstallSystemdCommand() *cobra.Command {
	installSystemdCommand := &cobra.Command{
		Use:   "install-systemd",
		Short: "Install a systemd unit (user)",
		RunE:  installSystemdAction,
	}
	installSystemdCommand.Flags().Bool("guestagent-updated", false, "Indicate that the guest agent has been updated")
	installSystemdCommand.Flags().Int("vsock-port", 0, "Use vsock server on specified port")
	installSystemdCommand.Flags().String("virtio-port", "", "Use virtio server instead a UNIX socket")
	return installSystemdCommand
}

func installSystemdAction(cmd *cobra.Command, _ []string) error {
	ctx := cmd.Context()
	guestAgentUpdated, err := cmd.Flags().GetBool("guestagent-updated")
	if err != nil {
		return err
	}
	vsockPort, err := cmd.Flags().GetInt("vsock-port")
	if err != nil {
		return err
	}
	virtioPort, err := cmd.Flags().GetString("virtio-port")
	if err != nil {
		return err
	}
	debug, err := cmd.Flags().GetBool("debug")
	if err != nil {
		return err
	}
	unit, err := generateSystemdUnit(vsockPort, virtioPort, debug)
	if err != nil {
		return err
	}
	unitPath := "/etc/systemd/system/lima-guestagent.service"
	unitFileChanged := true
	if _, err := os.Stat(unitPath); !errors.Is(err, os.ErrNotExist) {
		if existingUnit, err := os.ReadFile(unitPath); err == nil && bytes.Equal(unit, existingUnit) {
			logrus.Infof("File %q is up-to-date", unitPath)
			unitFileChanged = false
		} else {
			logrus.Infof("File %q needs update", unitPath)
		}
	} else {
		unitDir := filepath.Dir(unitPath)
		if err := os.MkdirAll(unitDir, 0o755); err != nil {
			return err
		}
	}
	if unitFileChanged {
		if err := os.WriteFile(unitPath, unit, 0o644); err != nil {
			return err
		}
		logrus.Infof("Written file %q", unitPath)
	} else if !guestAgentUpdated {
		logrus.Info("lima-guestagent.service already up-to-date")
		return nil
	}
	// unitFileChanged || guestAgentUpdated
	args := make([][]string, 0, 4)
	if unitFileChanged {
		args = append(args, []string{"daemon-reload"})
	}
	args = slices.Concat(
		args,
		[][]string{
			{"enable", "lima-guestagent.service"},
			{"try-restart", "lima-guestagent.service"}, // try-restart: restart if running, otherwise do nothing
			{"start", "lima-guestagent.service"},       // start: start if not running, otherwise do nothing
		},
	)
	for _, args := range args {
		cmd := exec.CommandContext(ctx, "systemctl", append([]string{"--system"}, args...)...)
		cmd.Stdout = os.Stdout
		cmd.Stderr = os.Stderr
		logrus.Infof("Executing: %s", strings.Join(cmd.Args, " "))
		if err := cmd.Run(); err != nil {
			return err
		}
	}
	logrus.Info("Done")
	return nil
}

//go:embed lima-guestagent.TEMPLATE.service
var systemdUnitTemplate string

func generateSystemdUnit(vsockPort int, virtioPort string, debug bool) ([]byte, error) {
	selfExeAbs, err := os.Executable()
	if err != nil {
		return nil, err
	}

	var args []string
	if vsockPort != 0 {
		args = append(args, fmt.Sprintf("--vsock-port %d", vsockPort))
	}
	if virtioPort != "" {
		args = append(args, fmt.Sprintf("--virtio-port %s", virtioPort))
	}
	if debug {
		args = append(args, "--debug")
	}

	m := map[string]string{
		"Binary": selfExeAbs,
		"Args":   strings.Join(args, " "),
	}
	return textutil.ExecuteTemplate(systemdUnitTemplate, m)
}


================================================
FILE: cmd/lima-guestagent/lima-guestagent.TEMPLATE.service
================================================
[Unit]
Description=lima-guestagent

[Service]
ExecStart={{.Binary}} daemon {{.Args}} --runtime-dir="%t/%N"
Type=simple
Restart=on-failure
OOMPolicy=continue
OOMScoreAdjust=-500

[Install]
WantedBy=multi-user.target


================================================
FILE: cmd/lima-guestagent/main.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"strings"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/cmd/yq"
	"github.com/lima-vm/lima/v2/pkg/debugutil"
	"github.com/lima-vm/lima/v2/pkg/osutil"
	"github.com/lima-vm/lima/v2/pkg/version"
)

func main() {
	yq.MaybeRunYQ()
	if err := newApp().Execute(); err != nil {
		osutil.HandleExitError(err)
		logrus.Fatal(err)
	}
}

func newApp() *cobra.Command {
	rootCmd := &cobra.Command{
		Use:     "lima-guestagent",
		Short:   "Do not launch manually",
		Version: strings.TrimPrefix(version.Version, "v"),
	}
	rootCmd.PersistentFlags().Bool("debug", false, "Debug mode")
	rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
		debug, _ := cmd.Flags().GetBool("debug")
		if debug {
			logrus.SetLevel(logrus.DebugLevel)
			debugutil.Debug = true
		}
		return nil
	}
	addRootCommands(rootCmd)
	return rootCmd
}


================================================
FILE: cmd/lima-guestagent/root_darwin.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"github.com/spf13/cobra"
)

func addRootCommands(rootCmd *cobra.Command) {
	rootCmd.AddCommand(
		newFakeCloudInitCommand(),
	)
}


================================================
FILE: cmd/lima-guestagent/root_linux.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"github.com/spf13/cobra"
)

func addRootCommands(rootCmd *cobra.Command) {
	rootCmd.AddCommand(
		newDaemonCommand(),
		newInstallSystemdCommand(),
	)
}


================================================
FILE: cmd/lima-guestagent/root_others.go
================================================
//go:build !linux && !darwin

// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"github.com/spf13/cobra"
)

func addRootCommands(_ *cobra.Command) {
	// NOP
}


================================================
FILE: cmd/lima.bat
================================================
@echo off
REM Environment Variables
REM LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is "default".
REM LIMACTL: Specifies the path to the limactl binary. Default is "limactl" in %PATH%.

IF NOT DEFINED LIMACTL (SET LIMACTL=limactl)
IF NOT DEFINED LIMA_INSTANCE (SET LIMA_INSTANCE=default)
%LIMACTL% shell --instance %LIMA_INSTANCE% %*


================================================
FILE: cmd/limactl/clone.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"errors"
	"fmt"
	"os"
	"path/filepath"

	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/cmd/limactl/editflags"
	"github.com/lima-vm/lima/v2/pkg/driverutil"
	"github.com/lima-vm/lima/v2/pkg/instance"
	"github.com/lima-vm/lima/v2/pkg/limatype/filenames"
	"github.com/lima-vm/lima/v2/pkg/limayaml"
	"github.com/lima-vm/lima/v2/pkg/networks/reconcile"
	"github.com/lima-vm/lima/v2/pkg/store"
	"github.com/lima-vm/lima/v2/pkg/yqutil"
)

func newCloneCommand() *cobra.Command {
	cloneCommand := &cobra.Command{
		Use:   "clone OLDINST NEWINST",
		Short: "Clone an instance of Lima",
		Long: `Clone an instance of Lima.

Not to be confused with 'limactl copy' ('limactl cp').
`,
		Args:              WrapArgsError(cobra.ExactArgs(2)),
		RunE:              cloneOrRenameAction,
		ValidArgsFunction: cloneBashComplete,
		GroupID:           advancedCommand,
	}
	cloneCommand.Flags().Bool("start", false, "Start the instance after cloning")
	editflags.RegisterEdit(cloneCommand, "[limactl edit] ")
	return cloneCommand
}

func newRenameCommand() *cobra.Command {
	renameCommand := &cobra.Command{
		Use: "rename OLDINST NEWINST",
		// No "mv" alias, to avoid confusion with a theoretical equivalent of `limactl cp` but s/cp/mv/.
		Short:             "Rename an instance of Lima",
		Args:              WrapArgsError(cobra.ExactArgs(2)),
		RunE:              cloneOrRenameAction,
		ValidArgsFunction: cloneBashComplete,
		GroupID:           advancedCommand,
	}
	renameCommand.Flags().Bool("start", false, "Start the instance after renaming")
	editflags.RegisterEdit(renameCommand, "[limactl edit] ")
	return renameCommand
}

func cloneOrRenameAction(cmd *cobra.Command, args []string) error {
	rename := cmd.Name() == "rename"
	ctx := cmd.Context()
	flags := cmd.Flags()
	tty, err := flags.GetBool("tty")
	if err != nil {
		return err
	}

	oldInstName, newInstName := args[0], args[1]
	oldInst, err := store.Inspect(ctx, oldInstName)
	if err != nil {
		if errors.Is(err, os.ErrNotExist) {
			return fmt.Errorf("instance %q not found", oldInstName)
		}
		return err
	}

	newInst, err := instance.CloneOrRename(ctx, oldInst, newInstName, rename)
	if err != nil {
		return err
	}

	yqExprs, err := editflags.YQExpressions(flags, false)
	if err != nil {
		return err
	}
	if len(yqExprs) > 0 {
		// TODO: reduce duplicated codes across cloneAction and editAction
		yq := yqutil.Join(yqExprs)
		filePath := filepath.Join(newInst.Dir, filenames.LimaYAML)
		yContent, err := os.ReadFile(filePath)
		if err != nil {
			return err
		}
		yBytes, err := yqutil.EvaluateExpression(yq, yContent)
		if err != nil {
			return err
		}
		y, err := limayaml.LoadWithWarnings(ctx, yBytes, filePath)
		if err != nil {
			return err
		}
		if err := driverutil.ResolveVMType(ctx, y, filePath); err != nil {
			return fmt.Errorf("failed to resolve vm for %q: %w", filePath, err)
		}
		if err := limayaml.Validate(y, true); err != nil {
			return saveRejectedYAML(yBytes, err)
		}
		if err := limayaml.ValidateAgainstLatestConfig(ctx, yBytes, yContent); err != nil {
			return saveRejectedYAML(yBytes, err)
		}
		if err := os.WriteFile(filePath, yBytes, 0o644); err != nil {
			return err
		}
		newInst, err = store.Inspect(ctx, newInst.Name)
		if err != nil {
			return err
		}
	}

	start, err := flags.GetBool("start")
	if err != nil {
		return err
	}

	if tty && !flags.Changed("start") {
		start, err = askWhetherToStart(cmd)
		if err != nil {
			return err
		}
	}
	if !start {
		return nil
	}
	err = reconcile.Reconcile(ctx, newInst.Name)
	if err != nil {
		return err
	}
	return instance.Start(ctx, newInst, false, false)
}

func cloneBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	return bashCompleteInstanceNames(cmd)
}


================================================
FILE: cmd/limactl/completion.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"maps"
	"net"
	"slices"
	"strings"

	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/networks"
	"github.com/lima-vm/lima/v2/pkg/store"
	"github.com/lima-vm/lima/v2/pkg/templatestore"
)

func bashCompleteInstanceNames(_ *cobra.Command) ([]string, cobra.ShellCompDirective) {
	instances, err := store.Instances()
	if err != nil {
		return nil, cobra.ShellCompDirectiveDefault
	}
	return instances, cobra.ShellCompDirectiveNoFileComp
}

func bashCompleteTemplateNames(_ *cobra.Command, toComplete string) ([]string, cobra.ShellCompDirective) {
	var comp []string
	if templates, err := templatestore.Templates(); err == nil {
		for _, f := range templates {
			name := "template:" + f.Name
			if !strings.HasPrefix(name, toComplete) {
				continue
			}
			if len(toComplete) == len(name) {
				comp = append(comp, name)
				continue
			}

			// Skip private snippets (beginning with '_') from completion.
			if (name[len(toComplete)-1] == '/') && (name[len(toComplete)] == '_') {
				continue
			}

			comp = append(comp, name)
		}
	}
	return comp, cobra.ShellCompDirectiveDefault
}

func bashCompleteDiskNames(_ *cobra.Command) ([]string, cobra.ShellCompDirective) {
	disks, err := store.Disks()
	if err != nil {
		return nil, cobra.ShellCompDirectiveDefault
	}
	return disks, cobra.ShellCompDirectiveNoFileComp
}

func bashCompleteNetworkNames(_ *cobra.Command) ([]string, cobra.ShellCompDirective) {
	config, err := networks.LoadConfig()
	if err != nil {
		return nil, cobra.ShellCompDirectiveDefault
	}
	networks := slices.Sorted(maps.Keys(config.Networks))
	return networks, cobra.ShellCompDirectiveNoFileComp
}

func bashFlagCompleteNetworkInterfaceNames(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	intf, err := net.Interfaces()
	if err != nil {
		return nil, cobra.ShellCompDirectiveDefault
	}
	var intfNames []string
	for _, f := range intf {
		intfNames = append(intfNames, f.Name)
	}
	return intfNames, cobra.ShellCompDirectiveNoFileComp
}


================================================
FILE: cmd/limactl/copy.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/copytool"
)

const copyHelp = `Copy files between host and guest

Prefix guest filenames with the instance name and a colon.

Backends:
  auto   - Automatically selects the best available backend (rsync preferred, falls back to scp)
  rsync  - Uses rsync for faster transfers with resume capability (requires rsync on both host and guest)
  scp    - Uses scp for reliable transfers (always available)

Not to be confused with 'limactl clone'.
`

const copyExample = `
  # Copy file from guest to host (auto backend)
  limactl copy default:/etc/os-release .

  # Copy file from host to guest with verbose output
  limactl copy -v myfile.txt default:/tmp/

  # Copy directory recursively using rsync backend
  limactl copy --backend=rsync -r ./mydir default:/tmp/

  # Copy using scp backend specifically
  limactl copy --backend=scp default:/var/log/app.log ./logs/

  # Copy multiple files
  limactl copy file1.txt file2.txt default:/tmp/
`

func newCopyCommand() *cobra.Command {
	copyCommand := &cobra.Command{
		Use:     "copy SOURCE ... TARGET",
		Aliases: []string{"cp"},
		Short:   "Copy files between host and guest",
		Long:    copyHelp,
		Example: copyExample,
		Args:    WrapArgsError(cobra.MinimumNArgs(2)),
		RunE:    copyAction,
		GroupID: advancedCommand,
	}

	copyCommand.Flags().BoolP("recursive", "r", false, "Copy directories recursively")
	copyCommand.Flags().BoolP("verbose", "v", false, "Enable verbose output")
	copyCommand.Flags().String("backend", "auto", "Copy backend (scp|rsync|auto)")

	return copyCommand
}

func copyAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	recursive, err := cmd.Flags().GetBool("recursive")
	if err != nil {
		return err
	}

	verbose, err := cmd.Flags().GetBool("verbose")
	if err != nil {
		return err
	}

	debug, err := cmd.Flags().GetBool("debug")
	if err != nil {
		return err
	}

	if debug {
		verbose = true
	}

	backend, err := cmd.Flags().GetString("backend")
	if err != nil {
		return err
	}

	cpTool, err := copytool.New(ctx, backend, args, &copytool.Options{
		Recursive: recursive,
		Verbose:   verbose,
	})
	if err != nil {
		return err
	}
	logrus.Debugf("using copy tool %q", cpTool.Name())

	copyCmd, err := cpTool.Command(ctx, args, nil)
	if err != nil {
		return err
	}

	copyCmd.Stdin = cmd.InOrStdin()
	copyCmd.Stdout = cmd.OutOrStdout()
	copyCmd.Stderr = cmd.ErrOrStderr()
	logrus.Debugf("executing %v (may take a long time)", copyCmd)

	// TODO: use syscall.Exec directly (results in losing tty?)
	return copyCmd.Run()
}


================================================
FILE: cmd/limactl/debug.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"strconv"
	"time"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/hostagent/dns"
)

func newDebugCommand() *cobra.Command {
	cmd := &cobra.Command{
		Use:    "debug",
		Short:  "Debug utilities",
		Long:   "DO NOT USE! THE COMMAND SYNTAX IS SUBJECT TO CHANGE!",
		Hidden: true,
	}
	cmd.AddCommand(newDebugDNSCommand())
	return cmd
}

func newDebugDNSCommand() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "dns UDPPORT [TCPPORT]",
		Short: "Debug built-in DNS",
		Long:  "DO NOT USE! THE COMMAND SYNTAX IS SUBJECT TO CHANGE!",
		Args:  WrapArgsError(cobra.RangeArgs(1, 2)),
		RunE:  debugDNSAction,
	}
	cmd.Flags().BoolP("ipv6", "6", false, "Lookup IPv6 addresses too")
	return cmd
}

func debugDNSAction(cmd *cobra.Command, args []string) error {
	ipv6, err := cmd.Flags().GetBool("ipv6")
	if err != nil {
		return err
	}
	udpLocalPort, err := strconv.Atoi(args[0])
	if err != nil {
		return err
	}
	tcpLocalPort := 0
	if len(args) > 1 {
		tcpLocalPort, err = strconv.Atoi(args[1])
		if err != nil {
			return err
		}
	}
	srvOpts := dns.ServerOptions{
		UDPPort: udpLocalPort,
		TCPPort: tcpLocalPort,
		Address: "127.0.0.1",
		HandlerOptions: dns.HandlerOptions{
			IPv6:        ipv6,
			StaticHosts: map[string]string{},
		},
	}
	srv, err := dns.Start(srvOpts)
	if err != nil {
		return err
	}
	logrus.Infof("Started srv %+v (UDP %d, TCP %d)", srv, udpLocalPort, tcpLocalPort)
	for {
		time.Sleep(time.Hour)
	}
}


================================================
FILE: cmd/limactl/delete.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"errors"
	"fmt"
	"os"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/autostart"
	"github.com/lima-vm/lima/v2/pkg/instance"
	"github.com/lima-vm/lima/v2/pkg/networks/reconcile"
	"github.com/lima-vm/lima/v2/pkg/store"
)

func newDeleteCommand() *cobra.Command {
	deleteCommand := &cobra.Command{
		Use:               "delete INSTANCE [INSTANCE, ...]",
		Aliases:           []string{"remove", "rm"},
		Short:             "Delete an instance of Lima",
		Args:              WrapArgsError(cobra.MinimumNArgs(1)),
		RunE:              deleteAction,
		ValidArgsFunction: deleteBashComplete,
		GroupID:           basicCommand,
	}
	deleteCommand.Flags().BoolP("force", "f", false, "Forcibly kill the processes")
	return deleteCommand
}

func deleteAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	force, err := cmd.Flags().GetBool("force")
	if err != nil {
		return err
	}
	for _, instName := range args {
		inst, err := store.Inspect(ctx, instName)
		if err != nil {
			if errors.Is(err, os.ErrNotExist) {
				logrus.Warnf("Ignoring non-existent instance %q", instName)
				continue
			}
			return err
		}
		if err := instance.Delete(cmd.Context(), inst, force); err != nil {
			return fmt.Errorf("failed to delete instance %q: %w", instName, err)
		}
		if registered, err := autostart.IsRegistered(ctx, inst); err != nil && !errors.Is(err, autostart.ErrNotSupported) {
			logrus.WithError(err).Warnf("Failed to check if the autostart entry for instance %q is registered", instName)
		} else if registered {
			if err := autostart.UnregisterFromStartAtLogin(ctx, inst); err != nil {
				logrus.WithError(err).Warnf("Failed to unregister the autostart entry for instance %q", instName)
			} else {
				logrus.Infof("The autostart entry for instance %q has been unregistered", instName)
			}
		}
		logrus.Infof("Deleted %q (%q)", instName, inst.Dir)
	}
	return reconcile.Reconcile(cmd.Context(), "")
}

func deleteBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	return bashCompleteInstanceNames(cmd)
}


================================================
FILE: cmd/limactl/disk.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"encoding/json"
	"errors"
	"fmt"
	"io/fs"
	"os"
	"path/filepath"
	"text/tabwriter"

	contfs "github.com/containerd/continuity/fs"
	"github.com/docker/go-units"
	"github.com/lima-vm/go-qcow2reader"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/imgutil/proxyimgutil"
	"github.com/lima-vm/lima/v2/pkg/limatype"
	"github.com/lima-vm/lima/v2/pkg/limatype/filenames"
	"github.com/lima-vm/lima/v2/pkg/store"
)

func newDiskCommand() *cobra.Command {
	diskCommand := &cobra.Command{
		Use:   "disk",
		Short: "Lima disk management",
		Example: `  Create a disk:
  $ limactl disk create DISK --size SIZE [--format qcow2]

  List existing disks:
  $ limactl disk ls

  Delete a disk:
  $ limactl disk delete DISK

  Resize a disk:
  $ limactl disk resize DISK --size SIZE`,
		SilenceUsage:  true,
		SilenceErrors: true,
		GroupID:       advancedCommand,
	}
	diskCommand.AddCommand(
		newDiskCreateCommand(),
		newDiskListCommand(),
		newDiskDeleteCommand(),
		newDiskUnlockCommand(),
		newDiskResizeCommand(),
		newDiskImportCommand(),
	)
	return diskCommand
}

func newDiskCreateCommand() *cobra.Command {
	diskCreateCommand := &cobra.Command{
		Use: "create DISK",
		Example: `
To create a new disk:
$ limactl disk create DISK --size SIZE [--format qcow2]
`,
		Short: "Create a Lima disk",
		Args:  WrapArgsError(cobra.ExactArgs(1)),
		RunE:  diskCreateAction,
	}
	diskCreateCommand.Flags().String("size", "", "Configure the disk size")
	_ = diskCreateCommand.MarkFlagRequired("size")
	diskCreateCommand.Flags().String("format", "qcow2", "Specify the disk format")
	return diskCreateCommand
}

func diskCreateAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	size, err := cmd.Flags().GetString("size")
	if err != nil {
		return err
	}

	format, err := cmd.Flags().GetString("format")
	if err != nil {
		return err
	}

	diskSize, err := units.RAMInBytes(size)
	if err != nil {
		return err
	}

	switch format {
	case "qcow2", "raw":
	default:
		return fmt.Errorf(`disk format %q not supported, use "qcow2" or "raw" instead`, format)
	}

	// only exactly one arg is allowed
	name := args[0]

	diskDir, err := store.DiskDir(name)
	if err != nil {
		return err
	}

	if _, err := os.Stat(diskDir); !errors.Is(err, fs.ErrNotExist) {
		return fmt.Errorf("disk %q already exists (%q)", name, diskDir)
	}

	logrus.Infof("Creating %s disk %q with size %s", format, name, units.BytesSize(float64(diskSize)))

	if err := os.MkdirAll(diskDir, 0o700); err != nil {
		return err
	}

	// qemu may not be available, use it only if needed.
	dataDisk := filepath.Join(diskDir, filenames.DataDisk)
	diskUtil := proxyimgutil.NewDiskUtil(ctx)
	err = diskUtil.CreateDisk(ctx, dataDisk, diskSize)
	if err != nil {
		rerr := os.RemoveAll(diskDir)
		if rerr != nil {
			err = errors.Join(err, fmt.Errorf("failed to remove a directory %q: %w", diskDir, rerr))
		}
		return fmt.Errorf("failed to create %s disk in %q: %w", format, diskDir, err)
	}

	return nil
}

func newDiskListCommand() *cobra.Command {
	diskListCommand := &cobra.Command{
		Use: "list",
		Example: `
To list existing disks:
$ limactl disk list
`,
		Short:   "List existing Lima disks",
		Aliases: []string{"ls"},
		Args:    WrapArgsError(cobra.ArbitraryArgs),
		RunE:    diskListAction,
	}
	diskListCommand.Flags().Bool("json", false, "JSONify output")
	return diskListCommand
}

func nameMatches(nameName string, names []string) []string {
	matches := []string{}
	for _, name := range names {
		if name == nameName {
			matches = append(matches, name)
		}
	}
	return matches
}

func diskListAction(cmd *cobra.Command, args []string) error {
	jsonFormat, err := cmd.Flags().GetBool("json")
	if err != nil {
		return err
	}

	allDisks, err := store.Disks()
	if err != nil {
		return err
	}

	disks := []string{}
	if len(args) > 0 {
		for _, arg := range args {
			matches := nameMatches(arg, allDisks)
			if len(matches) > 0 {
				disks = append(disks, matches...)
			} else {
				logrus.Warnf("No disk matching %v found.", arg)
			}
		}
	} else {
		disks = allDisks
	}

	if jsonFormat {
		for _, diskName := range disks {
			disk, err := store.InspectDisk(diskName, nil)
			if err != nil {
				logrus.WithError(err).Errorf("disk %q does not exist?", diskName)
				continue
			}
			j, err := json.Marshal(disk)
			if err != nil {
				return err
			}
			fmt.Fprintln(cmd.OutOrStdout(), string(j))
		}
		return nil
	}

	w := tabwriter.NewWriter(cmd.OutOrStdout(), 4, 8, 4, ' ', 0)
	fmt.Fprintln(w, "NAME\tSIZE\tFORMAT\tDIR\tIN-USE-BY")

	if len(disks) == 0 {
		logrus.Warn("No disk found. Run `limactl disk create DISK --size SIZE` to create a disk.")
	}

	for _, diskName := range disks {
		disk, err := store.InspectDisk(diskName, nil)
		if err != nil {
			logrus.WithError(err).Errorf("disk %q does not exist?", diskName)
			continue
		}
		fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", disk.Name, units.BytesSize(float64(disk.Size)), disk.Format, disk.Dir, disk.Instance)
	}

	return w.Flush()
}

func newDiskDeleteCommand() *cobra.Command {
	diskDeleteCommand := &cobra.Command{
		Use: "delete DISK [DISK, ...]",
		Example: `
To delete a disk:
$ limactl disk delete DISK

To delete multiple disks:
$ limactl disk delete DISK1 DISK2 ...
`,
		Aliases:           []string{"remove", "rm"},
		Short:             "Delete one or more Lima disks",
		Args:              WrapArgsError(cobra.MinimumNArgs(1)),
		RunE:              diskDeleteAction,
		ValidArgsFunction: diskBashComplete,
	}
	diskDeleteCommand.Flags().BoolP("force", "f", false, "Force delete")
	return diskDeleteCommand
}

func diskDeleteAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	force, err := cmd.Flags().GetBool("force")
	if err != nil {
		return err
	}

	instNames, err := store.Instances()
	if err != nil {
		return err
	}
	var instances []*limatype.Instance
	for _, instName := range instNames {
		inst, err := store.Inspect(ctx, instName)
		if err != nil {
			continue
		}
		instances = append(instances, inst)
	}

	for _, diskName := range args {
		disk, err := store.InspectDisk(diskName, nil)
		if err != nil {
			if errors.Is(err, fs.ErrNotExist) {
				logrus.Warnf("Ignoring non-existent disk %q", diskName)
				continue
			}
			return err
		}

		if !force {
			if disk.Instance != "" {
				return fmt.Errorf("cannot delete disk %q in use by instance %q", disk.Name, disk.Instance)
			}
			var refInstances []string
			for _, inst := range instances {
				for _, d := range inst.AdditionalDisks {
					if d.Name == diskName {
						refInstances = append(refInstances, inst.Name)
					}
				}
			}
			if len(refInstances) > 0 {
				logrus.Warnf("Skipping deleting disk %q, disk is referenced by one or more non-running instances: %q",
					diskName, refInstances)
				logrus.Warnf("To delete anyway, run %q", forceDeleteCommand(diskName))
				continue
			}
		}

		if err := deleteDisk(disk); err != nil {
			return fmt.Errorf("failed to delete disk %q: %w", diskName, err)
		}
		logrus.Infof("Deleted %q (%q)", diskName, disk.Dir)
	}
	return nil
}

func deleteDisk(disk *store.Disk) error {
	if err := os.RemoveAll(disk.Dir); err != nil {
		return fmt.Errorf("failed to remove %q: %w", disk.Dir, err)
	}
	return nil
}

func forceDeleteCommand(diskName string) string {
	return fmt.Sprintf("limactl disk delete --force %v", diskName)
}

func newDiskUnlockCommand() *cobra.Command {
	diskUnlockCommand := &cobra.Command{
		Use: "unlock DISK [DISK, ...]",
		Example: `
Emergency recovery! If an instance is force stopped, it may leave a disk locked while not actually using it.

To unlock a disk:
$ limactl disk unlock DISK

To unlock multiple disks:
$ limactl disk unlock DISK1 DISK2 ...
`,
		Short:             "Unlock one or more Lima disks",
		Args:              WrapArgsError(cobra.MinimumNArgs(1)),
		RunE:              diskUnlockAction,
		ValidArgsFunction: diskBashComplete,
	}
	return diskUnlockCommand
}

func diskUnlockAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	for _, diskName := range args {
		disk, err := store.InspectDisk(diskName, nil)
		if err != nil {
			if errors.Is(err, fs.ErrNotExist) {
				logrus.Warnf("Ignoring non-existent disk %q", diskName)
				continue
			}
			return err
		}
		if disk.Instance == "" {
			logrus.Warnf("Ignoring unlocked disk %q", diskName)
			continue
		}
		// if store.Inspect throws an error, the instance does not exist, and it is safe to unlock
		inst, err := store.Inspect(ctx, disk.Instance)
		if err == nil {
			if len(inst.Errors) > 0 {
				logrus.Warnf("Cannot unlock disk %q, attached instance %q has errors: %+v",
					diskName, disk.Instance, inst.Errors)
				continue
			}
			if inst.Status == limatype.StatusRunning {
				logrus.Warnf("Cannot unlock disk %q used by running instance %q", diskName, disk.Instance)
				continue
			}
		}
		if err := disk.Unlock(); err != nil {
			return fmt.Errorf("failed to unlock disk %q: %w", diskName, err)
		}
		logrus.Infof("Unlocked disk %q (%q)", diskName, disk.Dir)
	}
	return nil
}

func newDiskResizeCommand() *cobra.Command {
	diskResizeCommand := &cobra.Command{
		Use: "resize DISK",
		Example: `
Resize a disk:
$ limactl disk resize DISK --size SIZE`,
		Short:             "Resize existing Lima disk",
		Args:              WrapArgsError(cobra.ExactArgs(1)),
		RunE:              diskResizeAction,
		ValidArgsFunction: diskBashComplete,
	}
	diskResizeCommand.Flags().String("size", "", "Disk size")
	_ = diskResizeCommand.MarkFlagRequired("size")
	return diskResizeCommand
}

func diskResizeAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	size, err := cmd.Flags().GetString("size")
	if err != nil {
		return err
	}

	diskSize, err := units.RAMInBytes(size)
	if err != nil {
		return err
	}

	diskName := args[0]
	disk, err := store.InspectDisk(diskName, nil)
	if err != nil {
		if errors.Is(err, fs.ErrNotExist) {
			return fmt.Errorf("disk %q does not exists", diskName)
		}
		return err
	}

	// Shrinking can cause a disk failure
	if diskSize < disk.Size {
		return fmt.Errorf("specified size %q is less than the current disk size %q. Disk shrinking is currently unavailable", units.BytesSize(float64(diskSize)), units.BytesSize(float64(disk.Size)))
	}

	if disk.Instance != "" {
		inst, err := store.Inspect(ctx, disk.Instance)
		if err == nil {
			if inst.Status == limatype.StatusRunning {
				return fmt.Errorf("cannot resize disk %q used by running instance %q. Please stop the VM instance", diskName, disk.Instance)
			}
		}
	}

	// qemu may not be available, use it only if needed.
	dataDisk := filepath.Join(disk.Dir, filenames.DataDisk)
	diskUtil := proxyimgutil.NewDiskUtil(ctx)
	err = diskUtil.ResizeDisk(ctx, dataDisk, diskSize)
	if err != nil {
		return fmt.Errorf("failed to resize disk %q: %w", diskName, err)
	}

	logrus.Infof("Resized disk %q (%q)", diskName, disk.Dir)
	return nil
}

func diskBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	return bashCompleteDiskNames(cmd)
}

func newDiskImportCommand() *cobra.Command {
	diskImportCommand := &cobra.Command{
		Use: "import DISK FILE",
		Example: `
Import a disk:
$ limactl disk import DISK DISKPATH
`,
		Short:             "Import an existing disk to Lima",
		Args:              WrapArgsError(cobra.ExactArgs(2)),
		RunE:              diskImportAction,
		ValidArgsFunction: diskBashComplete,
	}
	return diskImportCommand
}

func diskImportAction(_ *cobra.Command, args []string) error {
	diskName := args[0]
	fName := args[1]

	diskDir, err := store.DiskDir(diskName)
	if err != nil {
		return err
	}

	if _, err := os.Stat(diskDir); !errors.Is(err, fs.ErrNotExist) {
		return fmt.Errorf("disk %q already exists (%q)", diskName, diskDir)
	}

	f, err := os.Open(fName)
	if err != nil {
		return err
	}
	defer f.Close()

	img, err := qcow2reader.Open(f)
	if err != nil {
		return err
	}

	diskSize := img.Size()
	format := img.Type()

	switch format {
	case "qcow2", "raw":
	default:
		return fmt.Errorf(`disk format %q not supported, use "qcow2" or "raw" instead`, format)
	}

	if err := os.MkdirAll(diskDir, 0o755); err != nil {
		return err
	}

	if err := contfs.CopyFile(filepath.Join(diskDir, filenames.DataDisk), fName); err != nil {
		return nil
	}

	logrus.Infof("Imported %s with size %s", diskName, units.BytesSize(float64(diskSize)))

	return nil
}


================================================
FILE: cmd/limactl/edit.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"bytes"
	"errors"
	"fmt"
	"os"
	"path/filepath"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/cmd/limactl/editflags"
	"github.com/lima-vm/lima/v2/pkg/autostart"
	"github.com/lima-vm/lima/v2/pkg/driverutil"
	"github.com/lima-vm/lima/v2/pkg/editutil"
	"github.com/lima-vm/lima/v2/pkg/instance"
	"github.com/lima-vm/lima/v2/pkg/limatype"
	"github.com/lima-vm/lima/v2/pkg/limatype/dirnames"
	"github.com/lima-vm/lima/v2/pkg/limatype/filenames"
	"github.com/lima-vm/lima/v2/pkg/limayaml"
	"github.com/lima-vm/lima/v2/pkg/networks/reconcile"
	"github.com/lima-vm/lima/v2/pkg/store"
	"github.com/lima-vm/lima/v2/pkg/uiutil"
	"github.com/lima-vm/lima/v2/pkg/yqutil"
)

func newEditCommand() *cobra.Command {
	editCommand := &cobra.Command{
		Use:               "edit INSTANCE|FILE.yaml",
		Short:             "Edit an instance of Lima or a template",
		Args:              WrapArgsError(cobra.MaximumNArgs(1)),
		RunE:              editAction,
		ValidArgsFunction: editBashComplete,
		GroupID:           basicCommand,
	}
	editCommand.Flags().Bool("start", false, "Start the instance after editing")
	editflags.RegisterEdit(editCommand, "")
	return editCommand
}

func editAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	var arg string
	if len(args) > 0 {
		arg = args[0]
	}

	var filePath string
	var err error
	var inst *limatype.Instance

	if arg == "" {
		arg = DefaultInstanceName
	}
	if err := dirnames.ValidateInstName(arg); err == nil {
		inst, err = store.Inspect(ctx, arg)
		if err != nil {
			if errors.Is(err, os.ErrNotExist) {
				return fmt.Errorf("instance %q not found", arg)
			}
			return err
		}
		if inst.Status == limatype.StatusRunning {
			return errors.New("cannot edit a running instance")
		}
		filePath = filepath.Join(inst.Dir, filenames.LimaYAML)
	} else {
		// absolute path is required for `limayaml.Validate`
		filePath, err = filepath.Abs(arg)
		if err != nil {
			return err
		}
	}

	yContent, err := os.ReadFile(filePath)
	if err != nil {
		return err
	}
	flags := cmd.Flags()
	tty, err := flags.GetBool("tty")
	if err != nil {
		return err
	}
	yqExprs, err := editflags.YQExpressions(flags, false)
	if err != nil {
		return err
	}
	var yBytes []byte
	if len(yqExprs) > 0 {
		yq := yqutil.Join(yqExprs)
		yBytes, err = yqutil.EvaluateExpression(yq, yContent)
		if err != nil {
			return err
		}
	} else if tty {
		var hdr string
		if inst != nil {
			hdr = fmt.Sprintf("# Please edit the following configuration for Lima instance %q\n", inst.Name)
		} else {
			hdr = fmt.Sprintf("# Please edit the following configuration %q\n", filePath)
		}
		hdr += "# and an empty file will abort the edit.\n"
		hdr += "\n"
		hdr += editutil.GenerateEditorWarningHeader()
		yBytes, err = editutil.OpenEditor(ctx, yContent, hdr)
		if err != nil {
			return err
		}
	}
	if len(yBytes) == 0 {
		logrus.Info("Aborting, as requested by saving the file with empty content")
		return nil
	}
	if bytes.Equal(yBytes, yContent) {
		logrus.Info("Aborting, no changes made to the instance")
		return nil
	}
	y, err := limayaml.LoadWithWarnings(ctx, yBytes, filePath)
	if err != nil {
		return err
	}
	if err := driverutil.ResolveVMType(ctx, y, filePath); err != nil {
		return fmt.Errorf("failed to resolve vm for %q: %w", filePath, err)
	}
	if err := limayaml.Validate(y, true); err != nil {
		return saveRejectedYAML(yBytes, err)
	}

	if err := limayaml.ValidateAgainstLatestConfig(ctx, yBytes, yContent); err != nil {
		return saveRejectedYAML(yBytes, err)
	}

	if err := os.WriteFile(filePath, yBytes, 0o644); err != nil {
		return err
	}

	if inst != nil {
		logrus.Infof("Instance %q configuration edited", inst.Name)
	}

	if inst == nil {
		// edited a limayaml file directly
		return nil
	}

	start, err := flags.GetBool("start")
	if err != nil {
		return err
	}

	if tty && !flags.Changed("start") {
		start, err = askWhetherToStart(cmd)
		if err != nil {
			return err
		}
	}
	if !start {
		return nil
	}
	// Network reconciliation will be performed by the process launched by the autostart manager
	if registered, err := autostart.IsRegistered(ctx, inst); err != nil && !errors.Is(err, autostart.ErrNotSupported) {
		return fmt.Errorf("failed to check if the autostart entry for instance %q is registered: %w", inst.Name, err)
	} else if !registered {
		err = reconcile.Reconcile(ctx, inst.Name)
		if err != nil {
			return err
		}
	}

	// store.Inspect() syncs values between inst.YAML and the store.
	// This call applies the validated template to the store.
	inst, err = store.Inspect(ctx, inst.Name)
	if err != nil {
		return err
	}
	return instance.Start(ctx, inst, false, false)
}

func askWhetherToStart(cmd *cobra.Command) (bool, error) {
	isTTY := uiutil.InputIsTTY(cmd.InOrStdin())
	if isTTY {
		message := "Do you want to start the instance now? "
		return uiutil.Confirm(message, true)
	}
	return false, nil
}

func editBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	return bashCompleteInstanceNames(cmd)
}

// saveRejectedYAML writes the rejected config and returns an error.
func saveRejectedYAML(y []byte, origErr error) error {
	rejectedYAML := "lima.REJECTED.yaml"
	if writeErr := os.WriteFile(rejectedYAML, y, 0o644); writeErr != nil {
		return fmt.Errorf("the YAML is invalid, attempted to save the buffer as %q but failed: %w", rejectedYAML, errors.Join(writeErr, origErr))
	}
	// TODO: may need to support editing the rejected YAML
	return fmt.Errorf("the YAML is invalid, saved the buffer as %q: %w", rejectedYAML, origErr)
}


================================================
FILE: cmd/limactl/editflags/editflags.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package editflags

import (
	"errors"
	"fmt"
	"math/bits"
	"runtime"
	"slices"
	"strconv"
	"strings"

	"github.com/pbnjay/memory"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	flag "github.com/spf13/pflag"

	"github.com/lima-vm/lima/v2/pkg/localpathutil"
	"github.com/lima-vm/lima/v2/pkg/registry"
)

// RegisterEdit registers flags related to in-place YAML modification, for `limactl edit`.
func RegisterEdit(cmd *cobra.Command, commentPrefix string) {
	flags := cmd.Flags()

	flags.Int("cpus", 0, commentPrefix+"Number of CPUs") // Similar to colima's --cpu, but the flag name is slightly different (cpu vs cpus)
	_ = cmd.RegisterFlagCompletionFunc("cpus", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		var res []string
		for _, f := range completeCPUs(runtime.NumCPU()) {
			res = append(res, strconv.Itoa(f))
		}
		return res, cobra.ShellCompDirectiveNoFileComp
	})

	flags.IPSlice("dns", nil, commentPrefix+"Specify custom DNS (disable host resolver)") // colima-compatible

	flags.Float32("memory", 0, commentPrefix+"Memory in GiB") // colima-compatible
	_ = cmd.RegisterFlagCompletionFunc("memory", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		var res []string
		for _, f := range completeMemoryGiB(memory.TotalMemory()) {
			res = append(res, fmt.Sprintf("%.1f", f))
		}
		return res, cobra.ShellCompDirectiveNoFileComp
	})

	flags.StringSlice("mount", nil, commentPrefix+"Directories to mount, suffix ':w' for writable (Do not specify directories that overlap with the existing mounts)") // colima-compatible
	flags.StringSlice("mount-only", nil, commentPrefix+"Similar to --mount, but overrides the existing mounts")

	flags.Bool("mount-none", false, commentPrefix+"Remove all mounts")

	flags.String("mount-type", "", commentPrefix+"Mount type (reverse-sshfs, 9p, virtiofs)") // Similar to colima's --mount-type=(sshfs|9p|virtiofs), but "reverse-sshfs" is Lima is called "sshfs" in colima
	_ = cmd.RegisterFlagCompletionFunc("mount-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		return []string{"reverse-sshfs", "9p", "virtiofs"}, cobra.ShellCompDirectiveNoFileComp
	})

	flags.Bool("mount-writable", false, commentPrefix+"Make all mounts writable")
	flags.Bool("mount-inotify", false, commentPrefix+"Enable inotify for mounts")

	flags.StringSlice("network", nil, commentPrefix+"Additional networks, e.g., \"vzNAT\" or \"lima:shared\" to assign vmnet IP")
	_ = cmd.RegisterFlagCompletionFunc("network", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		// TODO: retrieve the lima:* network list from networks.yaml
		return []string{"lima:shared", "lima:bridged", "lima:host", "lima:user-v2", "vzNAT"}, cobra.ShellCompDirectiveNoFileComp
	})

	flags.Bool("nested-virt", false, commentPrefix+"Enable nested virtualization")

	flags.Bool("rosetta", false, commentPrefix+"Enable Rosetta (for vz instances)")

	flags.StringArray("set", []string{}, commentPrefix+"Modify the template inplace, using yq syntax. Can be passed multiple times.")

	flags.Uint16("ssh-port", 0, commentPrefix+"SSH port (0 for random)") // colima-compatible
	_ = cmd.RegisterFlagCompletionFunc("ssh-port", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		// Until Lima v2.0, 60022 was the default SSH port for the instance named "default".
		return []string{"60022"}, cobra.ShellCompDirectiveNoFileComp
	})

	// negative performance impact: https://gitlab.com/qemu-project/qemu/-/issues/334
	flags.Bool("video", false, commentPrefix+"Enable video output (has negative performance impact for QEMU)")

	flags.Float32("disk", 0, commentPrefix+"Disk size in GiB") // colima-compatible
	_ = cmd.RegisterFlagCompletionFunc("disk", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		return []string{"10", "30", "50", "100", "200"}, cobra.ShellCompDirectiveNoFileComp
	})

	flags.String("vm-type", "", commentPrefix+"Virtual machine type")
	_ = cmd.RegisterFlagCompletionFunc("vm-type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		var drivers []string
		for k := range registry.List() {
			drivers = append(drivers, k)
		}
		return drivers, cobra.ShellCompDirectiveNoFileComp
	})
}

// RegisterCreate registers flags related to in-place YAML modification, for `limactl create`.
func RegisterCreate(cmd *cobra.Command, commentPrefix string) {
	RegisterEdit(cmd, commentPrefix)
	flags := cmd.Flags()

	flags.String("arch", "", commentPrefix+"Machine architecture (x86_64, aarch64, riscv64, armv7l, s390x, ppc64le)") // colima-compatible
	_ = cmd.RegisterFlagCompletionFunc("arch", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		return []string{"x86_64", "aarch64", "riscv64", "armv7l", "s390x", "ppc64le"}, cobra.ShellCompDirectiveNoFileComp
	})

	flags.String("containerd", "", commentPrefix+"containerd mode (user, system, user+system, none)")
	_ = cmd.RegisterFlagCompletionFunc("containerd", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		return []string{"user", "system", "user+system", "none"}, cobra.ShellCompDirectiveNoFileComp
	})

	flags.Bool("plain", false, commentPrefix+"Plain mode. Disables mounts, port forwarding, containerd, etc.")

	flags.StringArray("port-forward", nil, commentPrefix+"Port forwards (host:guest), e.g., '8080:80' or '9090:9090,static=true' for static port-forwards")
	_ = cmd.RegisterFlagCompletionFunc("port-forward", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
		return []string{"8080:80", "3000:3000", "8080:80,static=true"}, cobra.ShellCompDirectiveNoFileComp
	})
}

func defaultExprFunc(expr string) func(v *flag.Flag) ([]string, error) {
	return func(v *flag.Flag) ([]string, error) {
		return []string{fmt.Sprintf(expr, v.Value)}, nil
	}
}

func ParsePortForward(spec string) (hostPort, guestPort string, isStatic bool, err error) {
	parts := strings.Split(spec, ",")
	if len(parts) > 2 {
		return "", "", false, fmt.Errorf("invalid port forward format %q, expected HOST:GUEST or HOST:GUEST,static=true", spec)
	}

	portParts := strings.Split(strings.TrimSpace(parts[0]), ":")
	if len(portParts) != 2 {
		return "", "", false, fmt.Errorf("invalid port forward format %q, expected HOST:GUEST", parts[0])
	}

	hostPort = strings.TrimSpace(portParts[0])
	guestPort = strings.TrimSpace(portParts[1])

	if len(parts) == 2 {
		staticPart := strings.TrimSpace(parts[1])
		if staticValue, ok := strings.CutPrefix(staticPart, "static="); ok {
			isStatic, err = strconv.ParseBool(staticValue)
			if err != nil {
				return "", "", false, fmt.Errorf("invalid value for static parameter: %q", staticValue)
			}
		} else {
			return "", "", false, fmt.Errorf("invalid parameter %q, expected 'static=' followed by a boolean value", staticPart)
		}
	}

	return hostPort, guestPort, isStatic, nil
}

func BuildPortForwardExpression(portForwards []string) (string, error) {
	if len(portForwards) == 0 {
		return "", nil
	}

	ports := make([]string, len(portForwards))
	for i, spec := range portForwards {
		hostPort, guestPort, isStatic, err := ParsePortForward(spec)
		if err != nil {
			return "", err
		}
		ports[i] = fmt.Sprintf(`{"guestPort": %q, "hostPort": %q, "static": %v}`, guestPort, hostPort, isStatic)
	}
	expr := fmt.Sprintf(".portForwards += [%s]", strings.Join(ports, ","))
	return expr, nil
}

func buildMountListExpression(ss []string) (string, error) {
	mounts := make([]string, len(ss))
	for i, s := range ss {
		writable := strings.HasSuffix(s, ":w")
		loc, err := localpathutil.Expand(strings.TrimSuffix(s, ":w"))
		if err != nil {
			return "", err
		}
		mounts[i] = fmt.Sprintf(`{"location": %q, "mountPoint": %q, "writable": %v}`, loc, loc, writable)
	}
	expr := fmt.Sprintf("[%s]", strings.Join(mounts, ","))
	return expr, nil
}

// YQExpressions returns YQ expressions.
func YQExpressions(flags *flag.FlagSet, newInstance bool) ([]string, error) {
	type def struct {
		flagName                 string
		exprFunc                 func(*flag.Flag) ([]string, error)
		onlyValidForNewInstances bool
		experimental             bool
	}
	d := defaultExprFunc
	defs := []def{
		{
			"cpus",
			func(_ *flag.Flag) ([]string, error) {
				numCpus, err := flags.GetInt("cpus")
				if err != nil {
					return nil, err
				}
				if numCpus < 0 {
					return nil, errors.New("invalid value for number of cpus, must be >= 0")
				}
				return []string{fmt.Sprintf(".cpus = %d", numCpus)}, nil
			},
			false,
			false,
		},
		{
			"dns",
			func(_ *flag.Flag) ([]string, error) {
				ipSlice, err := flags.GetIPSlice("dns")
				if err != nil {
					return nil, err
				}
				ips := make([]string, len(ipSlice))
				for i, ip := range ipSlice {
					ips[i] = `"` + ip.String() + `"`
				}
				expr := fmt.Sprintf(".dns += [%s] | .dns |= unique | .hostResolver.enabled=false", strings.Join(ips, ","))
				logrus.Warnf("Disabling HostResolver, as custom DNS addresses (%v) are specified", ipSlice)
				return []string{expr}, nil
			},
			false,
			false,
		},
		{"memory", d(".memory = \"%sGiB\""), false, false},
		{
			"mount",
			func(_ *flag.Flag) ([]string, error) {
				ss, err := flags.GetStringSlice("mount")
				slices.Reverse(ss)
				if err != nil {
					return nil, err
				}
				mountListExpr, err := buildMountListExpression(ss)
				if err != nil {
					return nil, err
				}
				// mount options take precedence over template settings
				expr := fmt.Sprintf(".mounts = %s + .mounts", mountListExpr)
				mountOnly, err := flags.GetStringSlice("mount-only")
				if err != nil {
					return nil, err
				}
				if len(mountOnly) > 0 {
					return nil, errors.New("flag `--mount` conflicts with `--mount-only`")
				}
				return []string{expr}, nil
			},
			false,
			false,
		},
		{
			"mount-only",
			func(_ *flag.Flag) ([]string, error) {
				ss, err := flags.GetStringSlice("mount-only")
				if err != nil {
					return nil, err
				}
				mountListExpr, err := buildMountListExpression(ss)
				if err != nil {
					return nil, err
				}
				expr := `.mounts = ` + mountListExpr
				return []string{expr}, nil
			},
			false,
			false,
		},
		{
			"mount-none",
			func(_ *flag.Flag) ([]string, error) {
				incompatibleFlagNames := []string{"mount", "mount-only"}
				for _, name := range incompatibleFlagNames {
					ss, err := flags.GetStringSlice(name)
					if err != nil {
						return nil, err
					}
					if len(ss) > 0 {
						return nil, errors.New("flag `--mount-none` conflicts with `" + name + "`")
					}
				}
				return []string{".mounts = null"}, nil
			},
			false,
			false,
		},
		{"mount-type", d(".mountType = %q"), false, false},
		{"vm-type", d(".vmType = %q"), false, false},
		{"mount-inotify", d(".mountInotify = %s"), false, true},
		{"mount-writable", d(".mounts[].writable = %s"), false, false},
		{
			"network",
			func(_ *flag.Flag) ([]string, error) {
				ss, err := flags.GetStringSlice("network")
				if err != nil {
					return nil, err
				}
				networks := make([]string, len(ss))
				for i, s := range ss {
					// CLI syntax is still experimental (YAML syntax is out of experimental)
					switch {
					case s == "vzNAT":
						networks[i] = `{"vzNAT": true}`
					case strings.HasPrefix(s, "lima:"):
						network := strings.TrimPrefix(s, "lima:")
						networks[i] = fmt.Sprintf(`{"lima": %q}`, network)
					default:
						return nil, fmt.Errorf(`network name must be "vzNAT" or "lima:*", got %q`, s)
					}
				}
				expr := fmt.Sprintf(`.networks += [%s] | .networks |= unique_by(.lima)`, strings.Join(networks, ","))
				return []string{expr}, nil
			},
			false,
			false,
		},

		{"nested-virt", d(".nestedVirtualization = %s"), false, false},
		{
			"rosetta",
			func(_ *flag.Flag) ([]string, error) {
				b, err := flags.GetBool("rosetta")
				if err != nil {
					return nil, err
				}
				return []string{fmt.Sprintf(".vmOpts.vz.rosetta.enabled = %v | .vmOpts.vz.rosetta.binfmt = %v", b, b)}, nil
			},
			false,
			false,
		},
		{"set", func(v *flag.Flag) ([]string, error) {
			return v.Value.(flag.SliceValue).GetSlice(), nil
		}, false, false},
		{
			"video",
			func(_ *flag.Flag) ([]string, error) {
				b, err := flags.GetBool("video")
				if err != nil {
					return nil, err
				}
				if b {
					return []string{".video.display = \"default\""}, nil
				}
				return []string{".video.display = \"none\""}, nil
			},
			false,
			false,
		},
		{"ssh-port", d(".ssh.localPort = %s"), false, false},
		{"arch", d(".arch = %q"), true, false},
		{
			"containerd",
			func(_ *flag.Flag) ([]string, error) {
				s, err := flags.GetString("containerd")
				if err != nil {
					return nil, err
				}
				switch s {
				case "user":
					return []string{`.containerd.user = true | .containerd.system = false`}, nil
				case "system":
					return []string{`.containerd.user = false | .containerd.system = true`}, nil
				case "user+system", "system+user":
					return []string{`.containerd.user = true | .containerd.system = true`}, nil
				case "none":
					return []string{`.containerd.user = false | .containerd.system = false`}, nil
				default:
					return nil, fmt.Errorf(`expected one of ["user", "system", "user+system", "none"], got %q`, s)
				}
			},
			true,
			false,
		},
		{"disk", d(".disk= \"%sGiB\""), false, false},
		{"plain", d(".plain = %s"), true, false},
		{
			"port-forward",
			func(_ *flag.Flag) ([]string, error) {
				ss, err := flags.GetStringArray("port-forward")
				if err != nil {
					return nil, err
				}
				value, err := BuildPortForwardExpression(ss)
				if err != nil {
					return nil, err
				}
				return []string{value}, nil
			},
			false,
			false,
		},
	}
	var exprs []string
	for _, def := range defs {
		v := flags.Lookup(def.flagName)
		if v != nil && v.Changed {
			if def.experimental {
				logrus.Warnf("`--%s` is experimental", def.flagName)
			}
			if def.onlyValidForNewInstances && !newInstance {
				logrus.Warnf("`--%s` is not applicable to an existing instance (Hint: create a new instance with `limactl create --%s=%s --name=NAME`)",
					def.flagName, def.flagName, v.Value.String())
				continue
			}
			newExprs, err := def.exprFunc(v)
			if err != nil {
				return exprs, fmt.Errorf("error while processing flag %q: %w", def.flagName, err)
			}
			exprs = append(exprs, newExprs...)
		}
	}
	return exprs, nil
}

func isPowerOfTwo(x int) bool {
	return bits.OnesCount(uint(x)) == 1
}

func completeCPUs(hostCPUs int) []int {
	var res []int
	for i := 1; i <= hostCPUs; i *= 2 {
		res = append(res, i)
	}
	if !isPowerOfTwo(hostCPUs) {
		res = append(res, hostCPUs)
	}
	return res
}

func completeMemoryGiB(hostMemory uint64) []float32 {
	hostMemoryHalfGiB := int(hostMemory / 2 / 1024 / 1024 / 1024)
	var res []float32
	if hostMemoryHalfGiB < 1 {
		res = append(res, 0.5)
	}
	for i := 1; i <= hostMemoryHalfGiB; i *= 2 {
		res = append(res, float32(i))
	}
	if hostMemoryHalfGiB > 1 && !isPowerOfTwo(hostMemoryHalfGiB) {
		res = append(res, float32(hostMemoryHalfGiB))
	}
	return res
}


================================================
FILE: cmd/limactl/editflags/editflags_test.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package editflags

import (
	"strings"
	"testing"

	"github.com/spf13/cobra"
	"gotest.tools/v3/assert"

	"github.com/lima-vm/lima/v2/pkg/localpathutil"
)

func TestCompleteCPUs(t *testing.T) {
	assert.DeepEqual(t, []int{1}, completeCPUs(1))
	assert.DeepEqual(t, []int{1, 2}, completeCPUs(2))
	assert.DeepEqual(t, []int{1, 2, 4, 8}, completeCPUs(8))
	assert.DeepEqual(t, []int{1, 2, 4, 8, 16, 20}, completeCPUs(20))
}

func TestCompleteMemoryGiB(t *testing.T) {
	assert.DeepEqual(t, []float32{0.5}, completeMemoryGiB(1<<30))
	assert.DeepEqual(t, []float32{1}, completeMemoryGiB(2<<30))
	assert.DeepEqual(t, []float32{1, 2}, completeMemoryGiB(4<<30))
	assert.DeepEqual(t, []float32{1, 2, 4}, completeMemoryGiB(8<<30))
	assert.DeepEqual(t, []float32{1, 2, 4, 8, 10}, completeMemoryGiB(20<<30))
}

func TestBuildPortForwardExpression(t *testing.T) {
	tests := []struct {
		name         string
		portForwards []string
		expected     string
		expectError  bool
	}{
		{
			name:         "empty port forwards",
			portForwards: []string{},
			expected:     "",
		},
		{
			name:         "single dynamic port forward",
			portForwards: []string{"8080:80"},
			expected:     `.portForwards += [{"guestPort": "80", "hostPort": "8080", "static": false}]`,
		},
		{
			name:         "single static port forward",
			portForwards: []string{"8080:80,static=true"},
			expected:     `.portForwards += [{"guestPort": "80", "hostPort": "8080", "static": true}]`,
		},
		{
			name:         "multiple mixed port forwards",
			portForwards: []string{"8080:80", "2222:22,static=true", "3000:3000"},
			expected:     `.portForwards += [{"guestPort": "80", "hostPort": "8080", "static": false},{"guestPort": "22", "hostPort": "2222", "static": true},{"guestPort": "3000", "hostPort": "3000", "static": false}]`,
		},
		{
			name:         "invalid format - missing colon",
			portForwards: []string{"8080"},
			expectError:  true,
		},
		{
			name:         "invalid format - too many colons",
			portForwards: []string{"8080:80:extra"},
			expectError:  true,
		},
		{
			name:         "invalid static parameter",
			portForwards: []string{"8080:80,invalid=true"},
			expectError:  true,
		},
		{
			name:         "too many parameters",
			portForwards: []string{"8080:80,static=true,extra=value"},
			expectError:  true,
		},
		{
			name:         "whitespace handling",
			portForwards: []string{" 8080 : 80 , static=true "},
			expected:     `.portForwards += [{"guestPort": "80", "hostPort": "8080", "static": true}]`,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			result, err := BuildPortForwardExpression(tt.portForwards)
			if tt.expectError {
				assert.Check(t, err != nil)
			} else {
				assert.NilError(t, err)
				assert.Equal(t, tt.expected, result)
			}
		})
	}
}

func TestParsePortForward(t *testing.T) {
	tests := []struct {
		name        string
		spec        string
		hostPort    string
		guestPort   string
		isStatic    bool
		expectError bool
	}{
		{
			name:      "dynamic port forward",
			spec:      "8080:80",
			hostPort:  "8080",
			guestPort: "80",
			isStatic:  false,
		},
		{
			name:      "static port forward",
			spec:      "8080:80,static=true",
			hostPort:  "8080",
			guestPort: "80",
			isStatic:  true,
		},
		{
			name:      "whitespace handling",
			spec:      " 8080 : 80 , static=true ",
			hostPort:  "8080",
			guestPort: "80",
			isStatic:  true,
		},
		{
			name:        "invalid format - missing colon",
			spec:        "8080",
			expectError: true,
		},
		{
			name:        "invalid format - too many colons",
			spec:        "8080:80:extra",
			expectError: true,
		},
		{
			name:        "invalid parameter",
			spec:        "8080:80,invalid=true",
			expectError: true,
		},
		{
			name:        "too many parameters",
			spec:        "8080:80,static=true,extra=value",
			expectError: true,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			hostPort, guestPort, isStatic, err := ParsePortForward(tt.spec)
			if tt.expectError {
				assert.Check(t, err != nil)
			} else {
				assert.NilError(t, err)
				assert.Equal(t, tt.hostPort, hostPort)
				assert.Equal(t, tt.guestPort, guestPort)
				assert.Equal(t, tt.isStatic, isStatic)
			}
		})
	}
}

func TestYQExpressions(t *testing.T) {
	expand := func(s string) string {
		s, err := localpathutil.Expand(s)
		assert.NilError(t, err)
		// `D:\foo` -> `D:\\foo` (appears in YAML)
		s = strings.ReplaceAll(s, "\\", "\\\\")
		return s
	}
	tests := []struct {
		name        string
		args        []string
		newInstance bool
		expected    []string
		expectError string
	}{
		{
			name:        "mount",
			args:        []string{"--mount", "/foo", "--mount", "./bar:w"},
			newInstance: false,
			expected:    []string{`.mounts = [{"location": "` + expand("./bar") + `", "mountPoint": "` + expand("./bar") + `", "writable": true},{"location": "` + expand("/foo") + `", "mountPoint": "` + expand("/foo") + `", "writable": false}] + .mounts`},
		},
		{
			name:        "mount-only",
			args:        []string{"--mount-only", "/foo", "--mount-only", "/bar:w"},
			newInstance: false,
			expected:    []string{`.mounts = [{"location": "` + expand("/foo") + `", "mountPoint": "` + expand("/foo") + `", "writable": false},{"location": "` + expand("/bar") + `", "mountPoint": "` + expand("/bar") + `", "writable": true}]`},
		},
		{
			name:        "mixture of mount and mount-only",
			args:        []string{"--mount", "/foo", "--mount-only", "/bar:w"},
			newInstance: false,
			expectError: "flag `--mount` conflicts with `--mount-only`",
		},
		{
			name:        "dns",
			args:        []string{"--dns", "8.8.8.8", "--dns", "8.8.4.4", "--dns", "1.1.1.1"},
			newInstance: false,
			expected:    []string{`.dns += ["8.8.8.8","8.8.4.4","1.1.1.1"] | .dns |= unique | .hostResolver.enabled=false`},
		},
		{
			name:        "network vzNAT",
			args:        []string{"--network", "vzNAT"},
			newInstance: true,
			expected:    []string{`.networks += [{"vzNAT": true}] | .networks |= unique_by(.lima)`},
		},
		{
			name:        "network lima:shared",
			args:        []string{"--network", "lima:shared"},
			newInstance: true,
			expected:    []string{`.networks += [{"lima": "shared"}] | .networks |= unique_by(.lima)`},
		},
		{
			name:        "multiple networks",
			args:        []string{"--network", "vzNAT", "--network", "lima:shared", "--network", "lima:bridged"},
			newInstance: true,
			expected:    []string{`.networks += [{"vzNAT": true},{"lima": "shared"},{"lima": "bridged"}] | .networks |= unique_by(.lima)`},
		},
		{
			name:        "nested-virt",
			args:        []string{"--nested-virt"},
			newInstance: false,
			expected:    []string{`.nestedVirtualization = true`},
		},
		{
			name:        "invalid network",
			args:        []string{"--network", "invalid"},
			newInstance: true,
			expectError: `network name must be "vzNAT" or "lima:*", got "invalid"`,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			cmd := &cobra.Command{}
			RegisterEdit(cmd, "")
			assert.NilError(t, cmd.ParseFlags(tt.args))
			expr, err := YQExpressions(cmd.Flags(), tt.newInstance)
			if tt.expectError != "" {
				assert.ErrorContains(t, err, tt.expectError)
			} else {
				assert.NilError(t, err)
				assert.DeepEqual(t, tt.expected, expr)
			}
		})
	}
}


================================================
FILE: cmd/limactl/factory-reset.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"errors"
	"os"
	"path/filepath"
	"strings"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/cidata"
	"github.com/lima-vm/lima/v2/pkg/instance"
	"github.com/lima-vm/lima/v2/pkg/limatype/filenames"
	"github.com/lima-vm/lima/v2/pkg/store"
)

func newFactoryResetCommand() *cobra.Command {
	resetCommand := &cobra.Command{
		Use:               "factory-reset INSTANCE",
		Short:             "Factory reset an instance of Lima",
		Args:              WrapArgsError(cobra.MaximumNArgs(1)),
		RunE:              factoryResetAction,
		ValidArgsFunction: factoryResetBashComplete,
		GroupID:           advancedCommand,
	}
	return resetCommand
}

func factoryResetAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	instName := DefaultInstanceName
	if len(args) > 0 {
		instName = args[0]
	}

	inst, err := store.Inspect(ctx, instName)
	if err != nil {
		if errors.Is(err, os.ErrNotExist) {
			logrus.Infof("Instance %q not found", instName)
			return nil
		}
		return err
	}
	if inst.Protected {
		return errors.New("instance is protected to prohibit accidental factory-reset (Hint: use `limactl unprotect`)")
	}

	instance.StopForcibly(inst)

	fi, err := os.ReadDir(inst.Dir)
	if err != nil {
		return err
	}
	retain := map[string]struct{}{
		filenames.LimaVersion:  {},
		filenames.Protected:    {},
		filenames.VzIdentifier: {},
	}
	for _, f := range fi {
		path := filepath.Join(inst.Dir, f.Name())
		if _, ok := retain[f.Name()]; !ok && !strings.HasSuffix(path, ".yaml") && !strings.HasSuffix(path, ".yml") {
			logrus.Infof("Removing %q", path)
			if err := os.Remove(path); err != nil {
				logrus.Error(err)
			}
		}
	}
	// Regenerate the cloud-config.yaml, to reflect any changes to the global _config
	if err := cidata.GenerateCloudConfig(ctx, inst.Dir, instName, inst.Config); err != nil {
		logrus.Error(err)
	}

	logrus.Infof("Instance %q has been factory reset", instName)
	return nil
}

func factoryResetBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
	return bashCompleteInstanceNames(cmd)
}


================================================
FILE: cmd/limactl/gendoc.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"bytes"
	"fmt"
	"io/fs"
	"os"
	"path/filepath"
	"strings"

	"github.com/cpuguy83/go-md2man/v2/md2man"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/cobra/doc"
)

func newGenDocCommand() *cobra.Command {
	genmanCommand := &cobra.Command{
		Use:    "generate-doc DIR",
		Short:  "Generate cli-reference pages",
		Args:   WrapArgsError(cobra.MinimumNArgs(1)),
		RunE:   gendocAction,
		Hidden: true,
	}
	genmanCommand.Flags().String("type", "man", "Output type  (man, docsy)")
	genmanCommand.Flags().String("output", "", "Output directory")
	genmanCommand.Flags().String("prefix", "", "Install prefix")
	return genmanCommand
}

func gendocAction(cmd *cobra.Command, args []string) error {
	output, err := cmd.Flags().GetString("output")
	if err != nil {
		return err
	}
	output, err = filepath.Abs(output)
	if err != nil {
		return err
	}
	prefix, err := cmd.Flags().GetString("prefix")
	if err != nil {
		return err
	}
	outputType, err := cmd.Flags().GetString("type")
	if err != nil {
		return err
	}
	homeDir, err := os.UserHomeDir()
	if err != nil {
		return err
	}
	dir := args[0]
	switch outputType {
	case "man":
		if err := genMan(cmd, dir); err != nil {
			return err
		}
	case "docsy":
		if err := genDocsy(cmd, dir); err != nil {
			return err
		}
	}
	if output != "" && prefix != "" {
		if err := replaceAll(dir, output, prefix); err != nil {
			return err
		}
	}
	return replaceAll(dir, homeDir, "~")
}

func genMan(cmd *cobra.Command, dir string) error {
	logrus.Infof("Generating man %q", dir)
	// lima(1)
	filePath := filepath.Join(dir, "lima.1")
	md := "LIMA 1\n======" + `
# NAME
lima - ` + cmd.Root().Short + `
# SYNOPSIS
**lima** [_COMMAND_...]
# DESCRIPTION
lima is an alias for "limactl shell default".
The instance name ("default") can be changed by specifying $LIMA_INSTANCE.

The shell and initial workdir inside the instance can be specified via $LIMA_SHELL
and $LIMA_WORKDIR.
# SEE ALSO
**limactl**(1)
`
	out := md2man.Render([]byte(md))
	if err := os.WriteFile(filePath, out, 0o644); err != nil {
		return err
	}
	// limactl(1)
	header := &doc.GenManHeader{
		Title:   "LIMACTL",
		Section: "1",
	}
	return doc.GenManTree(cmd.Root(), header, dir)
}

func escapeMarkdown(text string) string {
	lines := strings.Split(text, "\n")
	for i := range lines {
		// Need to escape backticks first, before adding more
		for c := range strings.SplitSeq("\\`*_[]()#+-.|", "") {
			lines[i] = strings.ReplaceAll(lines[i], c, "\\"+c)
		}
		if i < len(lines)-1 {
			if lines[i] != "" && lines[i+1] != "" {
				lines[i] += "  " // line break
			}
		}
	}
	return strings.Join(lines, "\n")
}

func genDocsy(cmd *cobra.Command, dir string) error {
	for _, c := range cmd.Root().Commands() {
		c.Long = escapeMarkdown(c.Long)
	}
	return doc.GenMarkdownTreeCustom(cmd.Root(), dir, func(s string) string {
		// Replace limactl_completion_bash to completion bash for docsy title
		name := filepath.Base(s)
		name = strings.ReplaceAll(name, "limactl_", "")
		name = strings.ReplaceAll(name, "_", " ")
		name = strings.TrimSuffix(name, filepath.Ext(name))
		return fmt.Sprintf(`---
title: %s
weight: 3
---
`, name)
	}, func(s string) string {
		// Use ../ for move one folder up for docsy
		return "../" + strings.TrimSuffix(s, filepath.Ext(s))
	})
}

// replaceAll replaces all occurrences of text with replacement, for all files in dir.
func replaceAll(dir, text, replacement string) error {
	logrus.Infof("Replacing %q with %q", text, replacement)
	return filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error {
		if err != nil {
			return err
		}
		if path == dir {
			return nil
		}
		if info.IsDir() {
			return filepath.SkipDir
		}
		in, err := os.ReadFile(path)
		if err != nil {
			return err
		}
		out := bytes.ReplaceAll(in, []byte(text), []byte(replacement))
		err = os.WriteFile(path, out, 0o644)
		if err != nil {
			return err
		}
		return nil
	})
}


================================================
FILE: cmd/limactl/genschema.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"encoding/json"
	"errors"
	"fmt"
	"os"

	"github.com/invopop/jsonschema"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	orderedmap "github.com/wk8/go-ordered-map/v2"

	"github.com/lima-vm/lima/v2/pkg/jsonschemautil"
	"github.com/lima-vm/lima/v2/pkg/limatype"
)

func newGenSchemaCommand() *cobra.Command {
	genschemaCommand := &cobra.Command{
		Use:    "generate-jsonschema",
		Short:  "Generate json-schema document",
		Args:   WrapArgsError(cobra.ArbitraryArgs),
		RunE:   genschemaAction,
		Hidden: true,
	}
	genschemaCommand.Flags().String("schemafile", "", "Output file")
	return genschemaCommand
}

func toAny(args []string) []any {
	result := []any{nil}
	for _, arg := range args {
		result = append(result, arg)
	}
	return result
}

func getProp(props *orderedmap.OrderedMap[string, *jsonschema.Schema], key string) *jsonschema.Schema {
	value, ok := props.Get(key)
	if !ok {
		return nil
	}
	return value
}

func genschemaAction(cmd *cobra.Command, args []string) error {
	file, err := cmd.Flags().GetString("schemafile")
	if err != nil {
		return err
	}

	schema := jsonschema.Reflect(&limatype.LimaYAML{})
	// allow Disk to be either string (name) or object (struct)
	schema.Definitions["Disk"].Type = "" // was: "object"
	schema.Definitions["Disk"].OneOf = []*jsonschema.Schema{
		{Type: "string"},
		{Type: "object"},
	}
	// allow BaseTemplates to be either string (url) or array (array)
	schema.Definitions["BaseTemplates"].Type = "" // was: "array"
	schema.Definitions["BaseTemplates"].OneOf = []*jsonschema.Schema{
		{Type: "string"},
		{Type: "array"},
	}
	// allow LocatorWithDigest to be either string (url) or object (struct)
	schema.Definitions["LocatorWithDigest"].Type = "" // was: "object"
	schema.Definitions["LocatorWithDigest"].OneOf = []*jsonschema.Schema{
		{Type: "string"},
		{Type: "object"},
	}
	properties := schema.Definitions["LimaYAML"].Properties
	getProp(properties, "os").Enum = toAny(limatype.OSTypes)
	getProp(properties, "arch").Enum = toAny(limatype.ArchTypes)
	getProp(properties, "mountType").Enum = toAny(limatype.MountTypes)
	getProp(properties, "vmType").Enum = toAny(limatype.VMTypes)
	j, err := json.MarshalIndent(schema, "", "    ")
	if err != nil {
		return err
	}
	if len(args) == 0 {
		_, err = fmt.Fprintln(cmd.OutOrStdout(), string(j))
		return err
	}

	if file == "" {
		return errors.New("need --schemafile to validate")
	}
	err = os.WriteFile(file, j, 0o644)
	if err != nil {
		return err
	}
	for _, f := range args {
		err = jsonschemautil.Validate(file, f)
		if err != nil {
			return fmt.Errorf("%q: %w", f, err)
		}
		logrus.Infof("%q: OK", f)
	}

	return err
}


================================================
FILE: cmd/limactl/guest-install.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"bytes"
	"compress/gzip"
	"context"
	"fmt"
	"io"
	"os"
	"os/exec"
	"path/filepath"
	"strings"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/cacheutil"
	"github.com/lima-vm/lima/v2/pkg/limatype"
	"github.com/lima-vm/lima/v2/pkg/limatype/filenames"
	"github.com/lima-vm/lima/v2/pkg/store"
	"github.com/lima-vm/lima/v2/pkg/usrlocal"
)

func newGuestInstallCommand() *cobra.Command {
	guestInstallCommand := &cobra.Command{
		Use:               "guest-install INSTANCE",
		Short:             "Install guest components",
		Args:              WrapArgsError(cobra.MaximumNArgs(1)),
		RunE:              guestInstallAction,
		ValidArgsFunction: cobra.NoFileCompletions,
		Hidden:            true,
	}
	return guestInstallCommand
}

func runCmd(ctx context.Context, name string, flags []string, args ...string) error {
	cmd := exec.CommandContext(ctx, name, append(flags, args...)...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	logrus.Debugf("executing %v", cmd.Args)
	return cmd.Run()
}

func shell(ctx context.Context, name string, flags []string, args ...string) (string, error) {
	cmd := exec.CommandContext(ctx, name, append(flags, args...)...)
	out, err := cmd.Output()
	if err != nil {
		return "", err
	}
	out = bytes.TrimSuffix(out, []byte{'\n'})
	return string(out), nil
}

func guestInstallAction(cmd *cobra.Command, args []string) error {
	instName := DefaultInstanceName
	if len(args) > 0 {
		instName = args[0]
	}

	inst, err := store.Inspect(cmd.Context(), instName)
	if err != nil {
		return err
	}
	if inst.Status == limatype.StatusStopped {
		return fmt.Errorf("instance %q is stopped, run `limactl start %s` to start the instance", instName, instName)
	}

	ctx := cmd.Context()

	sshExe := "ssh"
	sshConfig := filepath.Join(inst.Dir, filenames.SSHConfig)
	sshFlags := []string{"-F", sshConfig}

	scpExe := "scp"
	scpFlags := sshFlags

	hostname := fmt.Sprintf("lima-%s", inst.Name)
	prefix := *inst.Config.GuestInstallPrefix

	// lima-guestagent
	guestAgentBinary, err := usrlocal.GuestAgentBinary(*inst.Config.OS, *inst.Config.Arch)
	if err != nil {
		return err
	}
	guestAgentFilename := filepath.Base(guestAgentBinary)
	if filepath.Ext(guestAgentBinary) == ".gz" {
		compressedGuestAgent, err := os.Open(guestAgentBinary)
		if err != nil {
			return err
		}
		defer compressedGuestAgent.Close()
		tmpGuestAgent, err := os.CreateTemp("", "lima-guestagent-")
		if err != nil {
			return err
		}
		logrus.Debugf("Decompressing %s", guestAgentBinary)
		guestAgent, err := gzip.NewReader(compressedGuestAgent)
		if err != nil {
			return err
		}
		defer guestAgent.Close()
		_, err = io.Copy(tmpGuestAgent, guestAgent)
		if err != nil {
			return err
		}
		tmpGuestAgent.Close()
		guestAgentBinary = tmpGuestAgent.Name()
		defer os.RemoveAll(guestAgentBinary)
		guestAgentFilename = strings.TrimSuffix(guestAgentFilename, ".gz")
	}
	tmpname := "lima-guestagent"
	tmp, err := shell(ctx, sshExe, sshFlags, hostname, "mktemp", "-t", "lima-guestagent.XXXXXX")
	if err != nil {
		return err
	}
	bin := prefix + "/bin/lima-guestagent"
	logrus.Infof("Copying %q to %s:%s", guestAgentFilename, inst.Name, tmpname)
	scpArgs := []string{guestAgentBinary, hostname + ":" + tmp}
	if err := runCmd(ctx, scpExe, scpFlags, scpArgs...); err != nil {
		return nil
	}
	logrus.Infof("Installing %s to %s", tmpname, bin)
	sshArgs := []string{hostname, "sudo", "install", "-m", "755", tmp, bin}
	if err := runCmd(ctx, sshExe, sshFlags, sshArgs...); err != nil {
		return nil
	}
	_, _ = shell(ctx, sshExe, sshFlags, hostname, "rm", tmp)

	// nerdctl-full.tgz
	nerdctlFilename := cacheutil.NerdctlArchive(inst.Config)
	if nerdctlFilename != "" {
		nerdctlArchive, err := cacheutil.EnsureNerdctlArchiveCache(cmd.Context(), inst.Config, false)
		if err != nil {
			return err
		}
		tmpname := "nerdctl-full.tgz"
		tmp, err := shell(ctx, sshExe, sshFlags, hostname, "mktemp", "-t", "nerdctl-full.XXXXXX.tgz")
		if err != nil {
			return err
		}
		logrus.Infof("Copying %q to %s:%s", nerdctlFilename, inst.Name, tmpname)
		scpArgs := []string{nerdctlArchive, hostname + ":" + tmp}
		if err := runCmd(ctx, scpExe, scpFlags, scpArgs...); err != nil {
			return nil
		}
		logrus.Infof("Installing %s in %s", tmpname, prefix)
		sshArgs := []string{hostname, "sudo", "tar", "Cxzf", prefix, tmp}
		if err := runCmd(ctx, sshExe, sshFlags, sshArgs...); err != nil {
			return nil
		}
		_, _ = shell(ctx, sshExe, sshFlags, hostname, "rm", tmp)
	}

	return nil
}


================================================
FILE: cmd/limactl/hostagent.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"errors"
	"fmt"
	"io"
	"net"
	"net/http"
	"os"
	"os/signal"
	"runtime"
	"strconv"
	"syscall"

	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/hostagent"
	"github.com/lima-vm/lima/v2/pkg/hostagent/api/server"
	"github.com/lima-vm/lima/v2/pkg/store"
)

func newHostagentCommand() *cobra.Command {
	hostagentCommand := &cobra.Command{
		Use:    "hostagent INSTANCE",
		Short:  "Run hostagent",
		Args:   WrapArgsError(cobra.ExactArgs(1)),
		RunE:   hostagentAction,
		Hidden: true,
	}
	hostagentCommand.Flags().StringP("pidfile", "p", "", "Write PID to file")
	hostagentCommand.Flags().String("socket", "", "Path of hostagent socket")
	hostagentCommand.Flags().Bool("run-gui", false, "Run GUI synchronously within hostagent")
	hostagentCommand.Flags().String("guestagent", "", "Local file path (not URL) of lima-guestagent.OS-ARCH[.gz]")
	hostagentCommand.Flags().String("nerdctl-archive", "", "Local file path (not URL) of nerdctl-full-VERSION-GOOS-GOARCH.tar.gz")
	hostagentCommand.Flags().Bool("progress", false, "Show provision script progress by monitoring cloud-init logs")
	return hostagentCommand
}

func hostagentAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	pidfile, err := cmd.Flags().GetString("pidfile")
	if err != nil {
		return err
	}
	if pidfile != "" {
		if existingPID, err := store.ReadPIDFile(pidfile); existingPID != 0 {
			return fmt.Errorf("another hostagent may already be running with pid %d (pidfile %q)", existingPID, pidfile)
		} else if err != nil {
			return fmt.Errorf("failed to determine if another hostagent is running: %w", err)
		}
		if err := os.WriteFile(pidfile, []byte(strconv.Itoa(os.Getpid())+"\n"), 0o644); err != nil {
			return err
		}
		defer os.RemoveAll(pidfile)
	}
	socket, err := cmd.Flags().GetString("socket")
	if err != nil {
		return err
	}
	if socket == "" {
		return errors.New("socket must be specified (limactl version mismatch?)")
	}

	instName := args[0]

	runGUI, err := cmd.Flags().GetBool("run-gui")
	if err != nil {
		return err
	}
	if runGUI {
		// Without this the call to vz.RunGUI fails. Adding it here, as this has to be called before the vz cgo loads.
		runtime.LockOSThread()
		defer runtime.UnlockOSThread()
	}

	signalCh := make(chan os.Signal, 1)
	signal.Notify(signalCh, os.Interrupt, syscall.SIGTERM)

	stdout := &syncWriter{w: cmd.OutOrStdout()}
	stderr := &syncWriter{w: cmd.ErrOrStderr()}

	initLogrus(stderr)
	var opts []hostagent.Opt
	guestagentBinary, err := cmd.Flags().GetString("guestagent")
	if err != nil {
		return err
	}
	if guestagentBinary != "" {
		opts = append(opts, hostagent.WithGuestAgentBinary(guestagentBinary))
	}
	nerdctlArchive, err := cmd.Flags().GetString("nerdctl-archive")
	if err != nil {
		return err
	}
	if nerdctlArchive != "" {
		opts = append(opts, hostagent.WithNerdctlArchive(nerdctlArchive))
	}
	showProgress, err := cmd.Flags().GetBool("progress")
	if err != nil {
		return err
	}
	if showProgress {
		opts = append(opts, hostagent.WithCloudInitProgress(showProgress))
	}
	ha, err := hostagent.New(ctx, instName, stdout, signalCh, opts...)
	if err != nil {
		return err
	}

	backend := &server.Backend{
		Agent: ha,
	}
	r := http.NewServeMux()
	server.AddRoutes(r, backend)
	srv := &http.Server{Handler: r}
	err = os.RemoveAll(socket)
	if err != nil {
		return err
	}
	var lc net.ListenConfig
	l, err := lc.Listen(ctx, "unix", socket)
	logrus.Infof("hostagent socket created at %s", socket)
	if err != nil {
		return err
	}
	go func() {
		if serveErr := srv.Serve(l); serveErr != http.ErrServerClosed {
			logrus.WithError(serveErr).Warn("hostagent API server exited with an error")
		}
	}()
	defer srv.Close()
	return ha.Run(cmd.Context())
}

// syncer is implemented by *os.File.
type syncer interface {
	Sync() error
}

type syncWriter struct {
	w io.Writer
}

func (w *syncWriter) Write(p []byte) (int, error) {
	written, err := w.w.Write(p)
	if err == nil {
		if s, ok := w.w.(syncer); ok {
			_ = s.Sync()
		}
	}
	return written, err
}

func initLogrus(stderr io.Writer) {
	logrus.SetOutput(stderr)
	// JSON logs are parsed in pkg/hostagent/events.Watcher()
	logrus.SetFormatter(new(logrus.JSONFormatter))
	// HostAgent logging is one level more verbose than the start command itself
	if logrus.GetLevel() == logrus.DebugLevel {
		logrus.SetLevel(logrus.TraceLevel)
	} else {
		logrus.SetLevel(logrus.DebugLevel)
	}
}


================================================
FILE: cmd/limactl/info.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"encoding/json"
	"fmt"

	"github.com/mikefarah/yq/v4/pkg/yqlib"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/limainfo"
	"github.com/lima-vm/lima/v2/pkg/uiutil"
	"github.com/lima-vm/lima/v2/pkg/yqutil"
)

func newInfoCommand() *cobra.Command {
	infoCommand := &cobra.Command{
		Use:     "info",
		Short:   "Show diagnostic information",
		Args:    WrapArgsError(cobra.NoArgs),
		RunE:    infoAction,
		GroupID: advancedCommand,
	}
	infoCommand.Flags().String("yq", ".", "Apply yq expression to output")

	return infoCommand
}

func infoAction(cmd *cobra.Command, _ []string) error {
	ctx := cmd.Context()

	yq, err := cmd.Flags().GetString("yq")
	if err != nil {
		return err
	}

	info, err := limainfo.New(ctx)
	if err != nil {
		return err
	}
	j, err := json.MarshalIndent(info, "", "    ")
	if err != nil {
		return err
	}

	encoderPrefs := yqlib.ConfiguredJSONPreferences.Copy()
	encoderPrefs.Indent = 4
	encoderPrefs.ColorsEnabled = uiutil.OutputIsTTY(cmd.OutOrStdout())
	encoder := yqlib.NewJSONEncoder(encoderPrefs)
	str, err := yqutil.EvaluateExpressionWithEncoder(yq, string(j), encoder)
	if err == nil {
		_, err = fmt.Fprint(cmd.OutOrStdout(), str)
	}
	return err
}


================================================
FILE: cmd/limactl/list.go
================================================
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
	"bufio"
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"reflect"
	"slices"
	"strings"

	"github.com/cheggaaa/pb/v3/termutil"
	"github.com/mikefarah/yq/v4/pkg/yqlib"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"

	"github.com/lima-vm/lima/v2/pkg/limatype"
	"github.com/lima-vm/lima/v2/pkg/store"
	"github.com/lima-vm/lima/v2/pkg/uiutil"
	"github.com/lima-vm/lima/v2/pkg/yqutil"
)

func fieldNames() []string {
	names := []string{}
	t := reflect.TypeFor[store.FormatData]()
	for i := range t.NumField() {
		f := t.Field(i)
		if f.Anonymous {
			for j := range f.Type.NumField() {
				if tag := f.Tag.Get("lima"); tag != "deprecated" {
					names = append(names, f.Type.Field(j).Name)
				}
			}
		} else {
			if tag := f.Tag.Get("lima"); tag != "deprecated" {
				names = append(names, t.Field(i).Name)
			}
		}
	}
	return names
}

func newListCommand() *cobra.Command {
	listCommand := &cobra.Command{
		Use:     "list [flags] [INSTANCE]...",
		Aliases: []string{"ls"},
		Short:   "List instances of Lima",
		Long: `List instances of Lima.

The output can be presented in one of several formats, using the --format <format> flag.

  --format json  - Output in JSON format
  --format yaml  - Output in YAML format
  --format table - Output in table format
  --format '{{ <go template> }}' - If the format begins and ends with '{{ }}', then it is used as a go template.

Filtering instances:
  --filter EXPR  - Filter instances using yq expression (this is equivalent to --yq 'select(EXPR)')
                   Can be specified multiple times (combined with AND logic) and it works with all output formats.
                   Examples:
                     --filter '.status == "Running"'
                     --filter '.vmType == "vz"'
                     --filter '.status == "Running"' --filter '.vmType == "vz"' (Same as AND)
` + store.FormatHelp + `
The following legacy flags continue to function:
  --json - equal to '--format json'`,
		Args:              WrapArgsError(cobra.ArbitraryArgs),
		RunE:              listAction,
		ValidArgsFunction: listBashComplete,
		GroupID:           basicCommand,
	}

	listCommand.Flags().StringP("format", "f", "table", "Output format, one of: json, yaml, table, go-template")
	listCommand.Flags().Bool("list-fields", false, "List fields available for format")
	listCommand.Flags().Bool("json", false, "Same as --format=json")
	listCommand.Flags().BoolP("quiet", "q", false, "Only show names")
	listCommand.Flags().Bool("all-fields", false, "Show all fields")
	listCommand.Flags().StringArray("yq", nil, "Apply yq expression to each instance")
	listCommand.Flags().StringArrayP("filter", "l", nil, "Filter instances using yq expression (equivalent to --yq 'select(EXPR)')")

	return listCommand
}

func instanceMatches(arg string, instances []string) []string {
	matches := []string{}
	for _, instance := range instances {
		if instance == arg {
			matches = append(matches, instance)
		}
	}
	return matches
}

// unmatchedInstancesError is created when unmatched instance names found.
type unmatchedInstancesError struct{}

// Error implements error.
func (unmatchedInstancesError) Error() string {
	return "unmatched instances"
}

// ExitCode implements ExitCoder.
func (unmatchedInstancesError) ExitCode() int {
	return 1
}

func listAction(cmd *cobra.Command, args []string) error {
	ctx := cmd.Context()
	quiet, err := cmd.Flags().GetBool("quiet")
	if err != nil {
		return err
	}
	format, err := cmd.Flags().GetString("format")
	if err != nil {
		return err
	}
	listFields, err := cmd.Flags().GetBool("list-fields")
	if err != nil {
		return err
	}
	jsonFormat, err := cmd.Flags().GetBool("json")
	if err != nil {
		return err
	}
	yq, err := cmd.Flags().GetStringArray("yq")
	if err != nil {
		return err
	}
	filter, err := cmd.Flags().GetStringArray("filter")
	if err != nil {
		return err
	}

	if jsonFormat {
		format = "json"
	}

	// conflicts
	if jsonFormat && cmd.Flags().Changed("format") {
		return errors.New("option --json conflicts with option --format")
	}
	if listFields && cmd.Flags().Changed("format") {
		return errors.New("option --list-fields conflicts with option --format")
	}
	if len(yq) != 0 {
		if cmd.Flags().Changed("format") && format != "json" && format != "yaml" {
			return errors.New("option --yq only works with --format json or yaml")
		}
		if listFields {
			return errors.New("option --list-fields conflicts with option --yq")
		}
	}
	if len(filter) != 0 {
		if listFields {
			return errors.New("option --list-fields conflicts with option --filter")
		}
	}

	if quiet && format != "table" {
		return errors.New("option --quiet can only be used with '--format table'")
	}

	if listFields {
		names := fieldNames()
		slices.Sort(names)
		fmt.Fprintln(cmd.OutOrStdout(), strings.Join(names, "\n"))
		return nil
	}

	if err := store.Validate(); err != nil {
		logrus.Warnf("The directory %q does not look like a valid Lima directory: %v", store.Directory(), err)
	}

	allInstances, err := store.Instances()
	if err != nil {
		return err
	}
	if len(args) == 0 && len(allInstances) == 0 {
		logrus.Warn("No instance found. Run `limactl create` to create an instance.")
		return nil
	}

	instanceNames := []string{}
	unmatchedInstances := false
	if len(args) > 0 {
		for _, arg := range args {
			matches := instanceMatches(arg, allInstances)
			if len(matches) > 0 {
				instanceNames = append(instanceNames, matches...)
			} else {
				logrus.Warnf("No instance matching %v found.", arg)
				unmatchedInstances = true
			}
		}
	} else {
		instanceNames = allInstances
	}

	if quiet && len(yq) == 0 && len(filter) == 0 {
		for _, instName := range instanceNames {
			fmt.Fprintln(cmd.OutOrStdout(), instName)
		}
		if unmatchedInstances {
			return unmatchedInstancesError{}
		}
		return nil
	}

	// get the state and config for all the requested instances
	var instances []*limatype.Instance
	for _, instanceName := range instanceNames {
		instance, err := store.Inspect(ctx, instanceName)
		if err != nil {
			return fmt.Errorf("unable to load instance %s: %w", instanceName, err)
		}
		instances = append(instances, instance)
	}

	if len(filter) > 0 {
		var filterExprs []string
		for _, f := range filter {
			filterExprs = append(filterExprs, "select("+f+")")
		}
		instances, err = filterInstances(instances, filterExprs)
		if err != nil {
			return err
		}
	}

	if quiet && len(yq) == 0 {
		for _, instance := range instances {
			fmt.Fprintln(cmd.OutOrStdout(), instance.Name)
		}
		if unmatchedInstances {
			return unmatchedInstancesError{}
		}
		return nil
	}

	for _, instance := range instances {
		if len(instance.Errors) > 0 {
			logrus.WithField("errors", instance.Errors).Warnf("instance %q has errors", instance.Name)
		}
	}

	allFields, err := cmd.Flags().GetBool("all-fields")
	if err != nil {
		return err
	}

	options := store.PrintOptions{AllFields: allFields}
	isTTY := uiutil.OutputIsTTY(cmd.OutOrStdout())
	if isTTY {
		if w, err := termutil.TerminalWidth(); err == nil {
			options.TerminalWidth = w
		}
	}

	// --yq implies --format json unless --format has been explicitly specified
	if len(yq) != 0 && !cmd.Flags().Changed("format") {
		format = "json"
	}

	// Always pipe JSON and YAML through yq to colorize it if isTTY
	if len(yq) == 0 && (format == "json" || format == "yaml") {
		yq = append(yq, ".")
	}

	if len(yq) == 0 {
		err = store.PrintInstances(cmd.OutOrStdout(), instances, format, &options)
		if err == nil && unmatchedInstances {
			return unmatchedInstancesError{}
		}
		return err
	}

	if quiet {
		yq = append(yq, ".name")
	}
	yqExpr := strings.Join(yq, " | ")

	buf := new(bytes.Buffer)
	err = store.PrintInstances(buf, instances, format, &options)
	if err != nil {
		return err
	}

	if format == "json" {
		// The JSON encoder will create empty objects (YAML maps), even when they have the ",omitempty" tag.
		deleteEmptyObjects := `del(.. | select(tag == "!!map" and length == 0))`
		yqExpr += " | " + deleteEmptyObjects

		encoderPrefs := yqlib.ConfiguredJSONPreferences.Copy()
		encoderPrefs.ColorsEnabled = false
		encoderPrefs.Indent = 0
Download .txt
gitextract_kwe40__b/

├── .codespellrc
├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yaml
│   │   ├── config.yml
│   │   └── feature_request.yaml
│   ├── actions/
│   │   ├── setup_cache_for_template/
│   │   │   └── action.yml
│   │   └── upload_failure_logs_if_exists/
│   │       └── action.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── codeql.yaml
│       ├── release.yml
│       ├── scorecard.yml
│       ├── spell.yml
│       └── test.yml
├── .gitignore
├── .gitmodules
├── .golangci.yml
├── .ls-lint.yml
├── .markdownlint.json
├── .protolint.yaml
├── .shellcheckrc
├── .yamllint
├── LICENSE
├── MAINTAINERS.md
├── Makefile
├── NOTICE
├── README.md
├── ROADMAP.md
├── cmd/
│   ├── apptainer.lima
│   ├── docker.lima
│   ├── kubectl.lima
│   ├── lima
│   ├── lima-driver-krunkit/
│   │   └── main_darwin_arm64.go
│   ├── lima-driver-qemu/
│   │   └── main.go
│   ├── lima-driver-vz/
│   │   └── main_darwin.go
│   ├── lima-driver-wsl2/
│   │   └── main_windows.go
│   ├── lima-guestagent/
│   │   ├── daemon_linux.go
│   │   ├── fake_cloud_init_darwin.go
│   │   ├── install_systemd_linux.go
│   │   ├── lima-guestagent.TEMPLATE.service
│   │   ├── main.go
│   │   ├── root_darwin.go
│   │   ├── root_linux.go
│   │   └── root_others.go
│   ├── lima.bat
│   ├── limactl/
│   │   ├── clone.go
│   │   ├── completion.go
│   │   ├── copy.go
│   │   ├── debug.go
│   │   ├── delete.go
│   │   ├── disk.go
│   │   ├── edit.go
│   │   ├── editflags/
│   │   │   ├── editflags.go
│   │   │   └── editflags_test.go
│   │   ├── factory-reset.go
│   │   ├── gendoc.go
│   │   ├── genschema.go
│   │   ├── guest-install.go
│   │   ├── hostagent.go
│   │   ├── info.go
│   │   ├── list.go
│   │   ├── main.go
│   │   ├── main_darwin.go
│   │   ├── main_qemu.go
│   │   ├── main_windows.go
│   │   ├── network.go
│   │   ├── protect.go
│   │   ├── prune.go
│   │   ├── restart.go
│   │   ├── shell.go
│   │   ├── shell_test.go
│   │   ├── show-ssh.go
│   │   ├── snapshot.go
│   │   ├── start-at-login.go
│   │   ├── start-at-login_unix.go
│   │   ├── start-at-login_windows.go
│   │   ├── start.go
│   │   ├── stop.go
│   │   ├── sudoers.go
│   │   ├── sudoers_darwin.go
│   │   ├── sudoers_nodarwin.go
│   │   ├── template.go
│   │   ├── tunnel.go
│   │   ├── unprotect.go
│   │   ├── usernet.go
│   │   └── watch.go
│   ├── limactl-mcp/
│   │   └── main.go
│   ├── limactl-url-fedora-rawhide
│   ├── nerdctl.lima
│   ├── podman.lima
│   └── yq/
│       └── yq.go
├── docs/
│   └── README.md
├── go.mod
├── go.sum
├── hack/
│   ├── allowed-licenses.txt
│   ├── ansible-test.yaml
│   ├── bats/
│   │   ├── README.md
│   │   ├── extras/
│   │   │   ├── README.md
│   │   │   ├── colima.bats
│   │   │   ├── freebsd.bats
│   │   │   ├── k8s.bats
│   │   │   └── port-monitor.bats
│   │   ├── helpers/
│   │   │   ├── limactl.bash
│   │   │   ├── load.bash
│   │   │   └── logs.bash
│   │   └── tests/
│   │       ├── copy.bats
│   │       ├── list.bats
│   │       ├── mcp.bats
│   │       ├── path.bats
│   │       ├── preserve-env.bats
│   │       ├── protect.bats
│   │       ├── shell-sync.bats
│   │       ├── shell.bats
│   │       ├── url-github.bats
│   │       └── yq.bats
│   ├── brew-install-version.sh
│   ├── cache-common-inc.sh
│   ├── calculate-cache.sh
│   ├── codesign/
│   │   └── debugserver
│   ├── common.inc.sh
│   ├── debug-cache.sh
│   ├── gogenerate/
│   │   └── protoc.sh
│   ├── inject-cmdline-to-template.sh
│   ├── install-qemu.sh
│   ├── ltag/
│   │   ├── bash.txt
│   │   ├── dockerfile.txt
│   │   ├── go.txt
│   │   └── makefile.txt
│   ├── oss-fuzz-build.sh
│   ├── test-mount-home.sh
│   ├── test-nonplain-static-port-forward.sh
│   ├── test-plain-static-port-forward.sh
│   ├── test-port-forwarding.pl
│   ├── test-selinux.sh
│   ├── test-templates/
│   │   ├── alpine-iso-9p-writable.yaml
│   │   ├── net-user-v2.yaml
│   │   └── test-misc.yaml
│   ├── test-templates.sh
│   ├── test-upgrade.sh
│   ├── toolexec-for-codesign.sh
│   ├── tools/
│   │   ├── go.mod
│   │   ├── go.sum
│   │   └── pinversion.go
│   ├── update-template-almalinux-kitten.sh
│   ├── update-template-almalinux.sh
│   ├── update-template-alpine.sh
│   ├── update-template-archlinux.sh
│   ├── update-template-centos-stream.sh
│   ├── update-template-debian.sh
│   ├── update-template-fedora.sh
│   ├── update-template-freebsd.sh
│   ├── update-template-macos.sh
│   ├── update-template-opensuse.sh
│   ├── update-template-oraclelinux.sh
│   ├── update-template-rocky.sh
│   ├── update-template-ubuntu.sh
│   ├── update-template.sh
│   └── validate-artifact.sh
├── pkg/
│   ├── apfs/
│   │   ├── chown.go
│   │   ├── chown_darwin_test.go
│   │   ├── fletcher64.go
│   │   ├── fletcher64_test.go
│   │   └── types.go
│   ├── autostart/
│   │   ├── autostart.go
│   │   ├── autostart_test.go
│   │   ├── launchd/
│   │   │   ├── io.lima-vm.autostart.INSTANCE.plist
│   │   │   ├── launchd.go
│   │   │   └── launchd_test.go
│   │   ├── managers.go
│   │   ├── managers_darwin.go
│   │   ├── managers_linux.go
│   │   ├── managers_others.go
│   │   └── systemd/
│   │       ├── lima-vm@INSTANCE.service
│   │       ├── systemd.go
│   │       ├── systemd_linux.go
│   │       ├── systemd_others.go
│   │       └── systemd_test.go
│   ├── bicopy/
│   │   └── bicopy.go
│   ├── cacheutil/
│   │   └── cacheutil.go
│   ├── cidata/
│   │   ├── cidata.TEMPLATE.d/
│   │   │   ├── boot.FreeBSD/
│   │   │   │   └── 05-lima-mounts.sh
│   │   │   ├── boot.Linux/
│   │   │   │   ├── 00-alpine-user-group.sh
│   │   │   │   ├── 00-check-rtc-and-wait-ntp.sh
│   │   │   │   ├── 00-guest-home.sh
│   │   │   │   ├── 00-modprobe.sh
│   │   │   │   ├── 00-reboot-if-required.sh
│   │   │   │   ├── 01-alpine-ash-as-bash.sh
│   │   │   │   ├── 04-persistent-data-volume.sh
│   │   │   │   ├── 05-lima-disks.sh
│   │   │   │   ├── 05-lima-mounts.sh
│   │   │   │   ├── 06-enable-mdns-on-systemd.sh
│   │   │   │   ├── 06-etc-hosts.sh
│   │   │   │   ├── 07-etc-environment.sh
│   │   │   │   ├── 08-shell-prompt.sh
│   │   │   │   ├── 09-host-dns-setup.sh
│   │   │   │   ├── 10-alpine-prep.sh
│   │   │   │   ├── 11-colorterm-environment.sh
│   │   │   │   ├── 20-rootless-base.sh
│   │   │   │   ├── 25-guestagent-base.sh
│   │   │   │   ├── 30-install-packages.sh
│   │   │   │   ├── 35-setup-packages.sh
│   │   │   │   └── 40-install-containerd.sh
│   │   │   ├── boot.essential.FreeBSD/
│   │   │   │   └── 00-freebsd-user-group.sh
│   │   │   ├── boot.sh
│   │   │   ├── etc_environment
│   │   │   ├── lima.env
│   │   │   ├── meta-data
│   │   │   ├── network-config
│   │   │   ├── param.env
│   │   │   ├── user-data
│   │   │   ├── util/
│   │   │   │   └── compare_version.sh
│   │   │   └── util.FreeBSD/
│   │   │       └── print_cidata_fstab.lua
│   │   ├── cidata.go
│   │   ├── cidata_test.go
│   │   ├── cloudinittypes/
│   │   │   ├── metadata.go
│   │   │   └── userdata.go
│   │   ├── fuzz_test.go
│   │   ├── template.go
│   │   └── template_test.go
│   ├── copytool/
│   │   ├── copytool.go
│   │   ├── copytool_test.go
│   │   ├── rsync.go
│   │   └── scp.go
│   ├── debugutil/
│   │   └── debugutil.go
│   ├── downloader/
│   │   ├── downloader.go
│   │   ├── downloader_test.go
│   │   ├── fuzz_test.go
│   │   └── testdata/
│   │       └── downloader.txt
│   ├── driver/
│   │   ├── driver.go
│   │   ├── external/
│   │   │   ├── client/
│   │   │   │   ├── client.go
│   │   │   │   └── methods.go
│   │   │   ├── driver.pb.desc
│   │   │   ├── driver.pb.go
│   │   │   ├── driver.proto
│   │   │   ├── driver_grpc.pb.go
│   │   │   ├── gen.go
│   │   │   └── server/
│   │   │       ├── methods.go
│   │   │       └── server.go
│   │   ├── krunkit/
│   │   │   ├── boot.Linux/
│   │   │   │   ├── 00-add-user-to-video-render-group.sh
│   │   │   │   └── 01-gpu-device-perms.sh
│   │   │   ├── errors_darwin_arm64.go
│   │   │   ├── krunkit_darwin_arm64.go
│   │   │   └── krunkit_driver_darwin_arm64.go
│   │   ├── qemu/
│   │   │   ├── entitlementutil/
│   │   │   │   └── entitlementutil.go
│   │   │   ├── qemu.go
│   │   │   ├── qemu_driver.go
│   │   │   ├── qemu_test.go
│   │   │   └── register.go
│   │   ├── vz/
│   │   │   ├── boot.Linux/
│   │   │   │   └── 05-rosetta-volume.sh
│   │   │   ├── errors_darwin.go
│   │   │   ├── network_darwin.go
│   │   │   ├── network_darwin_test.go
│   │   │   ├── register.go
│   │   │   ├── rosetta_directory_share.go
│   │   │   ├── rosetta_directory_share_arm64.go
│   │   │   ├── vm_darwin.go
│   │   │   ├── vm_darwin_amd64.go
│   │   │   ├── vm_darwin_arm64.go
│   │   │   ├── vsock_forwarder.go
│   │   │   └── vz_driver_darwin.go
│   │   └── wsl2/
│   │       ├── boot.Linux/
│   │       │   └── 02-no-cloud-init-setup.sh
│   │       ├── errors_windows.go
│   │       ├── fs.go
│   │       ├── lima-init.TEMPLATE
│   │       ├── register.go
│   │       ├── vm_windows.go
│   │       └── wsl_driver_windows.go
│   ├── driverutil/
│   │   ├── disk.go
│   │   ├── disk_test.go
│   │   ├── instance.go
│   │   └── vm.go
│   ├── editutil/
│   │   ├── editorcmd/
│   │   │   └── editorcmd.go
│   │   └── editutil.go
│   ├── envutil/
│   │   ├── envutil.go
│   │   └── envutil_test.go
│   ├── executil/
│   │   ├── command.go
│   │   ├── opts_others.go
│   │   └── opts_windows.go
│   ├── fileutils/
│   │   └── download.go
│   ├── freeport/
│   │   ├── freeport.go
│   │   ├── freeport_unix.go
│   │   └── freeport_windows.go
│   ├── fsutil/
│   │   ├── fsutil_linux.go
│   │   └── fsutil_others.go
│   ├── guestagent/
│   │   ├── api/
│   │   │   ├── client/
│   │   │   │   ├── client.go
│   │   │   │   └── credentials.go
│   │   │   ├── gen.go
│   │   │   ├── guestservice.pb.desc
│   │   │   ├── guestservice.pb.go
│   │   │   ├── guestservice.proto
│   │   │   ├── guestservice_grpc.pb.go
│   │   │   ├── ipport.go
│   │   │   └── server/
│   │   │       └── server.go
│   │   ├── fakecloudinit/
│   │   │   └── fakecloudinit_darwin.go
│   │   ├── guestagent.go
│   │   ├── guestagent_linux.go
│   │   ├── kubernetesservice/
│   │   │   ├── kubernetesservice.go
│   │   │   ├── kubernetesservice_test.go
│   │   │   └── types.go
│   │   ├── serialport/
│   │   │   ├── serialconn_linux.go
│   │   │   ├── seriallistener_linux.go
│   │   │   └── serialport_linux.go
│   │   ├── sockets/
│   │   │   ├── sockets.go
│   │   │   ├── sockets_linux.go
│   │   │   └── sockets_linux_test.go
│   │   ├── ticker/
│   │   │   ├── compound.go
│   │   │   ├── ebpf_linux.go
│   │   │   ├── simple.go
│   │   │   └── ticker.go
│   │   └── timesync/
│   │       ├── timesync_linux.go
│   │       └── timesync_others.go
│   ├── guestpatch/
│   │   └── macos/
│   │       └── macos_darwin.go
│   ├── hostagent/
│   │   ├── api/
│   │   │   ├── api.go
│   │   │   ├── client/
│   │   │   │   └── client.go
│   │   │   └── server/
│   │   │       └── server.go
│   │   ├── dns/
│   │   │   ├── dns.go
│   │   │   └── dns_test.go
│   │   ├── events/
│   │   │   ├── events.go
│   │   │   └── watcher.go
│   │   ├── hostagent.go
│   │   ├── hostagent_unix.go
│   │   ├── hostagent_windows.go
│   │   ├── inotify.go
│   │   ├── inotify_darwin.go
│   │   ├── inotify_linux.go
│   │   ├── inotify_others.go
│   │   ├── inotify_test.go
│   │   ├── mount.go
│   │   ├── port.go
│   │   ├── port_darwin.go
│   │   ├── port_others.go
│   │   ├── port_windows.go
│   │   ├── requirements.go
│   │   └── timesync.go
│   ├── httpclientutil/
│   │   ├── httpclientutil.go
│   │   ├── httpclientutil_others.go
│   │   └── httpclientutil_windows.go
│   ├── httputil/
│   │   └── httputil.go
│   ├── identifiers/
│   │   ├── validate.go
│   │   └── validate_test.go
│   ├── imgutil/
│   │   ├── manager.go
│   │   ├── nativeimgutil/
│   │   │   ├── asifutil/
│   │   │   │   ├── asif_darwin.go
│   │   │   │   ├── asif_darwin_test.go
│   │   │   │   └── asif_others.go
│   │   │   ├── fuzz_test.go
│   │   │   ├── nativeimgutil.go
│   │   │   └── nativeimgutil_test.go
│   │   └── proxyimgutil/
│   │       └── proxyimgutil.go
│   ├── instance/
│   │   ├── ansible.go
│   │   ├── clone.go
│   │   ├── create.go
│   │   ├── delete.go
│   │   ├── hostname/
│   │   │   ├── hostname.go
│   │   │   └── hostname_test.go
│   │   ├── restart.go
│   │   ├── start.go
│   │   ├── start_unix.go
│   │   ├── start_windows.go
│   │   └── stop.go
│   ├── ioutilx/
│   │   └── ioutilx.go
│   ├── iso9660util/
│   │   ├── fuzz_test.go
│   │   ├── iso9660util.go
│   │   └── joliet.go
│   ├── jsonschemautil/
│   │   ├── jsonschemautil.go
│   │   ├── jsonschemautil_test.go
│   │   └── testdata/
│   │       ├── invalid.yaml
│   │       ├── schema.json
│   │       └── valid.yaml
│   ├── limactlutil/
│   │   └── limactlutil.go
│   ├── limainfo/
│   │   └── limainfo.go
│   ├── limatmpl/
│   │   ├── abs.go
│   │   ├── abs_test.go
│   │   ├── embed.go
│   │   ├── embed_test.go
│   │   ├── github.go
│   │   ├── locator.go
│   │   ├── locator_test.go
│   │   └── template.go
│   ├── limatype/
│   │   ├── dirnames/
│   │   │   └── dirnames.go
│   │   ├── filenames/
│   │   │   └── filenames.go
│   │   ├── lima_instance.go
│   │   └── lima_yaml.go
│   ├── limayaml/
│   │   ├── containerd.yaml
│   │   ├── defaults.go
│   │   ├── defaults_test.go
│   │   ├── defaults_unix.go
│   │   ├── defaults_unix_test.go
│   │   ├── defaults_windows.go
│   │   ├── limayaml_test.go
│   │   ├── load.go
│   │   ├── load_test.go
│   │   ├── marshal.go
│   │   ├── marshal_test.go
│   │   ├── validate.go
│   │   ├── validate_test.go
│   │   └── validate_unix_test.go
│   ├── localpathutil/
│   │   └── localpathutil.go
│   ├── lockutil/
│   │   ├── lockutil_test.go
│   │   ├── lockutil_unix.go
│   │   └── lockutil_windows.go
│   ├── logrusutil/
│   │   ├── logrusutil.go
│   │   └── logrusutil_test.go
│   ├── mcp/
│   │   ├── msi/
│   │   │   ├── filesystem.go
│   │   │   ├── msi.go
│   │   │   └── shell.go
│   │   └── toolset/
│   │       ├── filesystem.go
│   │       ├── shell.go
│   │       └── toolset.go
│   ├── must/
│   │   └── must.go
│   ├── networks/
│   │   ├── commands.go
│   │   ├── commands_darwin_test.go
│   │   ├── commands_test.go
│   │   ├── config.go
│   │   ├── config_test.go
│   │   ├── const.go
│   │   ├── networks.TEMPLATE.yaml
│   │   ├── networks.go
│   │   ├── reconcile/
│   │   │   └── reconcile.go
│   │   ├── sudoers.go
│   │   ├── usernet/
│   │   │   ├── client.go
│   │   │   ├── config.go
│   │   │   ├── config_test.go
│   │   │   ├── dnshosts/
│   │   │   │   ├── dnshosts.go
│   │   │   │   └── dnshosts_test.go
│   │   │   ├── gvproxy.go
│   │   │   ├── gvproxy_test.go
│   │   │   ├── recoincile.go
│   │   │   └── udpfileconn.go
│   │   └── validate.go
│   ├── osutil/
│   │   ├── dns_darwin.go
│   │   ├── dns_others.go
│   │   ├── exit.go
│   │   ├── file.go
│   │   ├── machineid.go
│   │   ├── machineid_test.go
│   │   ├── mount_darwin.go
│   │   ├── osutil_linux.go
│   │   ├── osutil_others.go
│   │   ├── osutil_unix.go
│   │   ├── osutil_windows.go
│   │   ├── osversion_darwin.go
│   │   ├── osversion_others.go
│   │   ├── rosetta_darwin.go
│   │   ├── rosetta_others.go
│   │   ├── user.go
│   │   └── user_test.go
│   ├── plist/
│   │   ├── plist.go
│   │   └── plist_test.go
│   ├── plugins/
│   │   └── plugins.go
│   ├── portfwd/
│   │   ├── client.go
│   │   ├── control_others.go
│   │   ├── control_windows.go
│   │   ├── forward.go
│   │   ├── listener.go
│   │   ├── listener_darwin.go
│   │   └── listener_others.go
│   ├── portfwdserver/
│   │   └── server.go
│   ├── progressbar/
│   │   └── progressbar.go
│   ├── ptr/
│   │   ├── ptr.go
│   │   └── ptr_test.go
│   ├── qemuimgutil/
│   │   ├── qemuimgutil.go
│   │   └── qemuimgutil_test.go
│   ├── reflectutil/
│   │   └── reflectutil.go
│   ├── registry/
│   │   ├── registry.go
│   │   └── registry_test.go
│   ├── snapshot/
│   │   └── snapshot.go
│   ├── sshutil/
│   │   ├── format.go
│   │   ├── sshutil.go
│   │   └── sshutil_test.go
│   ├── store/
│   │   ├── disk.go
│   │   ├── disk_test.go
│   │   ├── fuzz_test.go
│   │   ├── instance.go
│   │   ├── instance_test.go
│   │   ├── store.go
│   │   └── store_test.go
│   ├── sysprof/
│   │   ├── network_darwin.go
│   │   └── sysprof_darwin.go
│   ├── templatestore/
│   │   └── templatestore.go
│   ├── textutil/
│   │   ├── textutil.go
│   │   └── textutil_test.go
│   ├── uiutil/
│   │   └── uiutil.go
│   ├── usrlocal/
│   │   └── usrlocal.go
│   ├── version/
│   │   ├── version.go
│   │   └── versionutil/
│   │       ├── versionutil.go
│   │       └── versionutil_test.go
│   ├── windows/
│   │   ├── process_windows.go
│   │   ├── registry_windows.go
│   │   └── wsl_util_windows.go
│   └── yqutil/
│       ├── fuzz_test.go
│       ├── yqutil.go
│       └── yqutil_test.go
├── templates/
│   ├── README.md
│   ├── _default/
│   │   └── mounts.yaml
│   ├── _images/
│   │   ├── almalinux-10.yaml
│   │   ├── almalinux-8.yaml
│   │   ├── almalinux-9.yaml
│   │   ├── almalinux-kitten-10.yaml
│   │   ├── alpine-iso.yaml
│   │   ├── alpine.yaml
│   │   ├── archlinux.yaml
│   │   ├── centos-stream-10.yaml
│   │   ├── centos-stream-9.yaml
│   │   ├── debian-11.yaml
│   │   ├── debian-12.yaml
│   │   ├── debian-13.yaml
│   │   ├── fedora-41.yaml
│   │   ├── fedora-42.yaml
│   │   ├── fedora-43.yaml
│   │   ├── freebsd-15.yaml
│   │   ├── macos-15.yaml
│   │   ├── macos-26.yaml
│   │   ├── opensuse-leap-15.yaml
│   │   ├── opensuse-leap-16.yaml
│   │   ├── oraclelinux-10.yaml
│   │   ├── oraclelinux-8.yaml
│   │   ├── oraclelinux-9.yaml
│   │   ├── rocky-10.yaml
│   │   ├── rocky-8.yaml
│   │   ├── rocky-9.yaml
│   │   ├── ubuntu-20.04.yaml
│   │   ├── ubuntu-22.04.yaml
│   │   ├── ubuntu-24.04.yaml
│   │   ├── ubuntu-24.10.yaml
│   │   ├── ubuntu-25.04.yaml
│   │   └── ubuntu-25.10.yaml
│   ├── almalinux-10.yaml
│   ├── almalinux-8.yaml
│   ├── almalinux-9.yaml
│   ├── almalinux-kitten-10.yaml
│   ├── alpine-iso.yaml
│   ├── alpine.yaml
│   ├── apptainer-rootful.yaml
│   ├── apptainer.yaml
│   ├── archlinux.yaml
│   ├── buildkit.yaml
│   ├── centos-stream-10.yaml
│   ├── centos-stream-9.yaml
│   ├── debian-11.yaml
│   ├── debian-12.yaml
│   ├── debian-13.yaml
│   ├── default.yaml
│   ├── docker-rootful.yaml
│   ├── docker.yaml
│   ├── experimental/
│   │   ├── alsa.yaml
│   │   ├── debian-sid.yaml
│   │   ├── fedora-rawhide.yaml
│   │   ├── freebsd-16.yaml
│   │   ├── gentoo.yaml
│   │   ├── opensuse-tumbleweed.yaml
│   │   ├── rke2.yaml
│   │   ├── u7s.yaml
│   │   ├── ubuntu-26.04.yaml
│   │   ├── vnc.yaml
│   │   └── wsl2.yaml
│   ├── faasd.yaml
│   ├── fedora-41.yaml
│   ├── fedora-42.yaml
│   ├── fedora-43.yaml
│   ├── freebsd-15.yaml
│   ├── homebrew-macos.yaml
│   ├── k0s.yaml
│   ├── k3s.yaml
│   ├── k8s.yaml
│   ├── linuxbrew.yaml
│   ├── macos-15.yaml
│   ├── macos-26.yaml
│   ├── opensuse-leap-15.yaml
│   ├── opensuse-leap-16.yaml
│   ├── oraclelinux-10.yaml
│   ├── oraclelinux-8.yaml
│   ├── oraclelinux-9.yaml
│   ├── podman-rootful.yaml
│   ├── podman.yaml
│   ├── rocky-10.yaml
│   ├── rocky-8.yaml
│   ├── rocky-9.yaml
│   ├── ubuntu-20.04.yaml
│   ├── ubuntu-22.04.yaml
│   ├── ubuntu-24.04.yaml
│   ├── ubuntu-24.10.yaml
│   ├── ubuntu-25.04.yaml
│   └── ubuntu-25.10.yaml
├── vz.entitlements
└── website/
    ├── .gitignore
    ├── .nvmrc
    ├── Makefile
    ├── README.md
    ├── assets/
    │   └── scss/
    │       └── _variables_project.scss
    ├── config.yaml
    ├── content/
    │   └── en/
    │       ├── _index.html
    │       ├── docs/
    │       │   ├── _index.md
    │       │   ├── community/
    │       │   │   ├── _index.md
    │       │   │   ├── contributing.md
    │       │   │   ├── governance.md
    │       │   │   ├── roadmap.md
    │       │   │   └── subprojects.md
    │       │   ├── config/
    │       │   │   ├── _index.md
    │       │   │   ├── ai/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── inside/
    │       │   │   │   │   └── _index.md
    │       │   │   │   └── outside/
    │       │   │   │       ├── _index.md
    │       │   │   │       └── gemini.md
    │       │   │   ├── disk.md
    │       │   │   ├── environment-variables.md
    │       │   │   ├── gpu.md
    │       │   │   ├── mount.md
    │       │   │   ├── multi-arch.md
    │       │   │   ├── network/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── user-v2.md
    │       │   │   │   ├── user.md
    │       │   │   │   └── vmnet.md
    │       │   │   ├── plugin/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── cli.md
    │       │   │   │   ├── url.md
    │       │   │   │   └── vm.md
    │       │   │   ├── port.md
    │       │   │   └── vmtype/
    │       │   │       ├── _index.md
    │       │   │       ├── krunkit.md
    │       │   │       ├── qemu.md
    │       │   │       ├── vz.md
    │       │   │       └── wsl2.md
    │       │   ├── dev/
    │       │   │   ├── _index.md
    │       │   │   ├── drivers.md
    │       │   │   ├── git.md
    │       │   │   ├── internals.md
    │       │   │   └── testing/
    │       │   │       ├── _index.md
    │       │   │       └── bats-style.md
    │       │   ├── examples/
    │       │   │   ├── _index.md
    │       │   │   ├── ai.md
    │       │   │   ├── containers/
    │       │   │   │   ├── _index.md
    │       │   │   │   ├── apptainer/
    │       │   │   │   │   └── _index.md
    │       │   │   │   ├── containerd/
    │       │   │   │   │   ├── _index.md
    │       │   │   │   │   └── advanced/
    │       │   │   │   │       ├── _index.md
    │       │   │   │   │       ├── bypass4netns.md
    │       │   │   │   │       ├── gomodjail.md
    │       │   │   │   │       └── stargz.md
    │       │   │   │   ├── docker/
    │       │   │   │   │   └── _index.md
    │       │   │   │   ├── kubernetes/
    │       │   │   │   │   └── _index.md
    │       │   │   │   └── podman/
    │       │   │   │       └── _index.md
    │       │   │   ├── gha.md
    │       │   │   └── vscode.md
    │       │   ├── faq/
    │       │   │   ├── _index.md
    │       │   │   └── colima.md
    │       │   ├── installation/
    │       │   │   ├── _index.md
    │       │   │   └── source.md
    │       │   ├── reference/
    │       │   │   └── _index.md
    │       │   ├── releases/
    │       │   │   ├── _index.md
    │       │   │   ├── breaking.md
    │       │   │   ├── deprecated.md
    │       │   │   └── experimental.md
    │       │   ├── security/
    │       │   │   └── _index.md
    │       │   ├── talks/
    │       │   │   └── _index.md
    │       │   ├── templates/
    │       │   │   ├── _index.md
    │       │   │   └── github.md
    │       │   └── usage/
    │       │       ├── _index.md
    │       │       ├── guests/
    │       │       │   ├── _index.md
    │       │       │   ├── freebsd.md
    │       │       │   ├── linux.md
    │       │       │   └── macos.md
    │       │       └── ssh.md
    │       └── search.md
    ├── data/
    │   ├── adopters.yaml
    │   └── helpfullinks.yaml
    ├── go.mod
    ├── go.sum
    ├── hugo.toml
    ├── layouts/
    │   ├── 404.html
    │   ├── partials/
    │   │   ├── footer.html
    │   │   └── navbar.html
    │   └── shortcodes/
    │       ├── blocks/
    │       │   ├── adopters.html
    │       │   ├── cncf.html
    │       │   ├── cover.html
    │       │   └── helpfullinks.html
    │       ├── fixlinks.html
    │       └── readtemplates.html
    ├── netlify.toml
    ├── package.json
    └── static/
        └── images/
            └── internals/
                └── lima-sequence-diagram.puml
Download .txt
Showing preview only (217K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2343 symbols across 324 files)

FILE: cmd/lima-driver-krunkit/main_darwin_arm64.go
  function main (line 14) | func main() {

FILE: cmd/lima-driver-qemu/main.go
  function main (line 14) | func main() {

FILE: cmd/lima-driver-vz/main_darwin.go
  function main (line 14) | func main() {

FILE: cmd/lima-driver-wsl2/main_windows.go
  function main (line 14) | func main() {

FILE: cmd/lima-guestagent/daemon_linux.go
  constant hostCID (line 25) | hostCID = 2
  type cidFilteredListener (line 27) | type cidFilteredListener struct
    method Accept (line 31) | func (l *cidFilteredListener) Accept() (net.Conn, error) {
  function newDaemonCommand (line 50) | func newDaemonCommand() *cobra.Command {
  function daemonAction (line 63) | func daemonAction(cmd *cobra.Command, _ []string) error {

FILE: cmd/lima-guestagent/fake_cloud_init_darwin.go
  function newFakeCloudInitCommand (line 12) | func newFakeCloudInitCommand() *cobra.Command {
  function fakeCloudInitAction (line 21) | func fakeCloudInitAction(cmd *cobra.Command, _ []string) error {

FILE: cmd/lima-guestagent/install_systemd_linux.go
  function newInstallSystemdCommand (line 23) | func newInstallSystemdCommand() *cobra.Command {
  function installSystemdAction (line 35) | func installSystemdAction(cmd *cobra.Command, _ []string) error {
  function generateSystemdUnit (line 110) | func generateSystemdUnit(vsockPort int, virtioPort string, debug bool) (...

FILE: cmd/lima-guestagent/main.go
  function main (line 18) | func main() {
  function newApp (line 26) | func newApp() *cobra.Command {

FILE: cmd/lima-guestagent/root_darwin.go
  function addRootCommands (line 10) | func addRootCommands(rootCmd *cobra.Command) {

FILE: cmd/lima-guestagent/root_linux.go
  function addRootCommands (line 10) | func addRootCommands(rootCmd *cobra.Command) {

FILE: cmd/lima-guestagent/root_others.go
  function addRootCommands (line 12) | func addRootCommands(_ *cobra.Command) {

FILE: cmd/limactl-mcp/main.go
  function main (line 27) | func main() {
  function newApp (line 33) | func newApp() *cobra.Command {
  function newServer (line 50) | func newServer() *mcp.Server {
  function newMcpInfoCommand (line 72) | func newMcpInfoCommand() *cobra.Command {
  function mcpInfoAction (line 82) | func mcpInfoAction(cmd *cobra.Command, _ []string) error {
  function inspectInfo (line 96) | func inspectInfo(ctx context.Context) (*Info, error) {
  type Info (line 131) | type Info struct
  function newMcpServeCommand (line 135) | func newMcpServeCommand() *cobra.Command {
  function mcpServeAction (line 148) | func mcpServeAction(cmd *cobra.Command, args []string) error {
  function newMcpGenDocCommand (line 182) | func newMcpGenDocCommand() *cobra.Command {
  function mcpGenDocAction (line 193) | func mcpGenDocAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/clone.go
  function newCloneCommand (line 24) | func newCloneCommand() *cobra.Command {
  function newRenameCommand (line 42) | func newRenameCommand() *cobra.Command {
  function cloneOrRenameAction (line 57) | func cloneOrRenameAction(cmd *cobra.Command, args []string) error {
  function cloneBashComplete (line 139) | func cloneBashComplete(cmd *cobra.Command, _ []string, _ string) ([]stri...

FILE: cmd/limactl/completion.go
  function bashCompleteInstanceNames (line 19) | func bashCompleteInstanceNames(_ *cobra.Command) ([]string, cobra.ShellC...
  function bashCompleteTemplateNames (line 27) | func bashCompleteTemplateNames(_ *cobra.Command, toComplete string) ([]s...
  function bashCompleteDiskNames (line 51) | func bashCompleteDiskNames(_ *cobra.Command) ([]string, cobra.ShellCompD...
  function bashCompleteNetworkNames (line 59) | func bashCompleteNetworkNames(_ *cobra.Command) ([]string, cobra.ShellCo...
  function bashFlagCompleteNetworkInterfaceNames (line 68) | func bashFlagCompleteNetworkInterfaceNames(_ *cobra.Command, _ []string,...

FILE: cmd/limactl/copy.go
  constant copyHelp (line 13) | copyHelp = `Copy files between host and guest
  constant copyExample (line 25) | copyExample = `
  function newCopyCommand (line 42) | func newCopyCommand() *cobra.Command {
  function copyAction (line 61) | func copyAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/debug.go
  function newDebugCommand (line 16) | func newDebugCommand() *cobra.Command {
  function newDebugDNSCommand (line 27) | func newDebugDNSCommand() *cobra.Command {
  function debugDNSAction (line 39) | func debugDNSAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/delete.go
  function newDeleteCommand (line 20) | func newDeleteCommand() *cobra.Command {
  function deleteAction (line 34) | func deleteAction(cmd *cobra.Command, args []string) error {
  function deleteBashComplete (line 66) | func deleteBashComplete(cmd *cobra.Command, _ []string, _ string) ([]str...

FILE: cmd/limactl/disk.go
  function newDiskCommand (line 27) | func newDiskCommand() *cobra.Command {
  function newDiskCreateCommand (line 57) | func newDiskCreateCommand() *cobra.Command {
  function diskCreateAction (line 74) | func diskCreateAction(cmd *cobra.Command, args []string) error {
  function newDiskListCommand (line 130) | func newDiskListCommand() *cobra.Command {
  function nameMatches (line 146) | func nameMatches(nameName string, names []string) []string {
  function diskListAction (line 156) | func diskListAction(cmd *cobra.Command, args []string) error {
  function newDiskDeleteCommand (line 216) | func newDiskDeleteCommand() *cobra.Command {
  function diskDeleteAction (line 236) | func diskDeleteAction(cmd *cobra.Command, args []string) error {
  function deleteDisk (line 294) | func deleteDisk(disk *store.Disk) error {
  function forceDeleteCommand (line 301) | func forceDeleteCommand(diskName string) string {
  function newDiskUnlockCommand (line 305) | func newDiskUnlockCommand() *cobra.Command {
  function diskUnlockAction (line 325) | func diskUnlockAction(cmd *cobra.Command, args []string) error {
  function newDiskResizeCommand (line 361) | func newDiskResizeCommand() *cobra.Command {
  function diskResizeAction (line 377) | func diskResizeAction(cmd *cobra.Command, args []string) error {
  function diskBashComplete (line 424) | func diskBashComplete(cmd *cobra.Command, _ []string, _ string) ([]strin...
  function newDiskImportCommand (line 428) | func newDiskImportCommand() *cobra.Command {
  function diskImportAction (line 443) | func diskImportAction(_ *cobra.Command, args []string) error {

FILE: cmd/limactl/edit.go
  function newEditCommand (line 31) | func newEditCommand() *cobra.Command {
  function editAction (line 45) | func editAction(cmd *cobra.Command, args []string) error {
  function askWhetherToStart (line 183) | func askWhetherToStart(cmd *cobra.Command) (bool, error) {
  function editBashComplete (line 192) | func editBashComplete(cmd *cobra.Command, _ []string, _ string) ([]strin...
  function saveRejectedYAML (line 197) | func saveRejectedYAML(y []byte, origErr error) error {

FILE: cmd/limactl/editflags/editflags.go
  function RegisterEdit (line 25) | func RegisterEdit(cmd *cobra.Command, commentPrefix string) {
  function RegisterCreate (line 98) | func RegisterCreate(cmd *cobra.Command, commentPrefix string) {
  function defaultExprFunc (line 120) | func defaultExprFunc(expr string) func(v *flag.Flag) ([]string, error) {
  function ParsePortForward (line 126) | func ParsePortForward(spec string) (hostPort, guestPort string, isStatic...
  function BuildPortForwardExpression (line 155) | func BuildPortForwardExpression(portForwards []string) (string, error) {
  function buildMountListExpression (line 172) | func buildMountListExpression(ss []string) (string, error) {
  function YQExpressions (line 187) | func YQExpressions(flags *flag.FlagSet, newInstance bool) ([]string, err...
  function isPowerOfTwo (line 419) | func isPowerOfTwo(x int) bool {
  function completeCPUs (line 423) | func completeCPUs(hostCPUs int) []int {
  function completeMemoryGiB (line 434) | func completeMemoryGiB(hostMemory uint64) []float32 {

FILE: cmd/limactl/editflags/editflags_test.go
  function TestCompleteCPUs (line 16) | func TestCompleteCPUs(t *testing.T) {
  function TestCompleteMemoryGiB (line 23) | func TestCompleteMemoryGiB(t *testing.T) {
  function TestBuildPortForwardExpression (line 31) | func TestBuildPortForwardExpression(t *testing.T) {
  function TestParsePortForward (line 98) | func TestParsePortForward(t *testing.T) {
  function TestYQExpressions (line 165) | func TestYQExpressions(t *testing.T) {

FILE: cmd/limactl/factory-reset.go
  function newFactoryResetCommand (line 21) | func newFactoryResetCommand() *cobra.Command {
  function factoryResetAction (line 33) | func factoryResetAction(cmd *cobra.Command, args []string) error {
  function factoryResetBashComplete (line 81) | func factoryResetBashComplete(cmd *cobra.Command, _ []string, _ string) ...

FILE: cmd/limactl/gendoc.go
  function newGenDocCommand (line 20) | func newGenDocCommand() *cobra.Command {
  function gendocAction (line 34) | func gendocAction(cmd *cobra.Command, args []string) error {
  function genMan (line 74) | func genMan(cmd *cobra.Command, dir string) error {
  function escapeMarkdown (line 104) | func escapeMarkdown(text string) string {
  function genDocsy (line 120) | func genDocsy(cmd *cobra.Command, dir string) error {
  function replaceAll (line 142) | func replaceAll(dir, text, replacement string) error {

FILE: cmd/limactl/genschema.go
  function newGenSchemaCommand (line 21) | func newGenSchemaCommand() *cobra.Command {
  function toAny (line 33) | func toAny(args []string) []any {
  function getProp (line 41) | func getProp(props *orderedmap.OrderedMap[string, *jsonschema.Schema], k...
  function genschemaAction (line 49) | func genschemaAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/guest-install.go
  function newGuestInstallCommand (line 27) | func newGuestInstallCommand() *cobra.Command {
  function runCmd (line 39) | func runCmd(ctx context.Context, name string, flags []string, args ...st...
  function shell (line 47) | func shell(ctx context.Context, name string, flags []string, args ...str...
  function guestInstallAction (line 57) | func guestInstallAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/hostagent.go
  function newHostagentCommand (line 26) | func newHostagentCommand() *cobra.Command {
  function hostagentAction (line 43) | func hostagentAction(cmd *cobra.Command, args []string) error {
  type syncer (line 140) | type syncer interface
  type syncWriter (line 144) | type syncWriter struct
    method Write (line 148) | func (w *syncWriter) Write(p []byte) (int, error) {
  function initLogrus (line 158) | func initLogrus(stderr io.Writer) {

FILE: cmd/limactl/info.go
  function newInfoCommand (line 18) | func newInfoCommand() *cobra.Command {
  function infoAction (line 31) | func infoAction(cmd *cobra.Command, _ []string) error {

FILE: cmd/limactl/list.go
  function fieldNames (line 27) | func fieldNames() []string {
  function newListCommand (line 47) | func newListCommand() *cobra.Command {
  function instanceMatches (line 88) | func instanceMatches(arg string, instances []string) []string {
  type unmatchedInstancesError (line 99) | type unmatchedInstancesError struct
    method Error (line 102) | func (unmatchedInstancesError) Error() string {
    method ExitCode (line 107) | func (unmatchedInstancesError) ExitCode() int {
  function listAction (line 111) | func listAction(cmd *cobra.Command, args []string) error {
  function listBashComplete (line 361) | func listBashComplete(cmd *cobra.Command, _ []string, _ string) ([]strin...
  function filterInstances (line 366) | func filterInstances(instances []*limatype.Instance, yqExprs []string) (...

FILE: cmd/limactl/main.go
  constant DefaultInstanceName (line 29) | DefaultInstanceName = "default"
  constant basicCommand (line 30) | basicCommand        = "basic"
  constant advancedCommand (line 31) | advancedCommand     = "advanced"
  function main (line 34) | func main() {
  function processGlobalFlags (line 59) | func processGlobalFlags(rootCmd *cobra.Command) error {
  function newApp (line 94) | func newApp() *cobra.Command {
  function addPluginCommands (line 219) | func addPluginCommands(rootCmd *cobra.Command) {
  function WrapArgsError (line 274) | func WrapArgsError(argFn cobra.PositionalArgs) cobra.PositionalArgs {

FILE: cmd/limactl/network.go
  constant networkExample (line 24) | networkExample = `  List all networks:
  constant networkCreateExample (line 38) | networkCreateExample = `  Create a network:
  function newNetworkCommand (line 46) | func newNetworkCommand() *cobra.Command {
  function newNetworkListCommand (line 61) | func newNetworkListCommand() *cobra.Command {
  function networkListAction (line 81) | func networkListAction(cmd *cobra.Command, args []string) error {
  function newNetworkCreateCommand (line 151) | func newNetworkCreateCommand() *cobra.Command {
  function networkCreateAction (line 170) | func networkCreateAction(cmd *cobra.Command, args []string) error {
  function networkApplyYQ (line 235) | func networkApplyYQ(yq string) error {
  function newNetworkDeleteCommand (line 254) | func newNetworkDeleteCommand() *cobra.Command {
  function networkDeleteAction (line 274) | func networkDeleteAction(cmd *cobra.Command, args []string) error {
  function networkBashComplete (line 293) | func networkBashComplete(cmd *cobra.Command, _ []string, _ string) ([]st...

FILE: cmd/limactl/protect.go
  function newProtectCommand (line 16) | func newProtectCommand() *cobra.Command {
  function protectAction (line 30) | func protectAction(cmd *cobra.Command, args []string) error {
  function protectBashComplete (line 52) | func protectBashComplete(cmd *cobra.Command, _ []string, _ string) ([]st...

FILE: cmd/limactl/prune.go
  function newPruneCommand (line 23) | func newPruneCommand() *cobra.Command {
  function pruneAction (line 36) | func pruneAction(cmd *cobra.Command, _ []string) error {
  function knownLocations (line 70) | func knownLocations(ctx context.Context) (map[string]limatype.File, erro...
  function locationsFromLimaYAML (line 115) | func locationsFromLimaYAML(y *limatype.LimaYAML) map[string]limatype.File {

FILE: cmd/limactl/restart.go
  function newRestartCommand (line 13) | func newRestartCommand() *cobra.Command {
  function restartAction (line 28) | func restartAction(cmd *cobra.Command, args []string) error {
  function restartBashComplete (line 56) | func restartBashComplete(cmd *cobra.Command, _ []string, _ string) ([]st...

FILE: cmd/limactl/shell.go
  constant shellHelp (line 37) | shellHelp = `Execute shell in Lima
  function newShellCommand (line 52) | func newShellCommand() *cobra.Command {
  constant rsyncMinimumSrcDirDepth (line 80) | rsyncMinimumSrcDirDepth = 4
  constant colorGray (line 81) | colorGray               = "\033[0;90m"
  constant colorNone (line 82) | colorNone               = "\033[0m"
  function shellAction (line 85) | func shellAction(cmd *cobra.Command, args []string) error {
  function askUserForRsyncBack (line 441) | func askUserForRsyncBack(ctx context.Context, cmd *cobra.Command, inst *...
  function executeSSHForRsync (line 602) | func executeSSHForRsync(ctx context.Context, sshCmd exec.Cmd, sshLocalPo...
  function hostCurrentDirectory (line 616) | func hostCurrentDirectory(ctx context.Context, inst *limatype.Instance) ...
  function rsyncVersion (line 624) | func rsyncVersion(ctx context.Context) (*semver.Version, error) {
  function rsyncDirectory (line 641) | func rsyncDirectory(ctx context.Context, cmd *cobra.Command, rsync copyt...
  function mountDirFromWindowsDir (line 652) | func mountDirFromWindowsDir(ctx context.Context, inst *limatype.Instance...
  function shellBashComplete (line 660) | func shellBashComplete(cmd *cobra.Command, _ []string, _ string) ([]stri...
  function isEnv (line 664) | func isEnv(arg string) bool {
  function quoteEnv (line 668) | func quoteEnv(arg string) string {
  type rsyncStats (line 674) | type rsyncStats struct
    method String (line 681) | func (s *rsyncStats) String() string {
  function getRsyncStats (line 688) | func getRsyncStats(ctx context.Context, source, destination string) (str...
  function parseRsyncStats (line 737) | func parseRsyncStats(output string) *rsyncStats {
  function hasMetadataDelta (line 768) | func hasMetadataDelta(attrs string) bool {

FILE: cmd/limactl/shell_test.go
  function TestParseRsyncStats (line 12) | func TestParseRsyncStats(t *testing.T) {
  function TestRsyncStatsString (line 71) | func TestRsyncStatsString(t *testing.T) {

FILE: cmd/limactl/show-ssh.go
  constant showSSHExample (line 22) | showSSHExample = `
  function newShowSSHCommand (line 51) | func newShowSSHCommand() *cobra.Command {
  function showSSHAction (line 79) | func showSSHAction(cmd *cobra.Command, args []string) error {
  function showSSHBashComplete (line 117) | func showSSHBashComplete(cmd *cobra.Command, _ []string, _ string) ([]st...

FILE: cmd/limactl/snapshot.go
  function newSnapshotCommand (line 18) | func newSnapshotCommand() *cobra.Command {
  function newSnapshotCreateCommand (line 47) | func newSnapshotCreateCommand() *cobra.Command {
  function snapshotCreateAction (line 64) | func snapshotCreateAction(cmd *cobra.Command, args []string) error {
  function newSnapshotDeleteCommand (line 85) | func newSnapshotDeleteCommand() *cobra.Command {
  function snapshotDeleteAction (line 102) | func snapshotDeleteAction(cmd *cobra.Command, args []string) error {
  function newSnapshotApplyCommand (line 123) | func newSnapshotApplyCommand() *cobra.Command {
  function snapshotApplyAction (line 140) | func snapshotApplyAction(cmd *cobra.Command, args []string) error {
  function newSnapshotListCommand (line 161) | func newSnapshotListCommand() *cobra.Command {
  function snapshotListAction (line 181) | func snapshotListAction(cmd *cobra.Command, args []string) error {
  function snapshotBashComplete (line 219) | func snapshotBashComplete(cmd *cobra.Command, _ []string, _ string) ([]s...

FILE: cmd/limactl/start-at-login.go
  function newStartAtLoginCommand (line 10) | func newStartAtLoginCommand() *cobra.Command {
  function startAtLoginComplete (line 28) | func startAtLoginComplete(cmd *cobra.Command, _ []string, _ string) ([]s...

FILE: cmd/limactl/start-at-login_unix.go
  function startAtLoginAction (line 20) | func startAtLoginAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/start-at-login_windows.go
  function startAtLoginAction (line 12) | func startAtLoginAction(_ *cobra.Command, _ []string) error {

FILE: cmd/limactl/start.go
  function registerCreateFlags (line 37) | func registerCreateFlags(cmd *cobra.Command, commentPrefix string) {
  function newCreateCommand (line 45) | func newCreateCommand() *cobra.Command {
  function newStartCommand (line 83) | func newStartCommand() *cobra.Command {
  function printCommandSummary (line 117) | func printCommandSummary(cmd *cobra.Command) {
  function getFlagType (line 126) | func getFlagType(flag *pflag.Flag) string {
  function formatFlag (line 149) | func formatFlag(flag *pflag.Flag) (flagName, shorthand string) {
  function collectFlags (line 164) | func collectFlags(cmd *cobra.Command) (allFlags, createFlags []string) {
  function printFlags (line 186) | func printFlags(allFlags, createFlags []string) {
  function printGlobalFlags (line 204) | func printGlobalFlags(cmd *cobra.Command) {
  function loadOrCreateInstance (line 210) | func loadOrCreateInstance(cmd *cobra.Command, args []string, createOnly ...
  function applyYQExpressionToExistingInstance (line 355) | func applyYQExpressionToExistingInstance(ctx context.Context, inst *lima...
  function modifyInPlace (line 391) | func modifyInPlace(st *limatmpl.Template, yq string) error {
  type exitSuccessError (line 401) | type exitSuccessError struct
    method Error (line 406) | func (e exitSuccessError) Error() string {
    method ExitCode (line 411) | func (exitSuccessError) ExitCode() int {
  function chooseNextCreatorState (line 415) | func chooseNextCreatorState(ctx context.Context, tmpl *limatmpl.Template...
  function createStartActionCommon (line 505) | func createStartActionCommon(cmd *cobra.Command, _ []string) (exit bool,...
  function filterHiddenTemplates (line 530) | func filterHiddenTemplates() ([]templatestore.Template, error) {
  function createAction (line 545) | func createAction(cmd *cobra.Command, args []string) error {
  function startAction (line 565) | func startAction(cmd *cobra.Command, args []string) error {
  function createBashComplete (line 624) | func createBashComplete(cmd *cobra.Command, _ []string, toComplete strin...
  function startBashComplete (line 628) | func startBashComplete(cmd *cobra.Command, _ []string, toComplete string...

FILE: cmd/limactl/stop.go
  function newStopCommand (line 14) | func newStopCommand() *cobra.Command {
  function stopAction (line 28) | func stopAction(cmd *cobra.Command, args []string) error {
  function stopBashComplete (line 56) | func stopBashComplete(cmd *cobra.Command, _ []string, _ string) ([]strin...

FILE: cmd/limactl/sudoers.go
  constant socketVMNetURL (line 14) | socketVMNetURL = "https://lima-vm.io/docs/config/network/vmnet/#socket_v...
  function newSudoersCommand (line 19) | func newSudoersCommand() *cobra.Command {

FILE: cmd/limactl/sudoers_darwin.go
  function sudoersAction (line 18) | func sudoersAction(cmd *cobra.Command, args []string) error {
  function verifySudoAccess (line 52) | func verifySudoAccess(ctx context.Context, nwCfg networks.Config, args [...

FILE: cmd/limactl/sudoers_nodarwin.go
  function sudoersAction (line 14) | func sudoersAction(_ *cobra.Command, _ []string) error {

FILE: cmd/limactl/template.go
  function newTemplateCommand (line 24) | func newTemplateCommand() *cobra.Command {
  function newValidateCommand (line 46) | func newValidateCommand() *cobra.Command {
  function newTemplateCopyCommand (line 62) | func newTemplateCopyCommand() *cobra.Command {
  function fillDefaults (line 78) | func fillDefaults(ctx context.Context, tmpl *limatmpl.Template) error {
  function templateCopyAction (line 97) | func templateCopyAction(cmd *cobra.Command, args []string) error {
  constant templateYQHelp (line 175) | templateYQHelp = `Use the builtin YQ evaluator to extract information fr...
  function newTemplateYQCommand (line 186) | func newTemplateYQCommand() *cobra.Command {
  function templateYQAction (line 197) | func templateYQAction(cmd *cobra.Command, args []string) error {
  function newTemplateValidateCommand (line 222) | func newTemplateValidateCommand() *cobra.Command {
  function templateValidateAction (line 233) | func templateValidateAction(cmd *cobra.Command, args []string) error {
  function newTemplateURLCommand (line 285) | func newTemplateURLCommand() *cobra.Command {
  function templateURLAction (line 295) | func templateURLAction(cmd *cobra.Command, args []string) error {

FILE: cmd/limactl/tunnel.go
  constant tunnelHelp (line 23) | tunnelHelp = `Create a tunnel for Lima
  function newTunnelCommand (line 28) | func newTunnelCommand() *cobra.Command {
  function tunnelAction (line 50) | func tunnelAction(cmd *cobra.Command, args []string) error {
  function tunnelBashComplete (line 144) | func tunnelBashComplete(cmd *cobra.Command, _ []string, _ string) ([]str...

FILE: cmd/limactl/unprotect.go
  function newUnprotectCommand (line 16) | func newUnprotectCommand() *cobra.Command {
  function unprotectAction (line 28) | func unprotectAction(cmd *cobra.Command, args []string) error {
  function unprotectBashComplete (line 50) | func unprotectBashComplete(cmd *cobra.Command, _ []string, _ string) ([]...

FILE: cmd/limactl/usernet.go
  function newUsernetCommand (line 19) | func newUsernetCommand() *cobra.Command {
  function usernetAction (line 37) | func usernetAction(cmd *cobra.Command, _ []string) error {

FILE: cmd/limactl/watch.go
  function newWatchCommand (line 26) | func newWatchCommand() *cobra.Command {
  type watchEvent (line 64) | type watchEvent struct
  type eventWatcher (line 69) | type eventWatcher struct
    method startInstance (line 77) | func (w *eventWatcher) startInstance(instName string) {
    method watchInstance (line 95) | func (w *eventWatcher) watchInstance(instName, haStdoutPath, haStderrP...
  function watchAction (line 109) | func watchAction(cmd *cobra.Command, args []string) error {
  function watchLimaDir (line 191) | func watchLimaDir(ctx context.Context, newInstanceCh chan<- string) {
  function isValidInstanceName (line 226) | func isValidInstanceName(name string) bool {
  function isInstanceDir (line 230) | func isInstanceDir(path string) bool {
  function printStatus (line 240) | func printStatus(out io.Writer, msg string) {
  function printHumanReadableEvent (line 244) | func printHumanReadableEvent(out io.Writer, instName string, ev events.E...
  function watchBashComplete (line 300) | func watchBashComplete(cmd *cobra.Command, _ []string, _ string) ([]stri...

FILE: cmd/yq/yq.go
  function main (line 18) | func main() {
  function MaybeRunYQ (line 36) | func MaybeRunYQ() {

FILE: pkg/apfs/chown.go
  function Chown (line 20) | func Chown(diskPath string, volumeRole uint16, uid, gid uint32, paths .....
  type container (line 52) | type container struct
    method close (line 169) | func (c *container) close() {
    method readBlock (line 173) | func (c *container) readBlock(addr uint64) ([]byte, error) {
    method writeBlock (line 182) | func (c *container) writeBlock(addr uint64, data []byte) error {
    method latestSuperblock (line 192) | func (c *container) latestSuperblock() ([]byte, error) {
    method findVolume (line 236) | func (c *container) findVolume(role uint16) (*volumeInfo, error) {
    method omapLookup (line 292) | func (c *container) omapLookup(omapTreeAddr, oid, maxXID uint64) (uint...
    method readTocEntry (line 382) | func (c *container) readTocEntry(blk []byte, tocStart, index uint32, f...
    method compareDrecKey (line 460) | func (c *container) compareDrecKey(blk []byte, keyStart uint32, target...
    method resolvePath (line 489) | func (c *container) resolvePath(fsRootPhys, omapTreeAddr, maxXID uint6...
    method lookupDirEntry (line 508) | func (c *container) lookupDirEntry(fsRootPhys, omapTreeAddr, maxXID, p...
    method readDrecName (line 598) | func (c *container) readDrecName(blk []byte, nameFieldOff uint32) stri...
    method chownInode (line 631) | func (c *container) chownInode(fsRootPhys, omapTreeAddr, maxXID, inode...
  type volumeInfo (line 59) | type volumeInfo struct
  function openContainer (line 65) | func openContainer(path string) (*container, error) {
  constant gptHeaderSignature (line 109) | gptHeaderSignature = "EFI PART"
  constant gptLBASectorSize (line 110) | gptLBASectorSize   = 512
  function findAPFSPartitionGPT (line 126) | func findAPFSPartitionGPT(f *os.File) (int64, error) {
  function verifyBTreeNodeType (line 394) | func verifyBTreeNodeType(blk []byte) error {
  function compareOmapKey (line 402) | func compareOmapKey(oid1, xid1, oid2, xid2 uint64) int {
  function compareFSKeyHeader (line 420) | func compareFSKeyHeader(a, b uint64) int {
  function drecNameHash (line 449) | func drecNameHash(name string) uint32 {

FILE: pkg/apfs/chown_darwin_test.go
  function TestChownIntegration (line 21) | func TestChownIntegration(t *testing.T) {

FILE: pkg/apfs/fletcher64.go
  constant fletcher64Mod (line 11) | fletcher64Mod = 0xFFFFFFFF
  function fletcher64 (line 14) | func fletcher64(block []byte) uint64 {
  function verifyChecksum (line 26) | func verifyChecksum(block []byte) error {
  function updateChecksum (line 36) | func updateChecksum(block []byte) {

FILE: pkg/apfs/fletcher64_test.go
  function TestFletcher64 (line 13) | func TestFletcher64(t *testing.T) {
  function TestFletcher64KnownVector (line 28) | func TestFletcher64KnownVector(t *testing.T) {

FILE: pkg/apfs/types.go
  constant nxMagic (line 12) | nxMagic   = 0x4253584E
  constant apfsMagic (line 13) | apfsMagic = 0x42535041
  constant objectTypeNXSuperblock (line 18) | objectTypeNXSuperblock    = 0x01
  constant objectTypeCheckpointMap (line 19) | objectTypeCheckpointMap   = 0x0C
  constant objectTypeOmap (line 20) | objectTypeOmap            = 0x0B
  constant objectTypeBTreeNode (line 21) | objectTypeBTreeNode       = 0x02
  constant objectTypeFS (line 22) | objectTypeFS              = 0x0D
  constant objectTypeFSTree (line 23) | objectTypeFSTree          = 0x0E
  constant objectTypeBlockRefTree (line 24) | objectTypeBlockRefTree    = 0x0F
  constant objectTypeOmapSnapshot (line 25) | objectTypeOmapSnapshot    = 0x10
  constant objectTypeNXReaperFS (line 26) | objectTypeNXReaperFS      = 0x12
  constant objectTypeNXReaperListKey (line 27) | objectTypeNXReaperListKey = 0x13
  constant objPhysical (line 32) | objPhysical  = 0x00000000
  constant objEphemeral (line 33) | objEphemeral = 0x80000000
  constant objVirtual (line 34) | objVirtual   = 0x00000000
  constant objTypeMask (line 35) | objTypeMask  = 0x0000FFFF
  constant objFlagsMask (line 36) | objFlagsMask = 0xFFFF0000
  constant btnodeRoot (line 41) | btnodeRoot        = 0x0001
  constant btnodeLeaf (line 42) | btnodeLeaf        = 0x0002
  constant btnodeFixedKVSize (line 43) | btnodeFixedKVSize = 0x0004
  constant apfsTypeInode (line 48) | apfsTypeInode  = 3
  constant apfsTypeDirRec (line 49) | apfsTypeDirRec = 9
  constant objIDMask (line 54) | objIDMask    = 0x0FFFFFFFFFFFFFFF
  constant objTypeShift (line 55) | objTypeShift = 60
  constant rootDirInodeNum (line 60) | rootDirInodeNum = 2
  constant noownersPlaceholderID (line 65) | noownersPlaceholderID = 99
  constant VolRoleData (line 68) | VolRoleData = 0x0040
  constant nxMagicOff (line 72) | nxMagicOff         = 32
  constant nxBlockSizeOff (line 73) | nxBlockSizeOff     = 36
  constant nxXPDescBlocksOff (line 74) | nxXPDescBlocksOff  = 104
  constant nxXPDescBaseOff (line 75) | nxXPDescBaseOff    = 112
  constant nxXPDescIndexOff (line 76) | nxXPDescIndexOff   = 136
  constant nxXPDescLenOff (line 77) | nxXPDescLenOff     = 140
  constant nxOmapOIDOff (line 78) | nxOmapOIDOff       = 160
  constant nxFSOIDOff (line 79) | nxFSOIDOff         = 184
  constant nxMaxFileSystems (line 80) | nxMaxFileSystems   = 100
  constant nxXPDescBlocksMask (line 81) | nxXPDescBlocksMask = 0x7FFFFFFF
  constant objChecksumOff (line 86) | objChecksumOff = 0
  constant objOIDOff (line 87) | objOIDOff      = 8
  constant objXIDOff (line 88) | objXIDOff      = 16
  constant objTypeOff (line 89) | objTypeOff     = 24
  constant objSubtypeOff (line 90) | objSubtypeOff  = 28
  constant objHeaderSize (line 91) | objHeaderSize  = 32
  constant apfsMagicOff (line 96) | apfsMagicOff       = 32
  constant apfsOmapOIDOff (line 97) | apfsOmapOIDOff     = 128
  constant apfsRootTreeOIDOff (line 98) | apfsRootTreeOIDOff = 136
  constant apfsVolNameOff (line 99) | apfsVolNameOff     = 704
  constant apfsRoleOff (line 100) | apfsRoleOff        = 964
  constant omapTreeOIDOff (line 105) | omapTreeOIDOff = 48
  constant btnFlagsOff (line 110) | btnFlagsOff      = 32
  constant btnLevelOff (line 111) | btnLevelOff      = 34
  constant btnNKeysOff (line 112) | btnNKeysOff      = 36
  constant btnTableSpaceOff (line 113) | btnTableSpaceOff = 40
  constant btnDataOff (line 114) | btnDataOff       = 56
  constant btreeInfoSize (line 118) | btreeInfoSize = 40
  constant inodeParentIDOff (line 122) | inodeParentIDOff  = 0
  constant inodePrivateIDOff (line 123) | inodePrivateIDOff = 8
  constant inodeOwnerOff (line 124) | inodeOwnerOff     = 72
  constant inodeGroupOff (line 125) | inodeGroupOff     = 76

FILE: pkg/autostart/autostart.go
  function IsRegistered (line 15) | func IsRegistered(ctx context.Context, inst *limatype.Instance) (bool, e...
  function RegisterToStartAtLogin (line 20) | func RegisterToStartAtLogin(ctx context.Context, inst *limatype.Instance...
  function UnregisterFromStartAtLogin (line 25) | func UnregisterFromStartAtLogin(ctx context.Context, inst *limatype.Inst...
  function AutoStartedIdentifier (line 30) | func AutoStartedIdentifier() string {
  function RequestStart (line 35) | func RequestStart(ctx context.Context, inst *limatype.Instance) error {
  function RequestStop (line 40) | func RequestStop(ctx context.Context, inst *limatype.Instance) (bool, er...
  type autoStartManager (line 44) | type autoStartManager interface

FILE: pkg/autostart/autostart_test.go
  function TestRenderTemplate (line 35) | func TestRenderTemplate(t *testing.T) {

FILE: pkg/autostart/launchd/launchd.go
  function GetPlistPath (line 23) | func GetPlistPath(instName string) string {
  function ServiceNameFrom (line 28) | func ServiceNameFrom(instName string) string {
  function EnableDisableService (line 33) | func EnableDisableService(ctx context.Context, enable bool, instName str...
  function launchctl (line 41) | func launchctl(ctx context.Context, args ...string) error {
  function launchctlWithoutOutput (line 49) | func launchctlWithoutOutput(ctx context.Context, args ...string) error {
  function AutoStartedServiceName (line 56) | func AutoStartedServiceName() string {
  function serviceTarget (line 71) | func serviceTarget(instName string) string {
  function RequestStart (line 75) | func RequestStart(ctx context.Context, inst *limatype.Instance) error {
  function RequestStop (line 87) | func RequestStop(ctx context.Context, inst *limatype.Instance) (bool, er...

FILE: pkg/autostart/launchd/launchd_test.go
  function TestGetPlistPath (line 15) | func TestGetPlistPath(t *testing.T) {

FILE: pkg/autostart/managers.go
  type notSupportedManager (line 19) | type notSupportedManager struct
    method IsRegistered (line 25) | func (*notSupportedManager) IsRegistered(_ context.Context, _ *limatyp...
    method RegisterToStartAtLogin (line 29) | func (*notSupportedManager) RegisterToStartAtLogin(_ context.Context, ...
    method UnregisterFromStartAtLogin (line 33) | func (*notSupportedManager) UnregisterFromStartAtLogin(_ context.Conte...
    method AutoStartedIdentifier (line 37) | func (*notSupportedManager) AutoStartedIdentifier() string {
    method RequestStart (line 41) | func (*notSupportedManager) RequestStart(_ context.Context, _ *limatyp...
    method RequestStop (line 45) | func (*notSupportedManager) RequestStop(_ context.Context, _ *limatype...
  type TemplateFileBasedManager (line 50) | type TemplateFileBasedManager struct
    method IsRegistered (line 61) | func (t *TemplateFileBasedManager) IsRegistered(_ context.Context, ins...
    method RegisterToStartAtLogin (line 75) | func (t *TemplateFileBasedManager) RegisterToStartAtLogin(ctx context....
    method UnregisterFromStartAtLogin (line 96) | func (t *TemplateFileBasedManager) UnregisterFromStartAtLogin(ctx cont...
    method renderTemplate (line 113) | func (t *TemplateFileBasedManager) renderTemplate(instName, workDir st...
    method AutoStartedIdentifier (line 130) | func (t *TemplateFileBasedManager) AutoStartedIdentifier() string {
    method RequestStart (line 137) | func (t *TemplateFileBasedManager) RequestStart(ctx context.Context, i...
    method RequestStop (line 144) | func (t *TemplateFileBasedManager) RequestStop(ctx context.Context, in...

FILE: pkg/autostart/managers_darwin.go
  function Manager (line 9) | func Manager() autoStartManager {

FILE: pkg/autostart/managers_linux.go
  function Manager (line 9) | func Manager() autoStartManager {

FILE: pkg/autostart/managers_others.go
  function Manager (line 9) | func Manager() autoStartManager {

FILE: pkg/autostart/systemd/systemd.go
  function GetUnitPath (line 23) | func GetUnitPath(instName string) string {
  function UnitNameFrom (line 34) | func UnitNameFrom(instName string) string {
  function EnableDisableUnit (line 39) | func EnableDisableUnit(ctx context.Context, enable bool, instName string...
  function systemctl (line 47) | func systemctl(ctx context.Context, args ...string) error {
  function AutoStartedUnitName (line 56) | func AutoStartedUnitName() string {
  function RequestStart (line 60) | func RequestStart(ctx context.Context, inst *limatype.Instance) error {
  function RequestStop (line 67) | func RequestStop(ctx context.Context, inst *limatype.Instance) (bool, er...

FILE: pkg/autostart/systemd/systemd_linux.go
  function CurrentUnitName (line 11) | func CurrentUnitName() string {
  function IsRunningSystemd (line 19) | func IsRunningSystemd() bool {

FILE: pkg/autostart/systemd/systemd_others.go
  function CurrentUnitName (line 8) | func CurrentUnitName() string {
  function IsRunningSystemd (line 12) | func IsRunningSystemd() bool {

FILE: pkg/autostart/systemd/systemd_test.go
  function TestGetUnitPath (line 15) | func TestGetUnitPath(t *testing.T) {

FILE: pkg/bicopy/bicopy.go
  function Bicopy (line 34) | func Bicopy(x, y io.ReadWriter, quit <-chan struct{}) {

FILE: pkg/cacheutil/cacheutil.go
  function NerdctlArchive (line 17) | func NerdctlArchive(y *limatype.LimaYAML) string {
  function EnsureNerdctlArchiveCache (line 31) | func EnsureNerdctlArchiveCache(ctx context.Context, y *limatype.LimaYAML...

FILE: pkg/cidata/cidata.go
  function setupEnv (line 51) | func setupEnv(instConfigEnv map[string]string, propagateProxyEnv bool, s...
  function templateArgs (line 122) | func templateArgs(ctx context.Context, bootScripts bool, instDir, name s...
  function GenerateCloudConfig (line 361) | func GenerateCloudConfig(ctx context.Context, instDir, name string, inst...
  function GenerateISO9660 (line 386) | func GenerateISO9660(ctx context.Context, drv driver.Driver, instDir, na...
  function removeControlChars (line 508) | func removeControlChars(s string) string {
  function getCert (line 518) | func getCert(content string) Cert {
  function getBootCmds (line 530) | func getBootCmds(p []limatype.Provision) []BootCmds {
  function diskDeviceNameFromOrder (line 540) | func diskDeviceNameFromOrder(order int) string {
  function writeCIDataDir (line 544) | func writeCIDataDir(rootPath string, layout []iso9660util.Entry) error {

FILE: pkg/cidata/cidata_test.go
  function fakeLookupIP (line 17) | func fakeLookupIP(_ string) []net.IP {
  function TestSetupEnv (line 21) | func TestSetupEnv(t *testing.T) {
  function TestSetupInvalidEnv (line 56) | func TestSetupInvalidEnv(t *testing.T) {

FILE: pkg/cidata/cloudinittypes/metadata.go
  type MetaData (line 6) | type MetaData struct

FILE: pkg/cidata/cloudinittypes/userdata.go
  type UserData (line 6) | type UserData struct
  type Growpart (line 29) | type Growpart struct
  type User (line 34) | type User struct
  type WriteFile (line 45) | type WriteFile struct
  type ResolvConf (line 52) | type ResolvConf struct
  type CACerts (line 56) | type CACerts struct

FILE: pkg/cidata/fuzz_test.go
  function FuzzSetupEnv (line 12) | func FuzzSetupEnv(f *testing.F) {

FILE: pkg/cidata/template.go
  constant templateFSRoot (line 23) | templateFSRoot = "cidata.TEMPLATE.d"
  type CACerts (line 25) | type CACerts struct
  type Cert (line 30) | type Cert struct
  type Containerd (line 34) | type Containerd struct
  type Network (line 39) | type Network struct
  type Mount (line 44) | type Mount struct
  type BootCmds (line 50) | type BootCmds struct
  type DataFile (line 54) | type DataFile struct
  type YQProvision (line 62) | type YQProvision struct
  type Disk (line 70) | type Disk struct
  type TemplateArgs (line 77) | type TemplateArgs struct
  function ValidateTemplateArgs (line 122) | func ValidateTemplateArgs(args *TemplateArgs) error {
  function ExecuteTemplateCloudConfig (line 152) | func ExecuteTemplateCloudConfig(args *TemplateArgs) ([]byte, error) {
  function ExecuteTemplateCIDataISO (line 166) | func ExecuteTemplateCIDataISO(args *TemplateArgs) ([]iso9660util.Entry, ...

FILE: pkg/cidata/template_test.go
  function TestConfig (line 16) | func TestConfig(t *testing.T) {
  function TestConfigCACerts (line 36) | func TestConfigCACerts(t *testing.T) {
  function TestConfigMounts (line 63) | func TestConfigMounts(t *testing.T) {
  function TestConfigMountsNone (line 83) | func TestConfigMountsNone(t *testing.T) {
  function TestTemplate (line 103) | func TestTemplate(t *testing.T) {
  function TestTemplate9p (line 139) | func TestTemplate9p(t *testing.T) {

FILE: pkg/copytool/copytool.go
  type Backend (line 23) | type Backend
  constant BackendAuto (line 26) | BackendAuto  Backend = "auto"
  constant BackendRsync (line 27) | BackendRsync Backend = "rsync"
  constant BackendSCP (line 28) | BackendSCP   Backend = "scp"
  type Path (line 31) | type Path struct
  type Options (line 39) | type Options struct
  type CopyTool (line 46) | type CopyTool interface
  function New (line 56) | func New(ctx context.Context, backend string, paths []string, opts *Opti...
  function parseCopyPaths (line 95) | func parseCopyPaths(ctx context.Context, paths []string) ([]*Path, error) {

FILE: pkg/copytool/copytool_test.go
  function TestCommandDoesNotMutateOptions (line 14) | func TestCommandDoesNotMutateOptions(t *testing.T) {

FILE: pkg/copytool/rsync.go
  type rsyncTool (line 19) | type rsyncTool struct
    method Name (line 32) | func (t *rsyncTool) Name() string {
    method IsAvailableOnGuest (line 36) | func (t *rsyncTool) IsAvailableOnGuest(ctx context.Context, paths []st...
    method Command (line 85) | func (t *rsyncTool) Command(ctx context.Context, paths []string, opts ...
  function newRsyncTool (line 24) | func newRsyncTool(opts *Options) (*rsyncTool, error) {
  function checkRsyncOnGuest (line 60) | func checkRsyncOnGuest(ctx context.Context, inst *limatype.Instance) bool {

FILE: pkg/copytool/scp.go
  type scpTool (line 18) | type scpTool struct
    method Name (line 31) | func (t *scpTool) Name() string {
    method IsAvailableOnGuest (line 35) | func (t *scpTool) IsAvailableOnGuest(_ context.Context, _ []string) bo...
    method Command (line 40) | func (t *scpTool) Command(ctx context.Context, paths []string, opts *O...
  function newSCPTool (line 23) | func newSCPTool(opts *Options) (*scpTool, error) {

FILE: pkg/downloader/downloader.go
  function hideBar (line 37) | func hideBar(bar *progressbar.ProgressBar) {
  constant StatusUnknown (line 44) | StatusUnknown    Status = ""
  constant StatusDownloaded (line 45) | StatusDownloaded Status = "downloaded"
  constant StatusSkipped (line 46) | StatusSkipped    Status = "skipped"
  constant StatusUsedCache (line 47) | StatusUsedCache  Status = "used-cache"
  type Result (line 50) | type Result struct
  type options (line 58) | type options struct
    method apply (line 65) | func (o *options) apply(opts []Opt) error {
  type Opt (line 74) | type Opt
  function WithCache (line 77) | func WithCache() Opt {
  function WithCacheDir (line 90) | func WithCacheDir(cacheDir string) Opt {
  function WithDescription (line 98) | func WithDescription(description string) Opt {
  function WithDecompress (line 106) | func WithDecompress(decompress bool) Opt {
  function WithExpectedDigest (line 122) | func WithExpectedDigest(expectedDigest digest.Digest) Opt {
  function readFile (line 135) | func readFile(path string) string {
  function readTime (line 149) | func readTime(path string) time.Time {
  function Download (line 176) | func Download(ctx context.Context, local, remote string, opts ...Opt) (*...
  function getCached (line 257) | func getCached(ctx context.Context, localPath, remote string, o options)...
  function fetch (line 303) | func fetch(ctx context.Context, localPath, remote string, o options) (*R...
  function Cached (line 345) | func Cached(remote string, opts ...Opt) (*Result, error) {
  function cacheDirectoryPath (line 407) | func cacheDirectoryPath(cacheDir, remote string) string {
  function cacheDigestPath (line 413) | func cacheDigestPath(shad string, expectedDigest digest.Digest) (string,...
  function IsLocal (line 425) | func IsLocal(s string) bool {
  function canonicalLocalPath (line 433) | func canonicalLocalPath(s string) (string, error) {
  function copyLocal (line 449) | func copyLocal(ctx context.Context, dst, src, ext string, decompress boo...
  function decompressor (line 484) | func decompressor(ext string) string {
  function decompressorByMagic (line 499) | func decompressorByMagic(file string) string {
  function decompressLocal (line 527) | func decompressLocal(ctx context.Context, decompressCmd, dst, src, ext, ...
  function validateCachedDigest (line 575) | func validateCachedDigest(shadDigest string, expectedDigest digest.Diges...
  function validateLocalFileDigest (line 590) | func validateLocalFileDigest(localPath string, expectedDigest digest.Dig...
  function matchLastModified (line 626) | func matchLastModified(ctx context.Context, lastModifiedPath, url string...
  function downloadHTTP (line 653) | func downloadHTTP(ctx context.Context, localPath, lastModified, contentT...
  function perProcessTempfile (line 743) | func perProcessTempfile(path string) string {
  function CacheEntries (line 750) | func CacheEntries(opts ...Opt) (map[string]string, error) {
  function CacheKey (line 778) | func CacheKey(remote string) string {
  function RemoveAllCacheDir (line 783) | func RemoveAllCacheDir(opts ...Opt) error {

FILE: pkg/downloader/downloader_test.go
  function TestMain (line 21) | func TestMain(m *testing.M) {
  type downloadResult (line 26) | type downloadResult struct
  constant parallelDownloads (line 33) | parallelDownloads = 20
  function TestDownloadRemote (line 35) | func TestDownloadRemote(t *testing.T) {
  function countResults (line 189) | func countResults(t *testing.T, results chan downloadResult) (downloaded...
  function TestRedownloadRemote (line 209) | func TestRedownloadRemote(t *testing.T) {
  function TestDownloadLocal (line 274) | func TestDownloadLocal(t *testing.T) {
  function TestDownloadCompressed (line 322) | func TestDownloadCompressed(t *testing.T) {

FILE: pkg/downloader/fuzz_test.go
  function FuzzDownload (line 17) | func FuzzDownload(f *testing.F) {

FILE: pkg/driver/driver.go
  type VsockEventEmitter (line 15) | type VsockEventEmitter interface
  type Lifecycle (line 20) | type Lifecycle interface
  type GUI (line 54) | type GUI interface
  type SnapshotManager (line 64) | type SnapshotManager interface
  type GuestAgent (line 72) | type GuestAgent interface
  type Driver (line 81) | type Driver interface
  type ConfiguredDriver (line 106) | type ConfiguredDriver struct
  type Info (line 110) | type Info struct
  type DriverFeatures (line 118) | type DriverFeatures struct

FILE: pkg/driver/external/client/client.go
  type DriverClient (line 17) | type DriverClient struct
  function NewDriverClient (line 24) | func NewDriverClient(socketPath string, logger *logrus.Logger) (*DriverC...

FILE: pkg/driver/external/client/methods.go
  method Validate (line 20) | func (d *DriverClient) Validate(ctx context.Context) error {
  method Create (line 35) | func (d *DriverClient) Create(ctx context.Context) error {
  method CreateDisk (line 48) | func (d *DriverClient) CreateDisk(ctx context.Context) error {
  method Start (line 64) | func (d *DriverClient) Start(ctx context.Context) (chan error, error) {
  method Stop (line 113) | func (d *DriverClient) Stop(ctx context.Context) error {
  method Delete (line 126) | func (d *DriverClient) Delete(ctx context.Context) error {
  method FillConfig (line 139) | func (d *DriverClient) FillConfig(_ context.Context, _ *limatype.LimaYAM...
  method RunGUI (line 143) | func (d *DriverClient) RunGUI() error {
  method ChangeDisplayPassword (line 159) | func (d *DriverClient) ChangeDisplayPassword(ctx context.Context, passwo...
  method DisplayConnection (line 174) | func (d *DriverClient) DisplayConnection(ctx context.Context) (string, e...
  method CreateSnapshot (line 187) | func (d *DriverClient) CreateSnapshot(ctx context.Context, tag string) e...
  method ApplySnapshot (line 202) | func (d *DriverClient) ApplySnapshot(ctx context.Context, tag string) er...
  method DeleteSnapshot (line 217) | func (d *DriverClient) DeleteSnapshot(ctx context.Context, tag string) e...
  method ListSnapshots (line 232) | func (d *DriverClient) ListSnapshots(ctx context.Context) (string, error) {
  method ForwardGuestAgent (line 245) | func (d *DriverClient) ForwardGuestAgent() bool {
  method GuestAgentConn (line 260) | func (d *DriverClient) GuestAgentConn(ctx context.Context) (net.Conn, st...
  method Info (line 271) | func (d *DriverClient) Info() driver.Info {
  method Configure (line 293) | func (d *DriverClient) Configure(inst *limatype.Instance) *driver.Config...
  method InspectStatus (line 319) | func (d *DriverClient) InspectStatus(_ context.Context, _ *limatype.Inst...
  method SSHAddress (line 323) | func (d *DriverClient) SSHAddress(ctx context.Context) (string, error) {
  method BootScripts (line 336) | func (d *DriverClient) BootScripts() (map[string][]byte, error) {
  method AdditionalSetupForSSH (line 348) | func (d *DriverClient) AdditionalSetupForSSH(ctx context.Context) error {

FILE: pkg/driver/external/driver.pb.go
  constant _ (line 20) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 22) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  type BootScriptsResponse (line 25) | type BootScriptsResponse struct
    method Reset (line 32) | func (x *BootScriptsResponse) Reset() {
    method String (line 39) | func (x *BootScriptsResponse) String() string {
    method ProtoMessage (line 43) | func (*BootScriptsResponse) ProtoMessage() {}
    method ProtoReflect (line 45) | func (x *BootScriptsResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 58) | func (*BootScriptsResponse) Descriptor() ([]byte, []int) {
    method GetScripts (line 62) | func (x *BootScriptsResponse) GetScripts() map[string][]byte {
  type SSHAddressResponse (line 69) | type SSHAddressResponse struct
    method Reset (line 76) | func (x *SSHAddressResponse) Reset() {
    method String (line 83) | func (x *SSHAddressResponse) String() string {
    method ProtoMessage (line 87) | func (*SSHAddressResponse) ProtoMessage() {}
    method ProtoReflect (line 89) | func (x *SSHAddressResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 102) | func (*SSHAddressResponse) Descriptor() ([]byte, []int) {
    method GetAddress (line 106) | func (x *SSHAddressResponse) GetAddress() string {
  type InfoResponse (line 113) | type InfoResponse struct
    method Reset (line 120) | func (x *InfoResponse) Reset() {
    method String (line 127) | func (x *InfoResponse) String() string {
    method ProtoMessage (line 131) | func (*InfoResponse) ProtoMessage() {}
    method ProtoReflect (line 133) | func (x *InfoResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 146) | func (*InfoResponse) Descriptor() ([]byte, []int) {
    method GetInfoJson (line 150) | func (x *InfoResponse) GetInfoJson() []byte {
  type StartResponse (line 162) | type StartResponse struct
    method Reset (line 170) | func (x *StartResponse) Reset() {
    method String (line 177) | func (x *StartResponse) String() string {
    method ProtoMessage (line 181) | func (*StartResponse) ProtoMessage() {}
    method ProtoReflect (line 183) | func (x *StartResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 196) | func (*StartResponse) Descriptor() ([]byte, []int) {
    method GetSuccess (line 200) | func (x *StartResponse) GetSuccess() bool {
    method GetError (line 207) | func (x *StartResponse) GetError() string {
  type SetConfigRequest (line 214) | type SetConfigRequest struct
    method Reset (line 221) | func (x *SetConfigRequest) Reset() {
    method String (line 228) | func (x *SetConfigRequest) String() string {
    method ProtoMessage (line 232) | func (*SetConfigRequest) ProtoMessage() {}
    method ProtoReflect (line 234) | func (x *SetConfigRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 247) | func (*SetConfigRequest) Descriptor() ([]byte, []int) {
    method GetInstanceConfigJson (line 251) | func (x *SetConfigRequest) GetInstanceConfigJson() []byte {
  type ChangeDisplayPasswordRequest (line 258) | type ChangeDisplayPasswordRequest struct
    method Reset (line 265) | func (x *ChangeDisplayPasswordRequest) Reset() {
    method String (line 272) | func (x *ChangeDisplayPasswordRequest) String() string {
    method ProtoMessage (line 276) | func (*ChangeDisplayPasswordRequest) ProtoMessage() {}
    method ProtoReflect (line 278) | func (x *ChangeDisplayPasswordRequest) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 291) | func (*ChangeDisplayPasswordRequest) Descriptor() ([]byte, []int) {
    method GetPassword (line 295) | func (x *ChangeDisplayPasswordRequest) GetPassword() string {
  type GetDisplayConnectionResponse (line 302) | type GetDisplayConnectionResponse struct
    method Reset (line 309) | func (x *GetDisplayConnectionResponse) Reset() {
    method String (line 316) | func (x *GetDisplayConnectionResponse) String() string {
    method ProtoMessage (line 320) | func (*GetDisplayConnectionResponse) ProtoMessage() {}
    method ProtoReflect (line 322) | func (x *GetDisplayConnectionResponse) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 335) | func (*GetDisplayConnectionResponse) Descriptor() ([]byte, []int) {
    method GetConnection (line 339) | func (x *GetDisplayConnectionResponse) GetConnection() string {
  type CreateSnapshotRequest (line 346) | type CreateSnapshotRequest struct
    method Reset (line 353) | func (x *CreateSnapshotRequest) Reset() {
    method String (line 360) | func (x *CreateSnapshotRequest) String() string {
    method ProtoMessage (line 364) | func (*CreateSnapshotRequest) ProtoMessage() {}
    method ProtoReflect (line 366) | func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 379) | func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) {
    method GetTag (line 383) | func (x *CreateSnapshotRequest) GetTag() string {
  type ApplySnapshotRequest (line 390) | type ApplySnapshotRequest struct
    method Reset (line 397) | func (x *ApplySnapshotRequest) Reset() {
    method String (line 404) | func (x *ApplySnapshotRequest) String() string {
    method ProtoMessage (line 408) | func (*ApplySnapshotRequest) ProtoMessage() {}
    method ProtoReflect (line 410) | func (x *ApplySnapshotRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 423) | func (*ApplySnapshotRequest) Descriptor() ([]byte, []int) {
    method GetTag (line 427) | func (x *ApplySnapshotRequest) GetTag() string {
  type DeleteSnapshotRequest (line 434) | type DeleteSnapshotRequest struct
    method Reset (line 441) | func (x *DeleteSnapshotRequest) Reset() {
    method String (line 448) | func (x *DeleteSnapshotRequest) String() string {
    method ProtoMessage (line 452) | func (*DeleteSnapshotRequest) ProtoMessage() {}
    method ProtoReflect (line 454) | func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 467) | func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) {
    method GetTag (line 471) | func (x *DeleteSnapshotRequest) GetTag() string {
  type ListSnapshotsResponse (line 478) | type ListSnapshotsResponse struct
    method Reset (line 485) | func (x *ListSnapshotsResponse) Reset() {
    method String (line 492) | func (x *ListSnapshotsResponse) String() string {
    method ProtoMessage (line 496) | func (*ListSnapshotsResponse) ProtoMessage() {}
    method ProtoReflect (line 498) | func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 511) | func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) {
    method GetSnapshots (line 515) | func (x *ListSnapshotsResponse) GetSnapshots() string {
  type ForwardGuestAgentResponse (line 522) | type ForwardGuestAgentResponse struct
    method Reset (line 529) | func (x *ForwardGuestAgentResponse) Reset() {
    method String (line 536) | func (x *ForwardGuestAgentResponse) String() string {
    method ProtoMessage (line 540) | func (*ForwardGuestAgentResponse) ProtoMessage() {}
    method ProtoReflect (line 542) | func (x *ForwardGuestAgentResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 555) | func (*ForwardGuestAgentResponse) Descriptor() ([]byte, []int) {
    method GetShouldForward (line 559) | func (x *ForwardGuestAgentResponse) GetShouldForward() bool {
  constant file_driver_proto_rawDesc (line 568) | file_driver_proto_rawDesc = "" +
  function file_driver_proto_rawDescGZIP (line 630) | func file_driver_proto_rawDescGZIP() []byte {
  function init (line 703) | func init() { file_driver_proto_init() }
  function file_driver_proto_init (line 704) | func file_driver_proto_init() {

FILE: pkg/driver/external/driver_grpc.pb.go
  constant _ (line 20) | _ = grpc.SupportPackageIsVersion9
  constant Driver_Validate_FullMethodName (line 23) | Driver_Validate_FullMethodName              = "/Driver/Validate"
  constant Driver_Create_FullMethodName (line 24) | Driver_Create_FullMethodName                = "/Driver/Create"
  constant Driver_CreateDisk_FullMethodName (line 25) | Driver_CreateDisk_FullMethodName            = "/Driver/CreateDisk"
  constant Driver_Start_FullMethodName (line 26) | Driver_Start_FullMethodName                 = "/Driver/Start"
  constant Driver_Stop_FullMethodName (line 27) | Driver_Stop_FullMethodName                  = "/Driver/Stop"
  constant Driver_Delete_FullMethodName (line 28) | Driver_Delete_FullMethodName                = "/Driver/Delete"
  constant Driver_BootScripts_FullMethodName (line 29) | Driver_BootScripts_FullMethodName           = "/Driver/BootScripts"
  constant Driver_RunGUI_FullMethodName (line 30) | Driver_RunGUI_FullMethodName                = "/Driver/RunGUI"
  constant Driver_ChangeDisplayPassword_FullMethodName (line 31) | Driver_ChangeDisplayPassword_FullMethodName = "/Driver/ChangeDisplayPass...
  constant Driver_GetDisplayConnection_FullMethodName (line 32) | Driver_GetDisplayConnection_FullMethodName  = "/Driver/GetDisplayConnect...
  constant Driver_CreateSnapshot_FullMethodName (line 33) | Driver_CreateSnapshot_FullMethodName        = "/Driver/CreateSnapshot"
  constant Driver_ApplySnapshot_FullMethodName (line 34) | Driver_ApplySnapshot_FullMethodName         = "/Driver/ApplySnapshot"
  constant Driver_DeleteSnapshot_FullMethodName (line 35) | Driver_DeleteSnapshot_FullMethodName        = "/Driver/DeleteSnapshot"
  constant Driver_ListSnapshots_FullMethodName (line 36) | Driver_ListSnapshots_FullMethodName         = "/Driver/ListSnapshots"
  constant Driver_ForwardGuestAgent_FullMethodName (line 37) | Driver_ForwardGuestAgent_FullMethodName     = "/Driver/ForwardGuestAgent"
  constant Driver_GuestAgentConn_FullMethodName (line 38) | Driver_GuestAgentConn_FullMethodName        = "/Driver/GuestAgentConn"
  constant Driver_Configure_FullMethodName (line 39) | Driver_Configure_FullMethodName             = "/Driver/Configure"
  constant Driver_Info_FullMethodName (line 40) | Driver_Info_FullMethodName                  = "/Driver/Info"
  constant Driver_SSHAddress_FullMethodName (line 41) | Driver_SSHAddress_FullMethodName            = "/Driver/SSHAddress"
  constant Driver_AdditionalSetupForSSH_FullMethodName (line 42) | Driver_AdditionalSetupForSSH_FullMethodName = "/Driver/AdditionalSetupFo...
  type DriverClient (line 48) | type DriverClient interface
  type driverClient (line 73) | type driverClient struct
    method Validate (line 81) | func (c *driverClient) Validate(ctx context.Context, in *emptypb.Empty...
    method Create (line 91) | func (c *driverClient) Create(ctx context.Context, in *emptypb.Empty, ...
    method CreateDisk (line 101) | func (c *driverClient) CreateDisk(ctx context.Context, in *emptypb.Emp...
    method Start (line 111) | func (c *driverClient) Start(ctx context.Context, in *emptypb.Empty, o...
    method Stop (line 130) | func (c *driverClient) Stop(ctx context.Context, in *emptypb.Empty, op...
    method Delete (line 140) | func (c *driverClient) Delete(ctx context.Context, in *emptypb.Empty, ...
    method BootScripts (line 150) | func (c *driverClient) BootScripts(ctx context.Context, in *emptypb.Em...
    method RunGUI (line 160) | func (c *driverClient) RunGUI(ctx context.Context, in *emptypb.Empty, ...
    method ChangeDisplayPassword (line 170) | func (c *driverClient) ChangeDisplayPassword(ctx context.Context, in *...
    method GetDisplayConnection (line 180) | func (c *driverClient) GetDisplayConnection(ctx context.Context, in *e...
    method CreateSnapshot (line 190) | func (c *driverClient) CreateSnapshot(ctx context.Context, in *CreateS...
    method ApplySnapshot (line 200) | func (c *driverClient) ApplySnapshot(ctx context.Context, in *ApplySna...
    method DeleteSnapshot (line 210) | func (c *driverClient) DeleteSnapshot(ctx context.Context, in *DeleteS...
    method ListSnapshots (line 220) | func (c *driverClient) ListSnapshots(ctx context.Context, in *emptypb....
    method ForwardGuestAgent (line 230) | func (c *driverClient) ForwardGuestAgent(ctx context.Context, in *empt...
    method GuestAgentConn (line 240) | func (c *driverClient) GuestAgentConn(ctx context.Context, in *emptypb...
    method Configure (line 250) | func (c *driverClient) Configure(ctx context.Context, in *SetConfigReq...
    method Info (line 260) | func (c *driverClient) Info(ctx context.Context, in *emptypb.Empty, op...
    method SSHAddress (line 270) | func (c *driverClient) SSHAddress(ctx context.Context, in *emptypb.Emp...
    method AdditionalSetupForSSH (line 280) | func (c *driverClient) AdditionalSetupForSSH(ctx context.Context, in *...
  function NewDriverClient (line 77) | func NewDriverClient(cc grpc.ClientConnInterface) DriverClient {
  type DriverServer (line 293) | type DriverServer interface
  type UnimplementedDriverServer (line 324) | type UnimplementedDriverServer struct
    method Validate (line 326) | func (UnimplementedDriverServer) Validate(context.Context, *emptypb.Em...
    method Create (line 329) | func (UnimplementedDriverServer) Create(context.Context, *emptypb.Empt...
    method CreateDisk (line 332) | func (UnimplementedDriverServer) CreateDisk(context.Context, *emptypb....
    method Start (line 335) | func (UnimplementedDriverServer) Start(*emptypb.Empty, grpc.ServerStre...
    method Stop (line 338) | func (UnimplementedDriverServer) Stop(context.Context, *emptypb.Empty)...
    method Delete (line 341) | func (UnimplementedDriverServer) Delete(context.Context, *emptypb.Empt...
    method BootScripts (line 344) | func (UnimplementedDriverServer) BootScripts(context.Context, *emptypb...
    method RunGUI (line 347) | func (UnimplementedDriverServer) RunGUI(context.Context, *emptypb.Empt...
    method ChangeDisplayPassword (line 350) | func (UnimplementedDriverServer) ChangeDisplayPassword(context.Context...
    method GetDisplayConnection (line 353) | func (UnimplementedDriverServer) GetDisplayConnection(context.Context,...
    method CreateSnapshot (line 356) | func (UnimplementedDriverServer) CreateSnapshot(context.Context, *Crea...
    method ApplySnapshot (line 359) | func (UnimplementedDriverServer) ApplySnapshot(context.Context, *Apply...
    method DeleteSnapshot (line 362) | func (UnimplementedDriverServer) DeleteSnapshot(context.Context, *Dele...
    method ListSnapshots (line 365) | func (UnimplementedDriverServer) ListSnapshots(context.Context, *empty...
    method ForwardGuestAgent (line 368) | func (UnimplementedDriverServer) ForwardGuestAgent(context.Context, *e...
    method GuestAgentConn (line 371) | func (UnimplementedDriverServer) GuestAgentConn(context.Context, *empt...
    method Configure (line 374) | func (UnimplementedDriverServer) Configure(context.Context, *SetConfig...
    method Info (line 377) | func (UnimplementedDriverServer) Info(context.Context, *emptypb.Empty)...
    method SSHAddress (line 380) | func (UnimplementedDriverServer) SSHAddress(context.Context, *emptypb....
    method AdditionalSetupForSSH (line 383) | func (UnimplementedDriverServer) AdditionalSetupForSSH(context.Context...
    method mustEmbedUnimplementedDriverServer (line 386) | func (UnimplementedDriverServer) mustEmbedUnimplementedDriverServer() {}
    method testEmbeddedByValue (line 387) | func (UnimplementedDriverServer) testEmbeddedByValue()                {}
  type UnsafeDriverServer (line 392) | type UnsafeDriverServer interface
  function RegisterDriverServer (line 396) | func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer) {
  function _Driver_Validate_Handler (line 407) | func _Driver_Validate_Handler(srv interface{}, ctx context.Context, dec ...
  function _Driver_Create_Handler (line 425) | func _Driver_Create_Handler(srv interface{}, ctx context.Context, dec fu...
  function _Driver_CreateDisk_Handler (line 443) | func _Driver_CreateDisk_Handler(srv interface{}, ctx context.Context, de...
  function _Driver_Start_Handler (line 461) | func _Driver_Start_Handler(srv interface{}, stream grpc.ServerStream) er...
  function _Driver_Stop_Handler (line 472) | func _Driver_Stop_Handler(srv interface{}, ctx context.Context, dec func...
  function _Driver_Delete_Handler (line 490) | func _Driver_Delete_Handler(srv interface{}, ctx context.Context, dec fu...
  function _Driver_BootScripts_Handler (line 508) | func _Driver_BootScripts_Handler(srv interface{}, ctx context.Context, d...
  function _Driver_RunGUI_Handler (line 526) | func _Driver_RunGUI_Handler(srv interface{}, ctx context.Context, dec fu...
  function _Driver_ChangeDisplayPassword_Handler (line 544) | func _Driver_ChangeDisplayPassword_Handler(srv interface{}, ctx context....
  function _Driver_GetDisplayConnection_Handler (line 562) | func _Driver_GetDisplayConnection_Handler(srv interface{}, ctx context.C...
  function _Driver_CreateSnapshot_Handler (line 580) | func _Driver_CreateSnapshot_Handler(srv interface{}, ctx context.Context...
  function _Driver_ApplySnapshot_Handler (line 598) | func _Driver_ApplySnapshot_Handler(srv interface{}, ctx context.Context,...
  function _Driver_DeleteSnapshot_Handler (line 616) | func _Driver_DeleteSnapshot_Handler(srv interface{}, ctx context.Context...
  function _Driver_ListSnapshots_Handler (line 634) | func _Driver_ListSnapshots_Handler(srv interface{}, ctx context.Context,...
  function _Driver_ForwardGuestAgent_Handler (line 652) | func _Driver_ForwardGuestAgent_Handler(srv interface{}, ctx context.Cont...
  function _Driver_GuestAgentConn_Handler (line 670) | func _Driver_GuestAgentConn_Handler(srv interface{}, ctx context.Context...
  function _Driver_Configure_Handler (line 688) | func _Driver_Configure_Handler(srv interface{}, ctx context.Context, dec...
  function _Driver_Info_Handler (line 706) | func _Driver_Info_Handler(srv interface{}, ctx context.Context, dec func...
  function _Driver_SSHAddress_Handler (line 724) | func _Driver_SSHAddress_Handler(srv interface{}, ctx context.Context, de...
  function _Driver_AdditionalSetupForSSH_Handler (line 742) | func _Driver_AdditionalSetupForSSH_Handler(srv interface{}, ctx context....

FILE: pkg/driver/external/server/methods.go
  method Start (line 23) | func (s *DriverServer) Start(_ *emptypb.Empty, stream pb.Driver_StartSer...
  method Configure (line 67) | func (s *DriverServer) Configure(_ context.Context, req *pb.SetConfigReq...
  method GuestAgentConn (line 81) | func (s *DriverServer) GuestAgentConn(ctx context.Context, _ *emptypb.Em...
  method Info (line 116) | func (s *DriverServer) Info(_ context.Context, _ *emptypb.Empty) (*pb.In...
  method Validate (line 131) | func (s *DriverServer) Validate(ctx context.Context, empty *emptypb.Empt...
  method Create (line 142) | func (s *DriverServer) Create(ctx context.Context, empty *emptypb.Empty)...
  method CreateDisk (line 153) | func (s *DriverServer) CreateDisk(ctx context.Context, empty *emptypb.Em...
  method Stop (line 164) | func (s *DriverServer) Stop(ctx context.Context, empty *emptypb.Empty) (...
  method RunGUI (line 175) | func (s *DriverServer) RunGUI(_ context.Context, empty *emptypb.Empty) (...
  method Delete (line 186) | func (s *DriverServer) Delete(ctx context.Context, empty *emptypb.Empty)...
  method BootScripts (line 197) | func (s *DriverServer) BootScripts(_ context.Context, _ *emptypb.Empty) ...
  method SSHAddress (line 215) | func (s *DriverServer) SSHAddress(ctx context.Context, _ *emptypb.Empty)...
  method ChangeDisplayPassword (line 227) | func (s *DriverServer) ChangeDisplayPassword(ctx context.Context, req *p...
  method GetDisplayConnection (line 238) | func (s *DriverServer) GetDisplayConnection(ctx context.Context, _ *empt...
  method CreateSnapshot (line 249) | func (s *DriverServer) CreateSnapshot(ctx context.Context, req *pb.Creat...
  method ApplySnapshot (line 260) | func (s *DriverServer) ApplySnapshot(ctx context.Context, req *pb.ApplyS...
  method DeleteSnapshot (line 271) | func (s *DriverServer) DeleteSnapshot(ctx context.Context, req *pb.Delet...
  method ListSnapshots (line 282) | func (s *DriverServer) ListSnapshots(ctx context.Context, _ *emptypb.Emp...
  method ForwardGuestAgent (line 293) | func (s *DriverServer) ForwardGuestAgent(_ context.Context, _ *emptypb.E...
  method AdditionalSetupForSSH (line 298) | func (s *DriverServer) AdditionalSetupForSSH(ctx context.Context, _ *emp...

FILE: pkg/driver/external/server/server.go
  type DriverServer (line 35) | type DriverServer struct
  type listenerTracker (line 41) | type listenerTracker struct
    method Accept (line 47) | func (t *listenerTracker) Accept() (net.Conn, error) {
  function Serve (line 55) | func Serve(ctx context.Context, driver driver.Driver) {
  function handleInspectStatus (line 164) | func handleInspectStatus(driver driver.Driver) {
  function handlePreConfiguredDriverAction (line 191) | func handlePreConfiguredDriverAction(ctx context.Context, driver driver....
  function Start (line 213) | func Start(extDriver *registry.ExternalDriver, instName string) error {
  function Stop (line 289) | func Stop(extDriver *registry.ExternalDriver) error {
  function StopAllExternalDrivers (line 314) | func StopAllExternalDrivers() {

FILE: pkg/driver/krunkit/krunkit_darwin_arm64.go
  constant logLevelInfo (line 30) | logLevelInfo = "3"
  function Cmdline (line 33) | func Cmdline(inst *limatype.Instance) (*exec.Cmd, error) {
  function buildNetworkArgs (line 107) | func buildNetworkArgs(inst *limatype.Instance) ([]string, error) {
  function startUsernet (line 175) | func startUsernet(ctx context.Context, inst *limatype.Instance) (*userne...

FILE: pkg/driver/krunkit/krunkit_driver_darwin_arm64.go
  type LimaKrunkitDriver (line 33) | type LimaKrunkitDriver struct
    method Configure (line 52) | func (l *LimaKrunkitDriver) Configure(inst *limatype.Instance) *driver...
    method CreateDisk (line 61) | func (l *LimaKrunkitDriver) CreateDisk(ctx context.Context) error {
    method Start (line 66) | func (l *LimaKrunkitDriver) Start(ctx context.Context) (chan error, er...
    method Stop (line 123) | func (l *LimaKrunkitDriver) Stop(_ context.Context) error {
    method Validate (line 155) | func (l *LimaKrunkitDriver) Validate(_ context.Context) error {
    method FillConfig (line 204) | func (l *LimaKrunkitDriver) FillConfig(_ context.Context, cfg *limatyp...
    method BootScripts (line 225) | func (l *LimaKrunkitDriver) BootScripts() (map[string][]byte, error) {
    method Create (line 256) | func (l *LimaKrunkitDriver) Create(_ context.Context) error {
    method Info (line 260) | func (l *LimaKrunkitDriver) Info() driver.Info {
    method SSHAddress (line 275) | func (l *LimaKrunkitDriver) SSHAddress(_ context.Context) (string, err...
    method ForwardGuestAgent (line 279) | func (l *LimaKrunkitDriver) ForwardGuestAgent() bool {
    method Delete (line 283) | func (l *LimaKrunkitDriver) Delete(_ context.Context) error {
    method InspectStatus (line 287) | func (l *LimaKrunkitDriver) InspectStatus(_ context.Context, _ *limaty...
    method RunGUI (line 291) | func (l *LimaKrunkitDriver) RunGUI() error {
    method ChangeDisplayPassword (line 295) | func (l *LimaKrunkitDriver) ChangeDisplayPassword(_ context.Context, _...
    method DisplayConnection (line 299) | func (l *LimaKrunkitDriver) DisplayConnection(_ context.Context) (stri...
    method CreateSnapshot (line 303) | func (l *LimaKrunkitDriver) CreateSnapshot(_ context.Context, _ string...
    method ApplySnapshot (line 307) | func (l *LimaKrunkitDriver) ApplySnapshot(_ context.Context, _ string)...
    method DeleteSnapshot (line 311) | func (l *LimaKrunkitDriver) DeleteSnapshot(_ context.Context, _ string...
    method ListSnapshots (line 315) | func (l *LimaKrunkitDriver) ListSnapshots(_ context.Context) (string, ...
    method Register (line 319) | func (l *LimaKrunkitDriver) Register(_ context.Context) error {
    method Unregister (line 323) | func (l *LimaKrunkitDriver) Unregister(_ context.Context) error {
    method GuestAgentConn (line 327) | func (l *LimaKrunkitDriver) GuestAgentConn(_ context.Context) (net.Con...
    method AdditionalSetupForSSH (line 331) | func (l *LimaKrunkitDriver) AdditionalSetupForSSH(_ context.Context) e...
  function New (line 48) | func New() *LimaKrunkitDriver {
  function validateConfig (line 159) | func validateConfig(cfg *limatype.LimaYAML) error {
  function isFedoraConfigured (line 190) | func isFedoraConfigured(cfg *limatype.LimaYAML) bool {

FILE: pkg/driver/qemu/entitlementutil/entitlementutil.go
  function IsSigned (line 22) | func IsSigned(ctx context.Context, qExe string) error {
  function Sign (line 42) | func Sign(ctx context.Context, qExe string) error {
  function isColimaWrapper__useThisFunctionOnlyForPrintingHints__ (line 78) | func isColimaWrapper__useThisFunctionOnlyForPrintingHints__(qExe string)...
  function AskToSignIfNotSignedProperly (line 86) | func AskToSignIfNotSignedProperly(ctx context.Context, qExe string) {

FILE: pkg/driver/qemu/qemu.go
  type Config (line 44) | type Config struct
  function minimumQemuVersion (line 63) | func minimumQemuVersion() (hardMin, softMin semver.Version) {
  function EnsureDisk (line 93) | func EnsureDisk(ctx context.Context, cfg Config) error {
  function newQmpClient (line 134) | func newQmpClient(cfg Config) (*qmp.SocketMonitor, error) {
  function sendHmpCommand (line 143) | func sendHmpCommand(cfg Config, cmd, tag string) (string, error) {
  function execImgCommand (line 158) | func execImgCommand(ctx context.Context, cfg Config, args ...string) (st...
  function Del (line 170) | func Del(ctx context.Context, cfg Config, run bool, tag string) error {
  function Save (line 184) | func Save(ctx context.Context, cfg Config, run bool, tag string) error {
  function Load (line 198) | func Load(ctx context.Context, cfg Config, run bool, tag string) error {
  function List (line 213) | func List(ctx context.Context, cfg Config, run bool) (string, error) {
  function argValue (line 233) | func argValue(args []string, key string) (string, bool) {
  function appendArgsIfNoConflict (line 254) | func appendArgsIfNoConflict(args []string, k, v string) []string {
  type features (line 277) | type features struct
  function inspectFeatures (line 296) | func inspectFeatures(ctx context.Context, exe, machine string) (*feature...
  function adjustMemBytesDarwinARM64HVF (line 362) | func adjustMemBytesDarwinARM64HVF(memBytes int64, accel string) int64 {
  function qemuMachine (line 393) | func qemuMachine(arch limatype.Arch) string {
  function audioDevice (line 401) | func audioDevice() string {
  function defaultCPUType (line 413) | func defaultCPUType() limatype.CPUType {
  function resolveCPUType (line 454) | func resolveCPUType(y *limatype.LimaYAML) string {
  function Cmdline (line 482) | func Cmdline(ctx context.Context, cfg Config) (exe string, args []string...
  function FindVirtiofsd (line 970) | func FindVirtiofsd(ctx context.Context, qemuExe string) (string, error) {
  function VirtiofsdCmdline (line 1044) | func VirtiofsdCmdline(cfg Config, mountIndex int) ([]string, error) {
  function qemuArch (line 1060) | func qemuArch(arch limatype.Arch) string {
  function qemuEdk2Arch (line 1072) | func qemuEdk2Arch(arch limatype.Arch) string {
  function Exe (line 1079) | func Exe(arch limatype.Arch) (exe string, args []string, err error) {
  function Accel (line 1099) | func Accel(arch limatype.Arch) string {
  function parseQemuVersion (line 1122) | func parseQemuVersion(output string) (*semver.Version, error) {
  function getQemuVersion (line 1132) | func getQemuVersion(ctx context.Context, qemuExe string) (*semver.Versio...
  function getFirmware (line 1147) | func getFirmware(qemuExe string, arch limatype.Arch) (string, error) {
  function getFirmwareVars (line 1221) | func getFirmwareVars(qemuExe string, arch limatype.Arch) (string, error) {
  function hasHostCPU (line 1270) | func hasHostCPU() bool {

FILE: pkg/driver/qemu/qemu_driver.go
  type LimaQemuDriver (line 43) | type LimaQemuDriver struct
    method Configure (line 71) | func (l *LimaQemuDriver) Configure(inst *limatype.Instance) *driver.Co...
    method Validate (line 80) | func (l *LimaQemuDriver) Validate(ctx context.Context) error {
    method FillConfig (line 150) | func (l *LimaQemuDriver) FillConfig(_ context.Context, cfg *limatype.L...
    method BootScripts (line 229) | func (l *LimaQemuDriver) BootScripts() (map[string][]byte, error) {
    method CreateDisk (line 233) | func (l *LimaQemuDriver) CreateDisk(ctx context.Context) error {
    method Start (line 242) | func (l *LimaQemuDriver) Start(_ context.Context) (chan error, error) {
    method Stop (line 389) | func (l *LimaQemuDriver) Stop(ctx context.Context) error {
    method ChangeDisplayPassword (line 393) | func (l *LimaQemuDriver) ChangeDisplayPassword(_ context.Context, pass...
    method DisplayConnection (line 397) | func (l *LimaQemuDriver) DisplayConnection(_ context.Context) (string,...
    method changeVNCPassword (line 440) | func (l *LimaQemuDriver) changeVNCPassword(password string) error {
    method getVNCDisplayPort (line 462) | func (l *LimaQemuDriver) getVNCDisplayPort() (string, error) {
    method removeVNCFiles (line 480) | func (l *LimaQemuDriver) removeVNCFiles() error {
    method killVhosts (line 494) | func (l *LimaQemuDriver) killVhosts() error {
    method shutdownQEMU (line 505) | func (l *LimaQemuDriver) shutdownQEMU(ctx context.Context, timeout tim...
    method killQEMU (line 560) | func (l *LimaQemuDriver) killQEMU(_ context.Context, _ time.Duration, ...
    method DeleteSnapshot (line 585) | func (l *LimaQemuDriver) DeleteSnapshot(ctx context.Context, tag strin...
    method CreateSnapshot (line 594) | func (l *LimaQemuDriver) CreateSnapshot(ctx context.Context, tag strin...
    method ApplySnapshot (line 603) | func (l *LimaQemuDriver) ApplySnapshot(ctx context.Context, tag string...
    method ListSnapshots (line 612) | func (l *LimaQemuDriver) ListSnapshots(ctx context.Context) (string, e...
    method GuestAgentConn (line 621) | func (l *LimaQemuDriver) GuestAgentConn(ctx context.Context) (net.Conn...
    method Info (line 679) | func (l *LimaQemuDriver) Info() driver.Info {
    method SSHAddress (line 696) | func (l *LimaQemuDriver) SSHAddress(_ context.Context) (string, error) {
    method InspectStatus (line 700) | func (l *LimaQemuDriver) InspectStatus(_ context.Context, _ *limatype....
    method Create (line 704) | func (l *LimaQemuDriver) Create(_ context.Context) error {
    method Delete (line 708) | func (l *LimaQemuDriver) Delete(_ context.Context) error {
    method RunGUI (line 712) | func (l *LimaQemuDriver) RunGUI() error {
    method Register (line 716) | func (l *LimaQemuDriver) Register(_ context.Context) error {
    method Unregister (line 720) | func (l *LimaQemuDriver) Unregister(_ context.Context) error {
    method ForwardGuestAgent (line 724) | func (l *LimaQemuDriver) ForwardGuestAgent() bool {
    method AdditionalSetupForSSH (line 729) | func (l *LimaQemuDriver) AdditionalSetupForSSH(_ context.Context) error {
  function New (line 57) | func New() *LimaQemuDriver {
  function validateConfig (line 87) | func validateConfig(cfg *limatype.LimaYAML) error {
  function validateArch (line 121) | func validateArch(ctx context.Context, cfg *limatype.LimaYAML) error {
  function validateMountType (line 135) | func validateMountType(cfg *limatype.LimaYAML) error {
  function waitFileExists (line 401) | func waitFileExists(path string, timeout time.Duration) error {
  function checkBinarySignature (line 421) | func checkBinarySignature(ctx context.Context, vmArch string) error {
  function logPipeRoutine (line 577) | func logPipeRoutine(r io.Reader, header string) {
  type qArgTemplateApplier (line 627) | type qArgTemplateApplier struct
    method applyTemplate (line 631) | func (a *qArgTemplateApplier) applyTemplate(qArg string) (string, erro...

FILE: pkg/driver/qemu/qemu_test.go
  function TestArgValue (line 12) | func TestArgValue(t *testing.T) {
  function TestParseQemuVersion (line 54) | func TestParseQemuVersion(t *testing.T) {

FILE: pkg/driver/qemu/register.go
  function init (line 10) | func init() {

FILE: pkg/driver/vz/network_darwin.go
  function PassFDToUnix (line 23) | func PassFDToUnix(unixSock string) (*os.File, error) {
  function DialQemu (line 46) | func DialQemu(ctx context.Context, unixSock string) (*os.File, error) {
  function forwardPackets (line 69) | func forwardPackets(qemuConn *qemuPacketConn, vzConn *packetConn) {
  type qemuPacketConn (line 94) | type qemuPacketConn struct
    method Read (line 101) | func (c *qemuPacketConn) Read(b []byte) (n int, err error) {
    method Write (line 113) | func (c *qemuPacketConn) Write(b []byte) (int, error) {
  constant writeRetryDelay (line 133) | writeRetryDelay = 100 * time.Microsecond
  type packetConn (line 136) | type packetConn struct
    method Write (line 141) | func (c *packetConn) Write(b []byte) (int, error) {

FILE: pkg/driver/vz/network_darwin_test.go
  constant vmnetMaxPacketSize (line 19) | vmnetMaxPacketSize = 1514
  constant packetsCount (line 20) | packetsCount       = 1000
  function TestDialQemu (line 23) | func TestDialQemu(t *testing.T) {
  function serveOneClient (line 107) | func serveOneClient(listener *net.UnixListener) error {
  function listenUnix (line 135) | func listenUnix(dir string) (*net.UnixListener, error) {

FILE: pkg/driver/vz/register.go
  function init (line 10) | func init() {

FILE: pkg/driver/vz/rosetta_directory_share.go
  function createRosettaDirectoryShareConfiguration (line 12) | func createRosettaDirectoryShareConfiguration() (*vz.VirtioFileSystemDev...

FILE: pkg/driver/vz/rosetta_directory_share_arm64.go
  function createRosettaDirectoryShareConfiguration (line 18) | func createRosettaDirectoryShareConfiguration() (*vz.VirtioFileSystemDev...

FILE: pkg/driver/vz/vm_darwin.go
  constant diskImageCachingMode (line 47) | diskImageCachingMode = vz.DiskImageCachingModeCached
  type virtualMachineWrapper (line 49) | type virtualMachineWrapper struct
  function startVM (line 58) | func startVM(ctx context.Context, inst *limatype.Instance, sshLocalPort ...
  function startUsernet (line 178) | func startUsernet(ctx context.Context, inst *limatype.Instance) (*userne...
  function createVM (line 213) | func createVM(ctx context.Context, inst *limatype.Instance) (*vz.Virtual...
  function createVMForMacInstaller (line 262) | func createVMForMacInstaller(_ context.Context, inst *limatype.Instance)...
  function createInitialConfig (line 300) | func createInitialConfig(inst *limatype.Instance) (*vz.VirtualMachineCon...
  function newPlatformConfiguration (line 322) | func newPlatformConfiguration(inst *limatype.Instance) (vz.PlatformConfi...
  function attachPlatformConfig (line 341) | func attachPlatformConfig(inst *limatype.Instance, vmConfig *vz.VirtualM...
  function attachSerialPort (line 376) | func attachSerialPort(inst *limatype.Instance, config *vz.VirtualMachine...
  function newVirtioFileNetworkDeviceConfiguration (line 389) | func newVirtioFileNetworkDeviceConfiguration(file *os.File, macStr strin...
  function newVirtioNetworkDeviceConfiguration (line 397) | func newVirtioNetworkDeviceConfiguration(attachment vz.NetworkDeviceAtta...
  function attachNetwork (line 414) | func attachNetwork(ctx context.Context, inst *limatype.Instance, vmConfi...
  function validateDiskFormat (line 529) | func validateDiskFormat(diskPath string) error {
  function attachDisks (line 547) | func attachDisks(ctx context.Context, inst *limatype.Instance, vmConfig ...
  function attachDisplay (line 630) | func attachDisplay(inst *limatype.Instance, vmConfig *vz.VirtualMachineC...
  function directorySharingDevicesGeneric (line 664) | func directorySharingDevicesGeneric(origMounts []limatype.Mount) ([]vz.D...
  function directorySharingDevicesMacOS (line 694) | func directorySharingDevicesMacOS(origMounts []limatype.Mount) ([]vz.Dir...
  function attachFolderMounts (line 730) | func attachFolderMounts(inst *limatype.Instance, vmConfig *vz.VirtualMac...
  function attachAudio (line 767) | func attachAudio(inst *limatype.Instance, config *vz.VirtualMachineConfi...
  function attachOtherDevices (line 790) | func attachOtherDevices(inst *limatype.Instance, vmConfig *vz.VirtualMac...
  type machineIdentifier (line 874) | type machineIdentifier interface
  function getGenericMachineIdentifier (line 878) | func getGenericMachineIdentifier(identifier string) (*vz.GenericMachineI...
  function bootLoader (line 897) | func bootLoader(inst *limatype.Instance) (vz.BootLoader, error) {
  function linuxBootLoader (line 916) | func linuxBootLoader(inst *limatype.Instance) (*vz.LinuxBootLoader, erro...
  function getEFI (line 941) | func getEFI(inst *limatype.Instance) (*vz.EFIVariableStore, error) {
  function createSockPair (line 949) | func createSockPair() (server, client *os.File, _ error) {
  function ensureIPSW (line 981) | func ensureIPSW(instDir string) error {

FILE: pkg/driver/vz/vm_darwin_amd64.go
  function getMacMachineIdentifier (line 15) | func getMacMachineIdentifier(_ string) (machineIdentifier, error) {
  function newMacPlatformConfiguration (line 19) | func newMacPlatformConfiguration(_ *limatype.Instance) (vz.PlatformConfi...
  function newMacGraphicsDeviceConfiguration (line 23) | func newMacGraphicsDeviceConfiguration(_, _, _ int64) (vz.GraphicsDevice...
  function newMacPointingDeviceConfiguration (line 27) | func newMacPointingDeviceConfiguration() (vz.PointingDeviceConfiguration...
  function newMacKeyboardConfiguration (line 31) | func newMacKeyboardConfiguration() (vz.KeyboardConfiguration, error) {
  function newMacOSBootLoader (line 35) | func newMacOSBootLoader() (vz.BootLoader, error) {
  function installMacOS (line 39) | func installMacOS(_ context.Context, _ *vz.VirtualMachine, _ string) err...

FILE: pkg/driver/vz/vm_darwin_arm64.go
  function getMacMachineIdentifier (line 26) | func getMacMachineIdentifier(identifier string) (machineIdentifier, erro...
  function newMacPlatformConfiguration (line 45) | func newMacPlatformConfiguration(inst *limatype.Instance) (vz.PlatformCo...
  function newMacGraphicsDeviceConfiguration (line 100) | func newMacGraphicsDeviceConfiguration(x, y, pixelsPerInch int64) (vz.Gr...
  function newMacPointingDeviceConfiguration (line 113) | func newMacPointingDeviceConfiguration() (vz.PointingDeviceConfiguration...
  function newMacKeyboardConfiguration (line 117) | func newMacKeyboardConfiguration() (vz.KeyboardConfiguration, error) {
  function newMacOSBootLoader (line 121) | func newMacOSBootLoader() (vz.BootLoader, error) {
  function installMacOS (line 125) | func installMacOS(ctx context.Context, vm *vz.VirtualMachine, ipsw strin...

FILE: pkg/driver/vz/vsock_forwarder.go
  method startVsockForwarder (line 17) | func (m *virtualMachineWrapper) startVsockForwarder(ctx context.Context,...
  method dialVsock (line 67) | func (m *virtualMachineWrapper) dialVsock(_ context.Context, port uint32...

FILE: pkg/driver/vz/vz_driver_darwin.go
  constant Enabled (line 84) | Enabled = true
  type LimaVzDriver (line 86) | type LimaVzDriver struct
    method SetVsockEventCallback (line 108) | func (l *LimaVzDriver) SetVsockEventCallback(callback func(*events.Vso...
    method Configure (line 119) | func (l *LimaVzDriver) Configure(inst *limatype.Instance) *driver.Conf...
    method FillConfig (line 161) | func (l *LimaVzDriver) FillConfig(ctx context.Context, cfg *limatype.L...
    method BootScripts (line 218) | func (l *LimaVzDriver) BootScripts() (map[string][]byte, error) {
    method Validate (line 241) | func (l *LimaVzDriver) Validate(ctx context.Context) error {
    method Create (line 340) | func (l *LimaVzDriver) Create(_ context.Context) error {
    method CreateDisk (line 350) | func (l *LimaVzDriver) CreateDisk(ctx context.Context) error {
    method createDiskMacOSGuest (line 381) | func (l *LimaVzDriver) createDiskMacOSGuest(ctx context.Context) error {
    method Start (line 422) | func (l *LimaVzDriver) Start(ctx context.Context) (chan error, error) {
    method canRunGUI (line 437) | func (l *LimaVzDriver) canRunGUI() bool {
    method RunGUI (line 446) | func (l *LimaVzDriver) RunGUI() error {
    method requestStopViaSSH (line 453) | func (l *LimaVzDriver) requestStopViaSSH(ctx context.Context) error {
    method Stop (line 468) | func (l *LimaVzDriver) Stop(ctx context.Context) error {
    method GuestAgentConn (line 507) | func (l *LimaVzDriver) GuestAgentConn(_ context.Context) (net.Conn, st...
    method Info (line 516) | func (l *LimaVzDriver) Info() driver.Info {
    method SSHAddress (line 540) | func (l *LimaVzDriver) SSHAddress(_ context.Context) (string, error) {
    method InspectStatus (line 544) | func (l *LimaVzDriver) InspectStatus(_ context.Context, _ *limatype.In...
    method Delete (line 548) | func (l *LimaVzDriver) Delete(_ context.Context) error {
    method Register (line 552) | func (l *LimaVzDriver) Register(_ context.Context) error {
    method Unregister (line 556) | func (l *LimaVzDriver) Unregister(_ context.Context) error {
    method ChangeDisplayPassword (line 560) | func (l *LimaVzDriver) ChangeDisplayPassword(_ context.Context, _ stri...
    method DisplayConnection (line 564) | func (l *LimaVzDriver) DisplayConnection(_ context.Context) (string, e...
    method CreateSnapshot (line 568) | func (l *LimaVzDriver) CreateSnapshot(_ context.Context, _ string) err...
    method ApplySnapshot (line 572) | func (l *LimaVzDriver) ApplySnapshot(_ context.Context, _ string) error {
    method DeleteSnapshot (line 576) | func (l *LimaVzDriver) DeleteSnapshot(_ context.Context, _ string) err...
    method ListSnapshots (line 580) | func (l *LimaVzDriver) ListSnapshots(_ context.Context) (string, error) {
    method ForwardGuestAgent (line 584) | func (l *LimaVzDriver) ForwardGuestAgent() bool {
    method AdditionalSetupForSSH (line 589) | func (l *LimaVzDriver) AdditionalSetupForSSH(_ context.Context) error {
  function New (line 112) | func New() *LimaVzDriver {
  function isEmpty (line 211) | func isEmpty(r limatype.Rosetta) bool {
  function validateConfig (line 245) | func validateConfig(_ context.Context, cfg *limatype.LimaYAML) error {

FILE: pkg/driver/wsl2/fs.go
  function EnsureFs (line 20) | func EnsureFs(ctx context.Context, inst *limatype.Instance) error {

FILE: pkg/driver/wsl2/register.go
  function init (line 10) | func init() {

FILE: pkg/driver/wsl2/vm_windows.go
  function startVM (line 27) | func startVM(ctx context.Context, distroName string) error {
  function initVM (line 41) | func initVM(ctx context.Context, instanceDir, distroName string) error {
  function stopVM (line 59) | func stopVM(ctx context.Context, distroName string) error {
  function provisionVM (line 76) | func provisionVM(ctx context.Context, instanceDir, instanceName, distroN...
  function keepAlive (line 149) | func keepAlive(ctx context.Context, distroName string, errCh chan<- erro...
  function unregisterVM (line 169) | func unregisterVM(ctx context.Context, distroName string) error {
  function getWslStatus (line 210) | func getWslStatus(ctx context.Context, instName string) (string, error) {
  function getSSHAddress (line 268) | func getSSHAddress(ctx context.Context, instName string) (string, error) {

FILE: pkg/driver/wsl2/wsl_driver_windows.go
  constant Enabled (line 49) | Enabled = true
  type LimaWslDriver (line 51) | type LimaWslDriver struct
    method Configure (line 73) | func (l *LimaWslDriver) Configure(inst *limatype.Instance) *driver.Con...
    method FillConfig (line 82) | func (l *LimaWslDriver) FillConfig(ctx context.Context, cfg *limatype....
    method Validate (line 92) | func (l *LimaWslDriver) Validate(ctx context.Context) error {
    method BootScripts (line 159) | func (l *LimaWslDriver) BootScripts() (map[string][]byte, error) {
    method InspectStatus (line 184) | func (l *LimaWslDriver) InspectStatus(ctx context.Context, inst *limat...
    method Delete (line 207) | func (l *LimaWslDriver) Delete(ctx context.Context) error {
    method Start (line 222) | func (l *LimaWslDriver) Start(ctx context.Context) (chan error, error) {
    method canRunGUI (line 268) | func (l *LimaWslDriver) canRunGUI() bool {
    method RunGUI (line 272) | func (l *LimaWslDriver) RunGUI() error {
    method Stop (line 276) | func (l *LimaWslDriver) Stop(ctx context.Context) error {
    method GuestAgentConn (line 285) | func (l *LimaWslDriver) GuestAgentConn(ctx context.Context) (net.Conn,...
    method Info (line 306) | func (l *LimaWslDriver) Info() driver.Info {
    method SSHAddress (line 325) | func (l *LimaWslDriver) SSHAddress(_ context.Context) (string, error) {
    method Create (line 329) | func (l *LimaWslDriver) Create(_ context.Context) error {
    method CreateDisk (line 333) | func (l *LimaWslDriver) CreateDisk(_ context.Context) error {
    method ChangeDisplayPassword (line 337) | func (l *LimaWslDriver) ChangeDisplayPassword(_ context.Context, _ str...
    method DisplayConnection (line 341) | func (l *LimaWslDriver) DisplayConnection(_ context.Context) (string, ...
    method CreateSnapshot (line 345) | func (l *LimaWslDriver) CreateSnapshot(_ context.Context, _ string) er...
    method ApplySnapshot (line 349) | func (l *LimaWslDriver) ApplySnapshot(_ context.Context, _ string) err...
    method DeleteSnapshot (line 353) | func (l *LimaWslDriver) DeleteSnapshot(_ context.Context, _ string) er...
    method ListSnapshots (line 357) | func (l *LimaWslDriver) ListSnapshots(_ context.Context) (string, erro...
    method ForwardGuestAgent (line 361) | func (l *LimaWslDriver) ForwardGuestAgent() bool {
    method AdditionalSetupForSSH (line 366) | func (l *LimaWslDriver) AdditionalSetupForSSH(_ context.Context) error {
  function New (line 61) | func New() *LimaWslDriver {
  function validateConfig (line 96) | func validateConfig(_ context.Context, cfg *limatype.LimaYAML) error {

FILE: pkg/driverutil/disk.go
  function MigrateDiskLayout (line 26) | func MigrateDiskLayout(instDir string) error {
  function EnsureDisk (line 62) | func EnsureDisk(ctx context.Context, instDir, diskSize string, diskImage...

FILE: pkg/driverutil/disk_test.go
  constant typeRAW (line 25) | typeRAW  = image.Type("raw")
  constant typeASIF (line 26) | typeASIF = image.Type("asif")
  function writeMinimalISO (line 29) | func writeMinimalISO(t *testing.T, path string) {
  function writeNonISO (line 37) | func writeNonISO(t *testing.T, path string) {
  function sha256File (line 45) | func sha256File(t *testing.T, path string) string {
  function detectImageType (line 53) | func detectImageType(t *testing.T, path string) image.Type {
  function checkDisk (line 63) | func checkDisk(t *testing.T, diskPath string, expectedType image.Type) {
  function assertSymlink (line 71) | func assertSymlink(t *testing.T, path, expectedTarget string) {
  function isMacOS26OrHigher (line 78) | func isMacOS26OrHigher() bool {
  function TestEnsureDisk_WithISOImage (line 89) | func TestEnsureDisk_WithISOImage(t *testing.T) {
  function TestEnsureDisk_WithNonISOImage (line 121) | func TestEnsureDisk_WithNonISOImage(t *testing.T) {
  function TestEnsureDisk_ExistingDisk (line 146) | func TestEnsureDisk_ExistingDisk(t *testing.T) {
  function TestMigrateDiskLayout_LegacyDiffDisk (line 167) | func TestMigrateDiskLayout_LegacyDiffDisk(t *testing.T) {
  function TestMigrateDiskLayout_LegacyISOBaseDisk (line 185) | func TestMigrateDiskLayout_LegacyISOBaseDisk(t *testing.T) {
  function TestMigrateDiskLayout_LegacyNonISOBaseDisk (line 212) | func TestMigrateDiskLayout_LegacyNonISOBaseDisk(t *testing.T) {
  function TestMigrateDiskLayout_AlreadyMigrated (line 236) | func TestMigrateDiskLayout_AlreadyMigrated(t *testing.T) {

FILE: pkg/driverutil/instance.go
  function CreateConfiguredDriver (line 18) | func CreateConfiguredDriver(inst *limatype.Instance, sshLocalPort int) (...

FILE: pkg/driverutil/vm.go
  function ResolveVMType (line 22) | func ResolveVMType(ctx context.Context, y *limatype.LimaYAML, filePath s...
  function validateConfigAgainstDriver (line 39) | func validateConfigAgainstDriver(ctx context.Context, y *limatype.LimaYA...
  function handlePreConfiguredDriverAction (line 56) | func handlePreConfiguredDriverAction(ctx context.Context, y *limatype.Li...
  function InspectStatus (line 106) | func InspectStatus(ctx context.Context, inst *limatype.Instance) (string...
  function handleInspectStatusAction (line 129) | func handleInspectStatusAction(ctx context.Context, inst *limatype.Insta...

FILE: pkg/editutil/editorcmd/editorcmd.go
  function Detect (line 30) | func Detect() string {

FILE: pkg/editutil/editutil.go
  function fileWarning (line 22) | func fileWarning(filename string) string {
  function GenerateEditorWarningHeader (line 43) | func GenerateEditorWarningHeader() string {
  function OpenEditor (line 60) | func OpenEditor(ctx context.Context, content []byte, hdr string) ([]byte...

FILE: pkg/envutil/envutil.go
  function validatePattern (line 47) | func validatePattern(pattern string) error {
  function getBlockList (line 59) | func getBlockList() []string {
  function getAllowList (line 81) | func getAllowList() []string {
  function parseEnvList (line 98) | func parseEnvList(envList string) []string {
  function matchesPattern (line 110) | func matchesPattern(name, pattern string) bool {
  function matchesAnyPattern (line 125) | func matchesAnyPattern(name string, patterns []string) bool {
  function FilterEnvironment (line 134) | func FilterEnvironment() []string {
  function filterEnvironmentWithLists (line 142) | func filterEnvironmentWithLists(env, allowList, blockList []string) []st...
  function GetDefaultBlockList (line 170) | func GetDefaultBlockList() []string {

FILE: pkg/envutil/envutil_test.go
  function isUsingDefaultBlockList (line 15) | func isUsingDefaultBlockList() bool {
  function TestMatchesPattern (line 20) | func TestMatchesPattern(t *testing.T) {
  function TestMatchesAnyPattern (line 44) | func TestMatchesAnyPattern(t *testing.T) {
  function TestParseEnvList (line 66) | func TestParseEnvList(t *testing.T) {
  function TestGetBlockAndAllowLists (line 86) | func TestGetBlockAndAllowLists(t *testing.T) {
  function TestFilterEnvironment (line 126) | func TestFilterEnvironment(t *testing.T) {
  function containsAll (line 189) | func containsAll(slice, items []string) bool {
  function TestGetDefaultBlockList (line 198) | func TestGetDefaultBlockList(t *testing.T) {
  function TestValidatePattern (line 214) | func TestValidatePattern(t *testing.T) {
  function TestValidatePatternErrorMessage (line 246) | func TestValidatePatternErrorMessage(t *testing.T) {

FILE: pkg/executil/command.go
  type options (line 15) | type options struct
  type Opt (line 19) | type Opt
  function WithContext (line 22) | func WithContext(ctx context.Context) Opt {
  function RunUTF16leCommand (line 29) | func RunUTF16leCommand(args []string, opts ...Opt) (string, error) {

FILE: pkg/fileutils/download.go
  function DownloadFile (line 22) | func DownloadFile(ctx context.Context, dest string, f limatype.File, dec...
  function CachedFile (line 50) | func CachedFile(f limatype.File) (string, error) {
  function Errors (line 62) | func Errors(errs []error) error {

FILE: pkg/freeport/freeport.go
  function TCP (line 12) | func TCP() (int, error) {
  function UDP (line 34) | func UDP() (int, error) {

FILE: pkg/freeport/freeport_unix.go
  function VSock (line 10) | func VSock() (int, error) {

FILE: pkg/freeport/freeport_windows.go
  function VSock (line 8) | func VSock() (int, error) {

FILE: pkg/fsutil/fsutil_linux.go
  function IsNFS (line 17) | func IsNFS(path string) (bool, error) {

FILE: pkg/fsutil/fsutil_others.go
  function IsNFS (line 8) | func IsNFS(string) (bool, error) {

FILE: pkg/guestagent/api/client/client.go
  type GuestAgentClient (line 20) | type GuestAgentClient struct
    method Info (line 51) | func (c *GuestAgentClient) Info(ctx context.Context) (*api.Info, error) {
    method Events (line 55) | func (c *GuestAgentClient) Events(ctx context.Context, eventCb func(re...
    method Inotify (line 70) | func (c *GuestAgentClient) Inotify(ctx context.Context) (api.GuestServ...
    method Tunnel (line 78) | func (c *GuestAgentClient) Tunnel(ctx context.Context) (api.GuestServi...
    method SyncTime (line 86) | func (c *GuestAgentClient) SyncTime(ctx context.Context, hostTime time...
  function NewGuestAgentClient (line 24) | func NewGuestAgentClient(dialFn func(ctx context.Context) (net.Conn, err...

FILE: pkg/guestagent/api/client/credentials.go
  function NewCredentials (line 14) | func NewCredentials() credentials.TransportCredentials {
  type secureTC (line 23) | type secureTC struct
    method Info (line 27) | func (c *secureTC) Info() credentials.ProtocolInfo {
    method ClientHandshake (line 31) | func (*secureTC) ClientHandshake(_ context.Context, _ string, conn net...
    method ServerHandshake (line 35) | func (*secureTC) ServerHandshake(conn net.Conn) (net.Conn, credentials...
    method Clone (line 39) | func (c *secureTC) Clone() credentials.TransportCredentials {
    method OverrideServerName (line 43) | func (c *secureTC) OverrideServerName(serverNameOverride string) error {
  type info (line 52) | type info struct
    method AuthType (line 56) | func (info) AuthType() string {

FILE: pkg/guestagent/api/guestservice.pb.go
  constant _ (line 21) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 23) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  type Info (line 26) | type Info struct
    method Reset (line 33) | func (x *Info) Reset() {
    method String (line 40) | func (x *Info) String() string {
    method ProtoMessage (line 44) | func (*Info) ProtoMessage() {}
    method ProtoReflect (line 46) | func (x *Info) ProtoReflect() protoreflect.Message {
    method Descriptor (line 59) | func (*Info) Descriptor() ([]byte, []int) {
    method GetLocalPorts (line 63) | func (x *Info) GetLocalPorts() []*IPPort {
  type Event (line 70) | type Event struct
    method Reset (line 80) | func (x *Event) Reset() {
    method String (line 87) | func (x *Event) String() string {
    method ProtoMessage (line 91) | func (*Event) ProtoMessage() {}
    method ProtoReflect (line 93) | func (x *Event) ProtoReflect() protoreflect.Message {
    method Descriptor (line 106) | func (*Event) Descriptor() ([]byte, []int) {
    method GetTime (line 110) | func (x *Event) GetTime() *timestamppb.Timestamp {
    method GetAddedLocalPorts (line 117) | func (x *Event) GetAddedLocalPorts() []*IPPort {
    method GetRemovedLocalPorts (line 124) | func (x *Event) GetRemovedLocalPorts() []*IPPort {
    method GetErrors (line 131) | func (x *Event) GetErrors() []string {
  type IPPort (line 138) | type IPPort struct
    method Reset (line 147) | func (x *IPPort) Reset() {
    method String (line 154) | func (x *IPPort) String() string {
    method ProtoMessage (line 158) | func (*IPPort) ProtoMessage() {}
    method ProtoReflect (line 160) | func (x *IPPort) ProtoReflect() protoreflect.Message {
    method Descriptor (line 173) | func (*IPPort) Descriptor() ([]byte, []int) {
    method GetProtocol (line 177) | func (x *IPPort) GetProtocol() string {
    method GetIp (line 184) | func (x *IPPort) GetIp() string {
    method GetPort (line 191) | func (x *IPPort) GetPort() int32 {
  type Inotify (line 198) | type Inotify struct
    method Reset (line 206) | func (x *Inotify) Reset() {
    method String (line 213) | func (x *Inotify) String() string {
    method ProtoMessage (line 217) | func (*Inotify) ProtoMessage() {}
    method ProtoReflect (line 219) | func (x *Inotify) ProtoReflect() protoreflect.Message {
    method Descriptor (line 232) | func (*Inotify) Descriptor() ([]byte, []int) {
    method GetMountPath (line 236) | func (x *Inotify) GetMountPath() string {
    method GetTime (line 243) | func (x *Inotify) GetTime() *timestamppb.Timestamp {
  type TunnelMessage (line 250) | type TunnelMessage struct
    method Reset (line 261) | func (x *TunnelMessage) Reset() {
    method String (line 268) | func (x *TunnelMessage) String() string {
    method ProtoMessage (line 272) | func (*TunnelMessage) ProtoMessage() {}
    method ProtoReflect (line 274) | func (x *TunnelMessage) ProtoReflect() protoreflect.Message {
    method Descriptor (line 287) | func (*TunnelMessage) Descriptor() ([]byte, []int) {
    method GetId (line 291) | func (x *TunnelMessage) GetId() string {
    method GetProtocol (line 298) | func (x *TunnelMessage) GetProtocol() string {
    method GetData (line 305) | func (x *TunnelMessage) GetData() []byte {
    method GetGuestAddr (line 312) | func (x *TunnelMessage) GetGuestAddr() string {
    method GetUdpTargetAddr (line 319) | func (x *TunnelMessage) GetUdpTargetAddr() string {
  type TimeSyncRequest (line 326) | type TimeSyncRequest struct
    method Reset (line 333) | func (x *TimeSyncRequest) Reset() {
    method String (line 340) | func (x *TimeSyncRequest) String() string {
    method ProtoMessage (line 344) | func (*TimeSyncRequest) ProtoMessage() {}
    method ProtoReflect (line 346) | func (x *TimeSyncRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 359) | func (*TimeSyncRequest) Descriptor() ([]byte, []int) {
    method GetHostTime (line 363) | func (x *TimeSyncRequest) GetHostTime() *timestamppb.Timestamp {
  type TimeSyncResponse (line 370) | type TimeSyncResponse struct
    method Reset (line 379) | func (x *TimeSyncResponse) Reset() {
    method String (line 386) | func (x *TimeSyncResponse) String() string {
    method ProtoMessage (line 390) | func (*TimeSyncResponse) ProtoMessage() {}
    method ProtoReflect (line 392) | func (x *TimeSyncResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 405) | func (*TimeSyncResponse) Descriptor() ([]byte, []int) {
    method GetAdjusted (line 409) | func (x *TimeSyncResponse) GetAdjusted() bool {
    method GetDriftMs (line 416) | func (x *TimeSyncResponse) GetDriftMs() int64 {
    method GetError (line 423) | func (x *TimeSyncResponse) GetError() string {
  constant file_guestservice_proto_rawDesc (line 432) | file_guestservice_proto_rawDesc = "" +
  function file_guestservice_proto_rawDescGZIP (line 476) | func file_guestservice_proto_rawDescGZIP() []byte {
  function init (line 519) | func init() { file_guestservice_proto_init() }
  function file_guestservice_proto_init (line 520) | func file_guestservice_proto_init() {

FILE: pkg/guestagent/api/guestservice_grpc.pb.go
  constant _ (line 20) | _ = grpc.SupportPackageIsVersion9
  constant GuestService_GetInfo_FullMethodName (line 23) | GuestService_GetInfo_FullMethodName     = "/GuestService/GetInfo"
  constant GuestService_GetEvents_FullMethodName (line 24) | GuestService_GetEvents_FullMethodName   = "/GuestService/GetEvents"
  constant GuestService_PostInotify_FullMethodName (line 25) | GuestService_PostInotify_FullMethodName = "/GuestService/PostInotify"
  constant GuestService_Tunnel_FullMethodName (line 26) | GuestService_Tunnel_FullMethodName      = "/GuestService/Tunnel"
  constant GuestService_SyncTime_FullMethodName (line 27) | GuestService_SyncTime_FullMethodName    = "/GuestService/SyncTime"
  type GuestServiceClient (line 33) | type GuestServiceClient interface
  type guestServiceClient (line 41) | type guestServiceClient struct
    method GetInfo (line 49) | func (c *guestServiceClient) GetInfo(ctx context.Context, in *emptypb....
    method GetEvents (line 59) | func (c *guestServiceClient) GetEvents(ctx context.Context, in *emptyp...
    method PostInotify (line 78) | func (c *guestServiceClient) PostInotify(ctx context.Context, opts ......
    method Tunnel (line 91) | func (c *guestServiceClient) Tunnel(ctx context.Context, opts ...grpc....
    method SyncTime (line 104) | func (c *guestServiceClient) SyncTime(ctx context.Context, in *TimeSyn...
  function NewGuestServiceClient (line 45) | func NewGuestServiceClient(cc grpc.ClientConnInterface) GuestServiceClie...
  type GuestServiceServer (line 117) | type GuestServiceServer interface
  type UnimplementedGuestServiceServer (line 131) | type UnimplementedGuestServiceServer struct
    method GetInfo (line 133) | func (UnimplementedGuestServiceServer) GetInfo(context.Context, *empty...
    method GetEvents (line 136) | func (UnimplementedGuestServiceServer) GetEvents(*emptypb.Empty, grpc....
    method PostInotify (line 139) | func (UnimplementedGuestServiceServer) PostInotify(grpc.ClientStreamin...
    method Tunnel (line 142) | func (UnimplementedGuestServiceServer) Tunnel(grpc.BidiStreamingServer...
    method SyncTime (line 145) | func (UnimplementedGuestServiceServer) SyncTime(context.Context, *Time...
    method mustEmbedUnimplementedGuestServiceServer (line 148) | func (UnimplementedGuestServiceServer) mustEmbedUnimplementedGuestServ...
    method testEmbeddedByValue (line 149) | func (UnimplementedGuestServiceServer) testEmbeddedByValue()          ...
  type UnsafeGuestServiceServer (line 154) | type UnsafeGuestServiceServer interface
  function RegisterGuestServiceServer (line 158) | func RegisterGuestServiceServer(s grpc.ServiceRegistrar, srv GuestServic...
  function _GuestService_GetInfo_Handler (line 169) | func _GuestService_GetInfo_Handler(srv interface{}, ctx context.Context,...
  function _GuestService_GetEvents_Handler (line 187) | func _GuestService_GetEvents_Handler(srv interface{}, stream grpc.Server...
  function _GuestService_PostInotify_Handler (line 198) | func _GuestService_PostInotify_Handler(srv interface{}, stream grpc.Serv...
  function _GuestService_Tunnel_Handler (line 205) | func _GuestService_Tunnel_Handler(srv interface{}, stream grpc.ServerStr...
  function _GuestService_SyncTime_Handler (line 212) | func _GuestService_SyncTime_Handler(srv interface{}, ctx context.Context...

FILE: pkg/guestagent/api/ipport.go
  method HostString (line 11) | func (x *IPPort) HostString() string {

FILE: pkg/guestagent/api/server/server.go
  function StartServer (line 22) | func StartServer(ctx context.Context, lis net.Listener, guest *GuestServ...
  type GuestServer (line 47) | type GuestServer struct
    method GetInfo (line 53) | func (s *GuestServer) GetInfo(ctx context.Context, _ *emptypb.Empty) (...
    method GetEvents (line 57) | func (s *GuestServer) GetEvents(_ *emptypb.Empty, stream api.GuestServ...
    method PostInotify (line 70) | func (s *GuestServer) PostInotify(server api.GuestService_PostInotifyS...
    method Tunnel (line 80) | func (s *GuestServer) Tunnel(stream api.GuestService_TunnelServer) err...
    method SyncTime (line 84) | func (s *GuestServer) SyncTime(_ context.Context, req *api.TimeSyncReq...

FILE: pkg/guestagent/fakecloudinit/fakecloudinit_darwin.go
  function Run (line 27) | func Run(ctx context.Context) error {
  function enableSSHD (line 45) | func enableSSHD(ctx context.Context) error {
  function processMetaData (line 54) | func processMetaData(ctx context.Context, mnt string) error {
  function setLocalHostname (line 75) | func setLocalHostname(ctx context.Context, hostname string) error {
  function processUserData (line 84) | func processUserData(ctx context.Context, mnt string) error {
  function mountFSTabEntry (line 145) | func mountFSTabEntry(m []string) error {
  function mountVirtiofs (line 160) | func mountVirtiofs(pseudoTag, dir string) error {
  function setTimezone (line 186) | func setTimezone(ctx context.Context, timezone string) error {
  function generatePassword (line 195) | func generatePassword() (string, error) {
  function populateHomeDir (line 205) | func populateHomeDir(ctx context.Context, uid int, homedir string) error {
  function createUser (line 221) | func createUser(ctx context.Context, u *cloudinittypes.User) error {
  function writeSudoers (line 307) | func writeSudoers(userName, sudo string) error {
  function writeFiles (line 326) | func writeFiles(ctx context.Context, entry cloudinittypes.WriteFile) err...
  function setResolvConf (line 354) | func setResolvConf(ctx context.Context, resolvConf *cloudinittypes.Resol...
  function runBootScripts (line 365) | func runBootScripts(ctx context.Context) error {

FILE: pkg/guestagent/guestagent.go
  type Agent (line 13) | type Agent interface

FILE: pkg/guestagent/guestagent_linux.go
  function New (line 23) | func New(ctx context.Context, ticker ticker.Ticker, runtimeDir string) (...
  type agent (line 50) | type agent struct
    method collectEvent (line 91) | func (a *agent) collectEvent(ctx context.Context, st eventState) (*api...
    method Events (line 114) | func (a *agent) Events(ctx context.Context, ch chan *api.Event) {
    method LocalPorts (line 146) | func (a *agent) LocalPorts(_ context.Context) ([]*api.IPPort, error) {
    method Info (line 200) | func (a *agent) Info(ctx context.Context) (*api.Info, error) {
    method HandleInotify (line 212) | func (a *agent) HandleInotify(event *api.Inotify) {
    method Close (line 223) | func (a *agent) Close() error {
    method LoadEventState (line 238) | func (a *agent) LoadEventState() (eventState, error) {
    method SaveEventState (line 259) | func (a *agent) SaveEventState(st eventState) error {
  type eventState (line 60) | type eventState struct
  function comparePorts (line 64) | func comparePorts(old, neww []*api.IPPort) (added, removed []*api.IPPort) {
  function isEventEmpty (line 108) | func isEventEmpty(ev *api.Event) bool {
  constant eventStateFileName (line 233) | eventStateFileName = "event-state.json"

FILE: pkg/guestagent/kubernetesservice/kubernetesservice.go
  type Protocol (line 25) | type Protocol
  constant TCP (line 28) | TCP Protocol = "tcp"
  constant UDP (line 29) | UDP Protocol = "udp"
  type Entry (line 32) | type Entry struct
  type ServiceWatcher (line 38) | type ServiceWatcher struct
    method Start (line 48) | func (s *ServiceWatcher) Start(ctx context.Context) {
    method loopAttemptToStartKubectl (line 53) | func (s *ServiceWatcher) loopAttemptToStartKubectl(ctx context.Context) {
    method attemptToStartKubectl (line 69) | func (s *ServiceWatcher) attemptToStartKubectl(ctx context.Context) {
    method startAndStreamKubectl (line 126) | func (s *ServiceWatcher) startAndStreamKubectl(cmd *exec.Cmd) error {
    method readKubectlStream (line 149) | func (s *ServiceWatcher) readKubectlStream(r io.Reader) error {
    method GetPorts (line 195) | func (s *ServiceWatcher) GetPorts() []Entry {
  function NewServiceWatcher (line 44) | func NewServiceWatcher() *ServiceWatcher {
  function chooseKubeconfig (line 92) | func chooseKubeconfig() string {
  function canGetServices (line 109) | func canGetServices(ctx context.Context, kubectl, kubeconfig string) err...

FILE: pkg/guestagent/kubernetesservice/kubernetesservice_test.go
  function TestGetPorts (line 14) | func TestGetPorts(t *testing.T) {
  function TestReadKubectlStream (line 119) | func TestReadKubectlStream(t *testing.T) {

FILE: pkg/guestagent/kubernetesservice/types.go
  type service (line 10) | type service struct
  type objectMeta (line 15) | type objectMeta struct
  type serviceSpec (line 20) | type serviceSpec struct
  type servicePort (line 25) | type servicePort struct
  type serviceType (line 33) | type serviceType
  constant serviceTypeNodePort (line 36) | serviceTypeNodePort     serviceType = "NodePort"
  constant serviceTypeLoadBalancer (line 37) | serviceTypeLoadBalancer serviceType = "LoadBalancer"
  type k8sProtocol (line 40) | type k8sProtocol
  constant protocolTCP (line 43) | protocolTCP k8sProtocol = "TCP"
  constant protocolUDP (line 44) | protocolUDP k8sProtocol = "UDP"
  type eventType (line 47) | type eventType
  constant added (line 50) | added    eventType = "ADDED"
  constant modified (line 51) | modified eventType = "MODIFIED"
  constant deleted (line 52) | deleted  eventType = "DELETED"

FILE: pkg/guestagent/serialport/serialconn_linux.go
  type SerialConn (line 11) | type SerialConn struct
    method Read (line 27) | func (c *SerialConn) Read(b []byte) (n int, err error) {
    method Write (line 31) | func (c *SerialConn) Write(b []byte) (n int, err error) {
    method Close (line 35) | func (c *SerialConn) Close() error {
    method LocalAddr (line 41) | func (c *SerialConn) LocalAddr() net.Addr {
    method RemoteAddr (line 45) | func (c *SerialConn) RemoteAddr() net.Addr {
    method SetDeadline (line 49) | func (c *SerialConn) SetDeadline(_ time.Time) error {
    method SetReadDeadline (line 53) | func (c *SerialConn) SetReadDeadline(_ time.Time) error {
    method SetWriteDeadline (line 57) | func (c *SerialConn) SetWriteDeadline(_ time.Time) error {
  function DialSerial (line 18) | func DialSerial(serialDevice string) (*SerialConn, error) {

FILE: pkg/guestagent/serialport/seriallistener_linux.go
  type SerialListener (line 14) | type SerialListener struct
    method ok (line 29) | func (ln *SerialListener) ok() bool {
    method Accept (line 33) | func (ln *SerialListener) Accept() (net.Conn, error) {
    method Close (line 44) | func (ln *SerialListener) Close() error {
    method Addr (line 60) | func (ln *SerialListener) Addr() net.Addr {
  function Listen (line 20) | func Listen(serialDevice string) (net.Listener, error) {

FILE: pkg/guestagent/serialport/serialport_linux.go
  function openPort (line 12) | func openPort(name string) (p *Port, err error) {
  type Port (line 32) | type Port struct
    method Read (line 36) | func (p *Port) Read(b []byte) (n int, err error) {
    method Write (line 40) | func (p *Port) Write(b []byte) (n int, err error) {
    method Close (line 44) | func (p *Port) Close() (err error) {

FILE: pkg/guestagent/sockets/sockets.go
  constant TCP (line 13) | TCP  Kind = "tcp"
  constant TCP6 (line 14) | TCP6 Kind = "tcp6"
  constant UDP (line 15) | UDP  Kind = "udp"
  constant UDP6 (line 16) | UDP6 Kind = "udp6"
  constant TCPEstablished (line 23) | TCPEstablished State = 0x1
  constant TCPListen (line 24) | TCPListen      State = 0xA
  constant UDPUnconnected (line 25) | UDPUnconnected State = 0x7
  type Socket (line 28) | type Socket struct

FILE: pkg/guestagent/sockets/sockets_linux.go
  function buildInetDiagReqV2 (line 16) | func buildInetDiagReqV2(family, proto int) []byte {
  function query (line 35) | func query(conn *netlink.Conn, family, proto int) ([]netlink.Message, er...
  function parseMessages (line 51) | func parseMessages(msgs []netlink.Message, proto int) ([]Socket, error) {
  function NewLister (line 100) | func NewLister() (*Lister, error) {
  type Lister (line 108) | type Lister struct
    method List (line 112) | func (lister *Lister) List() ([]Socket, error) {
    method Close (line 133) | func (lister *Lister) Close() error {

FILE: pkg/guestagent/sockets/sockets_linux_test.go
  function diagMsg (line 23) | func diagMsg(family int, state byte, port uint16, ip net.IP) netlink.Mes...
  function TestBuildInetDiagReqV2 (line 40) | func TestBuildInetDiagReqV2(t *testing.T) {
  function TestParseMessages_TCPv4 (line 55) | func TestParseMessages_TCPv4(t *testing.T) {
  function TestParseMessages_UDPv6 (line 77) | func TestParseMessages_UDPv6(t *testing.T) {
  function TestParseMessages_ShortDataSkipped (line 99) | func TestParseMessages_ShortDataSkipped(t *testing.T) {
  function TestListS_Integration (line 106) | func TestListS_Integration(t *testing.T) {

FILE: pkg/guestagent/ticker/compound.go
  function NewCompoundTicker (line 12) | func NewCompoundTicker(t1, t2 Ticker) Ticker {
  type compoundTicker (line 16) | type compoundTicker struct
    method Chan (line 22) | func (ticker *compoundTicker) Chan() <-chan time.Time {
    method Stop (line 45) | func (ticker *compoundTicker) Stop() {

FILE: pkg/guestagent/ticker/ebpf_linux.go
  function NewEbpfTicker (line 19) | func NewEbpfTicker(tracepoints []string) (Ticker, error) {
  type ebpfTicker (line 78) | type ebpfTicker struct
    method Chan (line 86) | func (ticker *ebpfTicker) Chan() <-chan time.Time {
    method Stop (line 90) | func (ticker *ebpfTicker) Stop() {
  function buildEbpfProg (line 106) | func buildEbpfProg(events *ebpf.Map) (*ebpf.Program, error) {

FILE: pkg/guestagent/ticker/simple.go
  function NewSimpleTicker (line 13) | func NewSimpleTicker(ticker *time.Ticker) Ticker {
  type simpleTicker (line 23) | type simpleTicker struct
    method Chan (line 30) | func (ticker *simpleTicker) Chan() <-chan time.Time {
    method Stop (line 54) | func (ticker *simpleTicker) Stop() {

FILE: pkg/guestagent/ticker/ticker.go
  type Ticker (line 10) | type Ticker interface

FILE: pkg/guestagent/timesync/timesync_linux.go
  function SetSystemTime (line 12) | func SetSystemTime(t time.Time) error {

FILE: pkg/guestagent/timesync/timesync_others.go
  function SetSystemTime (line 15) | func SetSystemTime(_ time.Time) error {

FILE: pkg/guestpatch/macos/macos_darwin.go
  function attachImageWithRetry (line 24) | func attachImageWithRetry(ctx context.Context, disk string, retry int) (...
  function Patch (line 43) | func Patch(ctx context.Context, disk string) error {
  function patchWriteGuestFiles (line 52) | func patchWriteGuestFiles(ctx context.Context, disk string) error {
  function patchFixOwnership (line 83) | func patchFixOwnership(ctx context.Context, disk string) error {
  function writeGuestFiles (line 122) | func writeGuestFiles(ctx context.Context, dataSliceDevice, mnt string) e...

FILE: pkg/hostagent/api/api.go
  type Info (line 6) | type Info struct

FILE: pkg/hostagent/api/client/client.go
  type HostAgentClient (line 19) | type HostAgentClient interface
  function NewHostAgentClient (line 26) | func NewHostAgentClient(socketPath string) (HostAgentClient, error) {
  function NewHostAgentClientWithHTTPClient (line 34) | func NewHostAgentClientWithHTTPClient(hc *http.Client) HostAgentClient {
  type client (line 42) | type client struct
    method HTTPClient (line 50) | func (c *client) HTTPClient() *http.Client {
    method Info (line 54) | func (c *client) Info(ctx context.Context) (*api.Info, error) {

FILE: pkg/hostagent/api/server/server.go
  type Backend (line 15) | type Backend struct
    method onError (line 19) | func (b *Backend) onError(w http.ResponseWriter, err error, ec int) {
    method GetInfo (line 31) | func (b *Backend) GetInfo(w http.ResponseWriter, r *http.Request) {
  function AddRoutes (line 56) | func AddRoutes(r *http.ServeMux, b *Backend) {

FILE: pkg/hostagent/dns/dns.go
  constant truncateSize (line 21) | truncateSize = 512
  type Network (line 25) | type Network
  constant TCP (line 28) | TCP Network = "tcp"
  constant UDP (line 29) | UDP Network = "udp"
  type HandlerOptions (line 32) | type HandlerOptions struct
  type ServerOptions (line 39) | type ServerOptions struct
  type Handler (line 46) | type Handler struct
    method lookupCnameToHost (line 75) | func (h *Handler) lookupCnameToHost(cname string) string {
    method handleQuery (line 140) | func (h *Handler) handleQuery(ctx context.Context, w dns.ResponseWrite...
    method handleDefault (line 303) | func (h *Handler) handleDefault(w dns.ResponseWriter, req *dns.Msg) {
    method ServeDNS (line 334) | func (h *Handler) ServeDNS(w dns.ResponseWriter, req *dns.Msg) {
  type Server (line 55) | type Server struct
    method Shutdown (line 60) | func (s *Server) Shutdown() {
  function newStaticClientConfig (line 69) | func newStaticClientConfig(ips []string) (*dns.ClientConfig, error) {
  function NewHandler (line 88) | func NewHandler(opts HandlerOptions) (dns.Handler, error) {
  function Start (line 343) | func Start(opts ServerOptions) (*Server, error) {
  function listenAndServe (line 362) | func listenAndServe(network Network, opts ServerOptions) (*dns.Server, e...
  function chunkify (line 386) | func chunkify(buffer string, limit int) []string {

FILE: pkg/hostagent/dns/dns_test.go
  function TestNewHandler (line 23) | func TestNewHandler(t *testing.T) {
  function TestDNSRecords (line 131) | func TestDNSRecords(t *testing.T) {
  type TestResponseWriter (line 253) | type TestResponseWriter struct
    method LocalAddr (line 256) | func (r TestResponseWriter) LocalAddr() net.Addr {
    method RemoteAddr (line 261) | func (r TestResponseWriter) RemoteAddr() net.Addr {
    method Network (line 266) | func (r TestResponseWriter) Network() string {
    method WriteMsg (line 271) | func (r TestResponseWriter) WriteMsg(newMsg *dns.Msg) error {
    method Write (line 277) | func (r TestResponseWriter) Write([]byte) (int, error) {
    method Close (line 282) | func (r TestResponseWriter) Close() error {
    method TsigStatus (line 287) | func (r TestResponseWriter) TsigStatus() error {
    method TsigTimersOnly (line 292) | func (r TestResponseWriter) TsigTimersOnly(bool) {
    method Hijack (line 297) | func (r TestResponseWriter) Hijack() {
  type TestAddr (line 300) | type TestAddr struct
    method Network (line 302) | func (r TestAddr) Network() string {
    method String (line 306) | func (r TestAddr) String() string {

FILE: pkg/hostagent/events/events.go
  type Status (line 10) | type Status struct
  type CloudInitProgress (line 31) | type CloudInitProgress struct
  type PortForwardEventType (line 40) | type PortForwardEventType
  constant PortForwardEventForwarding (line 43) | PortForwardEventForwarding    PortForwardEventType = "forwarding"
  constant PortForwardEventNotForwarding (line 44) | PortForwardEventNotForwarding PortForwardEventType = "not-forwarding"
  constant PortForwardEventStopping (line 45) | PortForwardEventStopping      PortForwardEventType = "stopping"
  constant PortForwardEventFailed (line 46) | PortForwardEventFailed        PortForwardEventType = "failed"
  type PortForwardEvent (line 49) | type PortForwardEvent struct
  type VsockEventType (line 57) | type VsockEventType
  constant VsockEventStarted (line 60) | VsockEventStarted VsockEventType = "started"
  constant VsockEventSkipped (line 61) | VsockEventSkipped VsockEventType = "skipped"
  constant VsockEventFailed (line 62) | VsockEventFailed  VsockEventType = "failed"
  type VsockEvent (line 65) | type VsockEvent struct
  type Event (line 72) | type Event struct

FILE: pkg/hostagent/events/watcher.go
  function Watch (line 18) | func Watch(ctx context.Context, haStdoutPath, haStderrPath string, begin...

FILE: pkg/hostagent/hostagent.go
  type HostAgent (line 52) | type HostAgent struct
    method emitEvent (line 327) | func (a *HostAgent) emitEvent(_ context.Context, ev events.Event) {
    method emitCloudInitProgressEvent (line 343) | func (a *HostAgent) emitCloudInitProgressEvent(ctx context.Context, pr...
    method emitPortForwardEvent (line 354) | func (a *HostAgent) emitPortForwardEvent(ctx context.Context, pfEvent ...
    method emitVsockEvent (line 365) | func (a *HostAgent) emitVsockEvent(ctx context.Context, vsockEvent *ev...
    method Run (line 381) | func (a *HostAgent) Run(ctx context.Context) error {
    method startRoutinesAndWait (line 490) | func (a *HostAgent) startRoutinesAndWait(ctx context.Context, errCh <-...
    method Info (line 521) | func (a *HostAgent) Info(_ context.Context) (*hostagentapi.Info, error) {
    method sshAddressPort (line 529) | func (a *HostAgent) sshAddressPort() (sshAddress string, sshPort int) {
    method startHostAgentRoutines (line 535) | func (a *HostAgent) startHostAgentRoutines(ctx context.Context) error {
    method cleanUp (line 670) | func (a *HostAgent) cleanUp(fn func() error) {
    method close (line 676) | func (a *HostAgent) close() error {
    method watchGuestAgentEvents (line 690) | func (a *HostAgent) watchGuestAgentEvents(ctx context.Context) {
    method addStaticPortForwardsFromList (line 774) | func (a *HostAgent) addStaticPortForwardsFromList(ctx context.Context,...
    method separateStaticPortForwards (line 797) | func (a *HostAgent) separateStaticPortForwards() []limatype.PortForward {
    method getOrCreateClient (line 823) | func (a *HostAgent) getOrCreateClient(ctx context.Context) (*guestagen...
    method createConnection (line 834) | func (a *HostAgent) createConnection(ctx context.Context) (net.Conn, e...
    method processGuestAgentEvents (line 844) | func (a *HostAgent) processGuestAgentEvents(ctx context.Context, clien...
    method watchCloudInitProgress (line 990) | func (a *HostAgent) watchCloudInitProgress(ctx context.Context) {
  type options (line 89) | type options struct
  type Opt (line 95) | type Opt
  function WithGuestAgentBinary (line 97) | func WithGuestAgentBinary(s string) Opt {
  function WithNerdctlArchive (line 104) | func WithNerdctlArchive(s string) Opt {
  function WithCloudInitProgress (line 111) | func WithCloudInitProgress(enabled bool) Opt {
  function New (line 121) | func New(ctx context.Context, instName string, stdout io.Writer, signalC...
  function writeSSHConfigFile (line 276) | func writeSSHConfigFile(sshPath, instName, instDir, instSSHAddress strin...
  function determineSSHLocalPort (line 309) | func determineSSHLocalPort(confLocalPort int, instName, limaVersion stri...
  function generatePassword (line 376) | func generatePassword(length int) (string, error) {
  function isGuestAgentSocketAccessible (line 818) | func isGuestAgentSocketAccessible(ctx context.Context, client *guestagen...
  constant verbForward (line 893) | verbForward = "forward"
  constant verbCancel (line 894) | verbCancel  = "cancel"
  function executeSSH (line 897) | func executeSSH(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...
  function forwardSSH (line 912) | func forwardSSH(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...
  function isCloudInitFinished (line 1122) | func isCloudInitFinished(line string) bool {
  function isStartedCloudInitMainService (line 1127) | func isStartedCloudInitMainService(line string) bool {
  function isDeactivatedCloudInitMainService (line 1132) | func isDeactivatedCloudInitMainService(line string) bool {
  function copyToHost (line 1138) | func copyToHost(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...

FILE: pkg/hostagent/hostagent_unix.go
  function adjustNofileRlimit (line 20) | func adjustNofileRlimit() {

FILE: pkg/hostagent/hostagent_windows.go
  function adjustNofileRlimit (line 6) | func adjustNofileRlimit() {}

FILE: pkg/hostagent/inotify.go
  constant CacheSize (line 20) | CacheSize = 10000
  method startInotify (line 28) | func (a *HostAgent) startInotify(ctx context.Context) error {
  method setupWatchers (line 70) | func (a *HostAgent) setupWatchers(events chan notify.EventInfo) error {
  function translateToGuestPath (line 95) | func translateToGuestPath(hostPath string, symlinks, locations map[strin...
  function filterEvents (line 113) | func filterEvents(event notify.EventInfo, stat os.FileInfo) bool {

FILE: pkg/hostagent/inotify_darwin.go
  function GetNotifyEvent (line 8) | func GetNotifyEvent() notify.Event {

FILE: pkg/hostagent/inotify_linux.go
  function GetNotifyEvent (line 8) | func GetNotifyEvent() notify.Event {

FILE: pkg/hostagent/inotify_others.go
  function GetNotifyEvent (line 10) | func GetNotifyEvent() notify.Event {

FILE: pkg/hostagent/inotify_test.go
  function TestTranslateToGuestPath (line 12) | func TestTranslateToGuestPath(t *testing.T) {

FILE: pkg/hostagent/mount.go
  type mount (line 21) | type mount struct
  method setupMounts (line 25) | func (a *HostAgent) setupMounts(ctx context.Context) ([]*mount, error) {
  method setupMount (line 41) | func (a *HostAgent) setupMount(ctx context.Context, m limatype.Mount) (*...

FILE: pkg/hostagent/port.go
  type portForwarder (line 19) | type portForwarder struct
    method emitEvent (line 43) | func (pf *portForwarder) emitEvent(ev *events.PortForwardEvent) {
    method forwardingAddresses (line 63) | func (pf *portForwarder) forwardingAddresses(guest *api.IPPort) (hostA...
    method OnEvent (line 98) | func (pf *portForwarder) OnEvent(ctx context.Context, ev *api.Event) {
  constant sshGuestPort (line 28) | sshGuestPort = 22
  function newPortForwarder (line 32) | func newPortForwarder(sshConfig *ssh.SSHConfig, sshAddressPort func() (s...
  function hostAddress (line 49) | func hostAddress(rule limatype.PortForward, guest *api.IPPort) string {

FILE: pkg/hostagent/port_darwin.go
  function forwardTCP (line 23) | func forwardTCP(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...
  type pseudoLoopbackForwarder (line 92) | type pseudoLoopbackForwarder struct
    method Serve (line 122) | func (plf *pseudoLoopbackForwarder) Serve() error {
    method forward (line 149) | func (plf *pseudoLoopbackForwarder) forward(ac *net.TCPConn) error {
    method Close (line 160) | func (plf *pseudoLoopbackForwarder) Close() error {
  function newPseudoLoopbackForwarder (line 98) | func newPseudoLoopbackForwarder(localPort int, unixSock string) (*pseudo...

FILE: pkg/hostagent/port_others.go
  function forwardTCP (line 14) | func forwardTCP(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...

FILE: pkg/hostagent/port_windows.go
  function forwardTCP (line 12) | func forwardTCP(ctx context.Context, sshConfig *ssh.SSHConfig, sshAddres...

FILE: pkg/hostagent/requirements.go
  method waitForRequirements (line 20) | func (a *HostAgent) waitForRequirements(label string, requirements []req...
  function prefixExportParam (line 82) | func prefixExportParam(script string, guestOS *limatype.OS) (string, err...
  method bashAvailable (line 108) | func (a *HostAgent) bashAvailable() bool {
  method waitForRequirement (line 112) | func (a *HostAgent) waitForRequirement(r requirement) error {
  type requirement (line 150) | type requirement struct
  method essentialRequirements (line 158) | func (a *HostAgent) essentialRequirements() []requirement {
  method optionalRequirements (line 225) | func (a *HostAgent) optionalRequirements() []requirement {
  method finalRequirements (line 270) | func (a *HostAgent) finalRequirements() []requirement {

FILE: pkg/hostagent/timesync.go
  constant timeSyncInterval (line 14) | timeSyncInterval     = 10 * time.Second
  constant timeSyncStartupDelay (line 15) | timeSyncStartupDelay = 5 * time.Second
  method startTimeSync (line 18) | func (a *HostAgent) startTimeSync(ctx context.Context) {
  method syncTimeOnce (line 48) | func (a *HostAgent) syncTimeOnce(ctx context.Context) {

FILE: pkg/httpclientutil/httpclientutil.go
  function Get (line 22) | func Get(ctx context.Context, c *http.Client, url string) (*http.Respons...
  function Head (line 38) | func Head(ctx context.Context, c *http.Client, url string) (*http.Respon...
  function Post (line 54) | func Post(ctx context.Context, c *http.Client, url string, body io.Reade...
  function readAtMost (line 70) | func readAtMost(r io.Reader, maxBytes int) ([]byte, error) {
  constant HTTPStatusErrorBodyMaxLength (line 86) | HTTPStatusErrorBodyMaxLength = 64 * 1024
  type HTTPStatusError (line 89) | type HTTPStatusError struct
    method Error (line 99) | func (e *HTTPStatusError) Error() string {
  function Successful (line 109) | func Successful(resp *http.Response) error {
  function NewHTTPClientWithDialFn (line 125) | func NewHTTPClientWithDialFn(dialFn func(ctx context.Context) (net.Conn,...

FILE: pkg/httpclientutil/httpclientutil_others.go
  function NewHTTPClientWithSocketPath (line 17) | func NewHTTPClientWithSocketPath(socketPath string) (*http.Client, error) {

FILE: pkg/httpclientutil/httpclientutil_windows.go
  function NewHTTPClientWithSocketPath (line 15) | func NewHTTPClientWithSocketPath(socketPath string) (*http.Client, error) {

FILE: pkg/httputil/httputil.go
  type ErrorJSON (line 7) | type ErrorJSON struct

FILE: pkg/identifiers/validate.go
  constant maxLength (line 42) | maxLength  = 76
  constant alphanum (line 43) | alphanum   = `[A-Za-z0-9]+`
  constant separators (line 44) | separators = `[._-]`
  function Validate (line 57) | func Validate(s string) error {
  function reGroup (line 72) | func reGroup(s string) string {
  function reAnchor (line 76) | func reAnchor(s string) string {

FILE: pkg/identifiers/validate_test.go
  function TestValidIdentifiers (line 34) | func TestValidIdentifiers(t *testing.T) {
  function TestInvalidIdentifiers (line 55) | func TestInvalidIdentifiers(t *testing.T) {

FILE: pkg/imgutil/manager.go
  type ImageDiskManager (line 14) | type ImageDiskManager interface

FILE: pkg/imgutil/nativeimgutil/asifutil/asif_darwin.go
  function NewASIF (line 21) | func NewASIF(path string, size int64) error {
  function NewAttachedASIF (line 40) | func NewAttachedASIF(path string, size int64) (string, *os.File, error) {
  function DetachASIF (line 59) | func DetachASIF(devicePath string) error {
  function ResizeASIF (line 67) | func ResizeASIF(path string, size int64) error {
  type AttachedDisk (line 75) | type AttachedDisk struct
  function parseDiskutilImageAttachOutput (line 83) | func parseDiskutilImageAttachOutput(xmlStr string) (*AttachedDisk, error) {
  function DiskutilImageAttachNoMount (line 130) | func DiskutilImageAttachNoMount(ctx context.Context, disk string) (*Atta...

FILE: pkg/imgutil/nativeimgutil/asifutil/asif_darwin_test.go
  function TestParseDiskutilImageAttachOutput (line 12) | func TestParseDiskutilImageAttachOutput(t *testing.T) {

FILE: pkg/imgutil/nativeimgutil/asifutil/asif_others.go
  function NewASIF (line 15) | func NewASIF(_ string, _ int64) error {
  function NewAttachedASIF (line 19) | func NewAttachedASIF(_ string, _ int64) (string, *os.File, error) {
  function DetachASIF (line 23) | func DetachASIF(_ string) error {
  function ResizeASIF (line 27) | func ResizeASIF(_ string, _ int64) error {

FILE: pkg/imgutil/nativeimgutil/fuzz_test.go
  function FuzzConvertToRaw (line 15) | func FuzzConvertToRaw(f *testing.F) {

FILE: pkg/imgutil/nativeimgutil/nativeimgutil.go
  constant sectorSize (line 35) | sectorSize = 512
  type NativeImageUtil (line 38) | type NativeImageUtil struct
    method CreateDisk (line 220) | func (n *NativeImageUtil) CreateDisk(_ context.Context, disk string, s...
    method Convert (line 235) | func (n *NativeImageUtil) Convert(_ context.Context, imageType image.T...
    method ResizeDisk (line 240) | func (n *NativeImageUtil) ResizeDisk(_ context.Context, disk string, s...
    method MakeSparse (line 246) | func (n *NativeImageUtil) MakeSparse(_ context.Context, f *os.File, of...
  function roundUp (line 41) | func roundUp(size int64) int64 {
  function convertTo (line 49) | func convertTo(destType image.Type, source, dest string, size *int64, al...
  function convertRawToRaw (line 169) | func convertRawToRaw(source, dest string, size *int64) error {
  function convertASIFToASIF (line 194) | func convertASIFToASIF(source, dest string, size *int64) error {
  function makeSparse (line 212) | func makeSparse(f *os.File, offset int64) error {

FILE: pkg/imgutil/nativeimgutil/nativeimgutil_test.go
  function TestRoundUp (line 18) | func TestRoundUp(t *testing.T) {
  function createImg (line 36) | func createImg(ctx context.Context, name, format, size string) error {
  function TestConvertToRaw (line 40) | func TestConvertToRaw(t *testing.T) {
  function assertFileEquals (line 100) | func assertFileEquals(t *testing.T, expected, actual string) {

FILE: pkg/imgutil/proxyimgutil/proxyimgutil.go
  type ImageDiskManager (line 21) | type ImageDiskManager struct
    method CreateDisk (line 35) | func (p *ImageDiskManager) CreateDisk(ctx context.Context, disk string...
    method ResizeDisk (line 47) | func (p *ImageDiskManager) ResizeDisk(ctx context.Context, disk string...
    method Convert (line 60) | func (p *ImageDiskManager) Convert(ctx context.Context, imageType imag...
    method MakeSparse (line 74) | func (p *ImageDiskManager) MakeSparse(ctx context.Context, f *os.File,...
  function NewDiskUtil (line 27) | func NewDiskUtil(_ context.Context) imgutil.ImageDiskManager {

FILE: pkg/instance/ansible.go
  function runAnsibleProvision (line 20) | func runAnsibleProvision(ctx context.Context, inst *limatype.Instance) e...
  function runAnsiblePlaybook (line 32) | func runAnsiblePlaybook(ctx context.Context, inst *limatype.Instance, pl...
  function createAnsibleInventory (line 46) | func createAnsibleInventory(inst *limatype.Instance) (string, error) {
  function getAnsibleEnvironment (line 69) | func getAnsibleEnvironment(inst *limatype.Instance) []string {

FILE: pkg/instance/clone.go
  function CloneOrRename (line 25) | func CloneOrRename(ctx context.Context, oldInst *limatype.Instance, newI...

FILE: pkg/instance/create.go
  function Create (line 24) | func Create(ctx context.Context, instName string, instConfig []byte, sav...

FILE: pkg/instance/delete.go
  function Delete (line 16) | func Delete(ctx context.Context, inst *limatype.Instance, force bool) er...
  function unregister (line 38) | func unregister(ctx context.Context, inst *limatype.Instance) error {

FILE: pkg/instance/hostname/hostname.go
  function FromInstName (line 11) | func FromInstName(instName string) string {

FILE: pkg/instance/hostname/hostname_test.go
  function TestFromInstName (line 14) | func TestFromInstName(t *testing.T) {

FILE: pkg/instance/restart.go
  constant launchHostAgentForeground (line 19) | launchHostAgentForeground = false
  function Restart (line 22) | func Restart(ctx context.Context, inst *limatype.Instance, showProgress ...
  function RestartForcibly (line 43) | func RestartForcibly(ctx context.Context, inst *limatype.Instance, showP...

FILE: pkg/instance/start.go
  constant DefaultWatchHostAgentEventsTimeout (line 41) | DefaultWatchHostAgentEventsTimeout = 10 * time.Minute
  type Prepared (line 43) | type Prepared struct
  function Prepare (line 50) | func Prepare(ctx context.Context, inst *limatype.Instance, guestAgent st...
  function StartWithPaths (line 168) | func StartWithPaths(ctx context.Context, inst *limatype.Instance, launch...
  function Start (line 286) | func Start(ctx context.Context, inst *limatype.Instance, launchHostAgent...
  function waitHostAgentStart (line 290) | func waitHostAgentStart(_ context.Context, haPIDPath, haStderrPath strin...
  function watchHostAgentEvents (line 304) | func watchHostAgentEvents(ctx context.Context, inst *limatype.Instance, ...
  function WithWatchHostAgentTimeout (line 395) | func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duratio...
  function WithLaunchingShell (line 403) | func WithLaunchingShell(ctx context.Context) context.Context {
  function isLaunchingShell (line 408) | func isLaunchingShell(ctx context.Context) bool {
  function watchHostAgentTimeout (line 415) | func watchHostAgentTimeout(ctx context.Context) time.Duration {
  function LimactlShellCmd (line 422) | func LimactlShellCmd(instName string) string {
  function ShowMessage (line 430) | func ShowMessage(inst *limatype.Instance) error {
  function prepareDisk (line 457) | func prepareDisk(ctx context.Context, inst *limatype.Instance) error {

FILE: pkg/instance/start_unix.go
  function execHostAgentForeground (line 20) | func execHostAgentForeground(limactl string, haCmd *exec.Cmd) error {

FILE: pkg/instance/start_windows.go
  function execHostAgentForeground (line 11) | func execHostAgentForeground(_ string, _ *exec.Cmd) error {

FILE: pkg/instance/stop.go
  function StopGracefully (line 25) | func StopGracefully(ctx context.Context, inst *limatype.Instance, isRest...
  function waitForHostAgentTermination (line 54) | func waitForHostAgentTermination(ctx context.Context, inst *limatype.Ins...
  function waitForInstanceShutdown (line 84) | func waitForInstanceShutdown(ctx context.Context, inst *limatype.Instanc...
  function StopForcibly (line 109) | func StopForcibly(inst *limatype.Instance) {

FILE: pkg/ioutilx/ioutilx.go
  function ReadAtMaximum (line 21) | func ReadAtMaximum(r io.Reader, n int64) ([]byte, error) {
  function FromUTF16le (line 38) | func FromUTF16le(r io.Reader) io.Reader {
  function FromUTF16leToString (line 44) | func FromUTF16leToString(r io.Reader) (string, error) {
  function WindowsSubsystemPath (line 53) | func WindowsSubsystemPath(ctx context.Context, orig string) (string, err...
  function WindowsSubsystemPathForLinux (line 62) | func WindowsSubsystemPathForLinux(ctx context.Context, orig, distro stri...

FILE: pkg/iso9660util/fuzz_test.go
  function FuzzIsISO9660 (line 14) | func FuzzIsISO9660(f *testing.F) {

FILE: pkg/iso9660util/iso9660util.go
  type Entry (line 17) | type Entry struct
  type WriteOptions (line 22) | type WriteOptions struct
  type WriteOpt (line 26) | type WriteOpt
  function WithJoliet (line 28) | func WithJoliet() WriteOpt {
  function Write (line 34) | func Write(isoPath, label string, layout []Entry, opts ...WriteOpt) error {
  function WriteFile (line 83) | func WriteFile(fs filesystem.FileSystem, pathStr string, r io.Reader) (i...
  function IsISO9660 (line 97) | func IsISO9660(imagePath string) (bool, error) {

FILE: pkg/iso9660util/joliet.go
  function writeJoliet (line 18) | func writeJoliet(isoPath, label string, layout []Entry) error {
  function writeJolietCommand (line 57) | func writeJolietCommand(isoPath, label, workDir string) ([]string, error) {

FILE: pkg/jsonschemautil/jsonschemautil.go
  function Validate (line 13) | func Validate(schemafile, instancefile string) error {

FILE: pkg/jsonschemautil/jsonschemautil_test.go
  function TestValidateValidInstance (line 12) | func TestValidateValidInstance(t *testing.T) {
  function TestValidateInvalidInstance (line 19) | func TestValidateInvalidInstance(t *testing.T) {

FILE: pkg/limactlutil/limactlutil.go
  function Path (line 19) | func Path() (string, error) {
  function Inspect (line 25) | func Inspect(ctx context.Context, limactl, instName string) (*limatype.I...

FILE: pkg/limainfo/limainfo.go
  type LimaInfo (line 27) | type LimaInfo struct
  type DriverExt (line 44) | type DriverExt struct
  type GuestAgent (line 48) | type GuestAgent struct
  function New (line 55) | func New(ctx context.Context) (*LimaInfo, error) {

FILE: pkg/limatmpl/abs.go
  method UseAbsLocators (line 20) | func (tmpl *Template) UseAbsLocators() error {
  method useAbsLocators (line 25) | func (tmpl *Template) useAbsLocators() error {
  function withVolume (line 75) | func withVolume(path string) (string, error) {
  function basePath (line 87) | func basePath(locator string) (string, error) {
  function absPath (line 105) | func absPath(locator, basePath string) (string, error) {

FILE: pkg/limatmpl/abs_test.go
  type useAbsLocatorsTestCase (line 16) | type useAbsLocatorsTestCase struct
  function TestUseAbsLocators (line 124) | func TestUseAbsLocators(t *testing.T) {
  function RunUseAbsLocatorTest (line 130) | func RunUseAbsLocatorTest(t *testing.T, tc useAbsLocatorsTestCase) {
  function TestBasePath (line 143) | func TestBasePath(t *testing.T) {
  function TestAbsPath (line 198) | func TestAbsPath(t *testing.T) {

FILE: pkg/limatmpl/embed.go
  method Embed (line 32) | func (tmpl *Template) Embed(ctx context.Context, embedAll, defaultBase b...
  method embedAllBases (line 47) | func (tmpl *Template) embedAllBases(ctx context.Context, embedAll, defau...
  method embedBase (line 110) | func (tmpl *Template) embedBase(ctx context.Context, baseLocator limatyp...
  method evalExprImpl (line 136) | func (tmpl *Template) evalExprImpl(prefix string, b []byte) error {
  method evalExpr (line 148) | func (tmpl *Template) evalExpr() error {
  method merge (line 159) | func (tmpl *Template) merge(base *Template) error {
  method mergeBase (line 170) | func (tmpl *Template) mergeBase(base *Template) error {
  constant mergeDocuments (line 211) | mergeDocuments = `
  function listFields (line 265) | func listFields(list string, dstIdx, srcIdx int, field string) (dst, src...
  method copyField (line 276) | func (tmpl *Template) copyField(dst, src string) {
  method copyListEntryField (line 285) | func (tmpl *Template) copyListEntryField(list string, dstIdx, srcIdx int...
  type commentType (line 289) | type commentType
  constant headComment (line 292) | headComment commentType = "head"
  constant lineComment (line 293) | lineComment commentType = "line"
  method copyComment (line 297) | func (tmpl *Template) copyComment(dst, src string, commentType commentTy...
  method copyComments (line 309) | func (tmpl *Template) copyComments(dst, src string, isMapElement bool) {
  method copyListEntryComments (line 316) | func (tmpl *Template) copyListEntryComments(list string, dstIdx, srcIdx ...
  method deleteListEntry (line 322) | func (tmpl *Template) deleteListEntry(list string, idx int) {
  method upgradeListEntryStringToMapField (line 327) | func (tmpl *Template) upgradeListEntryStringToMapField(list string, idx ...
  method combineListEntries (line 340) | func (tmpl *Template) combineListEntries() error {
  method combineAdditionalDisks (line 356) | func (tmpl *Template) combineAdditionalDisks() {
  method combineMounts (line 416) | func (tmpl *Template) combineMounts() {
  method combineNetworks (line 503) | func (tmpl *Template) combineNetworks() {
  function encodeScriptReason (line 565) | func encodeScriptReason(script string) string {
  constant base64ChunkLength (line 586) | base64ChunkLength = 76
  function binaryString (line 590) | func binaryString(s string) string {
  method updateScript (line 611) | func (tmpl *Template) updateScript(field string, idx int, newName, scrip...
  method embedAllScripts (line 625) | func (tmpl *Template) embedAllScripts(ctx context.Context, embedAll bool...

FILE: pkg/limatmpl/embed_test.go
  type embedTestCase (line 21) | type embedTestCase struct
  function TestEmbed (line 420) | func TestEmbed(t *testing.T) {
  function RunEmbedTest (line 434) | func RunEmbedTest(t *testing.T, tc embedTestCase) {
  function TestEncodeScriptReason (line 496) | func TestEncodeScriptReason(t *testing.T) {

FILE: pkg/limatmpl/github.go
  constant defaultFilename (line 19) | defaultFilename = ".lima.yaml"
  function transformGitHubURL (line 29) | func transformGitHubURL(ctx context.Context, input string) (string, erro...
  function githubUserContentURL (line 77) | func githubUserContentURL(org, repo, branch, filePath string) string {
  function getGitHubUserContent (line 81) | func getGitHubUserContent(ctx context.Context, org, repo, branch, filePa...
  function getGitHubDefaultBranch (line 92) | func getGitHubDefaultBranch(ctx context.Context, org, repo string) (stri...
  function resolveGitHubSymlink (line 138) | func resolveGitHubSymlink(ctx context.Context, org, repo, branch, filePa...
  function resolveGitHubRedirect (line 179) | func resolveGitHubRedirect(ctx context.Context, org, repo, defaultBranch...
  function validateGitHubRedirect (line 196) | func validateGitHubRedirect(body, org, origBranch, url string) (string, ...

FILE: pkg/limatmpl/locator.go
  constant yBytesLimit (line 30) | yBytesLimit = 4 * 1024 * 1024
  function Read (line 32) | func Read(ctx context.Context, name, locator string) (*Template, error) {
  function imageTemplate (line 190) | func imageTemplate(tmpl *Template, locator string) bool {
  function InstNameFromImageURL (line 239) | func InstNameFromImageURL(locator, imageArch string) string {
  function SeemsTemplateURL (line 285) | func SeemsTemplateURL(arg string) (isTemplate bool, templateName string) {
  function SeemsHTTPURL (line 300) | func SeemsHTTPURL(arg string) bool {
  function SeemsFileURL (line 312) | func SeemsFileURL(arg string) bool {
  function InstNameFromURL (line 320) | func InstNameFromURL(urlStr string) (string, error) {
  function InstNameFromYAMLPath (line 328) | func InstNameFromYAMLPath(yamlPath string) (string, error) {
  function transformCustomURL (line 339) | func transformCustomURL(ctx context.Context, locator string) (string, er...
  function TransformCustomURL (line 391) | func TransformCustomURL(ctx context.Context, locator string) (string, er...

FILE: pkg/limatmpl/locator_test.go
  function TestInstNameFromImageURL (line 17) | func TestInstNameFromImageURL(t *testing.T) {
  function TestReadImageURLRespectsName (line 66) | func TestReadImageURLRespectsName(t *testing.T) {
  function TestSeemsTemplateURL (line 81) | func TestSeemsTemplateURL(t *testing.T) {
  function TestSeemsHTTPURL (line 102) | func TestSeemsHTTPURL(t *testing.T) {
  function TestSeemsFileURL (line 124) | func TestSeemsFileURL(t *testing.T) {
  function TestRead (line 143) | func TestRead(t *testing.T) {

FILE: pkg/limatmpl/template.go
  type Template (line 13) | type Template struct
    method ClearOnError (line 24) | func (tmpl *Template) ClearOnError(err error) error {
    method Unmarshal (line 35) | func (tmpl *Template) Unmarshal() error {

FILE: pkg/limatype/dirnames/dirnames.go
  constant DotLima (line 18) | DotLima = ".lima"
  function LimaDir (line 25) | func LimaDir() (string, error) {
  function LimaConfigDir (line 45) | func LimaConfigDir() (string, error) {
  function LimaNetworksDir (line 54) | func LimaNetworksDir() (string, error) {
  function LimaDisksDir (line 63) | func LimaDisksDir() (string, error) {
  function LimaTemplatesDir (line 72) | func LimaTemplatesDir() (string, error) {
  function InstanceDir (line 82) | func InstanceDir(name string) (string, error) {
  function ValidateInstName (line 96) | func ValidateInstName(name string) error {

FILE: pkg/limatype/filenames/filenames.go
  constant CacheDir (line 13) | CacheDir     = "_cache"
  constant ConfigDir (line 14) | ConfigDir    = "_config"
  constant DisksDir (line 15) | DisksDir     = "_disks"
  constant NetworksDir (line 16) | NetworksDir  = "_networks"
  constant TemplatesDir (line 17) | TemplatesDir = "_templates"
  constant UserPrivateKey (line 23) | UserPrivateKey = "user"
  constant UserPublicKey (line 24) | UserPublicKey  = UserPrivateKey + ".pub"
  constant NetworksConfig (line 25) | NetworksConfig = "networks.yaml"
  constant Default (line 26) | Default        = "default.yaml"
  constant Override (line 27) | Override       = "override.yaml"
  constant Base (line 28) | Base           = "base.yaml"
  constant LimaYAML (line 34) | LimaYAML                = "lima.yaml"
  constant LimaVersion (line 35) | LimaVersion             = "lima-version"
  constant CIDataISO (line 36) | CIDataISO               = "cidata.iso"
  constant CIDataISODir (line 37) | CIDataISODir            = "cidata"
  constant CloudConfig (line 38) | CloudConfig             = "cloud-config.yaml"
  constant Image (line 39) | Image                   = "image"
  constant ImageIPSW (line 40) | ImageIPSW               = "image.ipsw"
  constant Disk (line 41) | Disk                    = "disk"
  constant ISO (line 42) | ISO                     = "iso"
  constant BaseDiskLegacy (line 43) | BaseDiskLegacy          = "basedisk"
  constant DiffDiskLegacy (line 44) | DiffDiskLegacy          = "diffdisk"
  constant Kernel (line 45) | Kernel                  = "kernel"
  constant KernelCmdline (line 46) | KernelCmdline           = "kernel.cmdline"
  constant Initrd (line 47) | Initrd                  = "initrd"
  constant QMPSock (line 48) | QMPSock                 = "qmp.sock"
  constant SerialLog (line 49) | SerialLog               = "serial.log"
  constant SerialSock (line 50) | SerialSock              = "serial.sock"
  constant SerialPCILog (line 51) | SerialPCILog            = "serialp.log"
  constant SerialPCISock (line 52) | SerialPCISock           = "serialp.sock"
  constant SerialVirtioLog (line 53) | SerialVirtioLog         = "serialv.log"
  constant SerialVirtioSock (line 54) | SerialVirtioSock        = "serialv.sock"
  constant SSHSock (line 55) | SSHSock                 = "ssh.sock"
  constant SSHConfig (line 56) | SSHConfig               = "ssh.config"
  constant VhostSock (line 57) | VhostSock               = "virtiofsd-%d.sock"
  constant VNCDisplayFile (line 58) | VNCDisplayFile          = "vncdisplay"
  constant VNCPasswordFile (line 59) | VNCPasswordFile         = "vncpassword"
  constant GuestAgentSock (line 60) | GuestAgentSock          = "ga.sock"
  constant VirtioPort (line 61) | VirtioPort              = "io.lima-vm.guest_agent.0"
  constant HostAgentPID (line 62) | HostAgentPID            = "ha.pid"
  constant HostAgentSock (line 63) | HostAgentSock           = "ha.sock"
  constant HostAgentStdoutLog (line 64) | HostAgentStdoutLog      = "ha.stdout.log"
  constant HostAgentStderrLog (line 65) | HostAgentStderrLog      = "ha.stderr.log"
  constant ExternalDriverStderrLog (line 66) | ExternalDriverStderrLog = "driver.stderr.log"
  constant VzIdentifier (line 67) | VzIdentifier            = "vz-identifier"
  constant VzHwModel (line 68) | VzHwModel               = "vz-hwmodel"
  constant VzAux (line 69) | VzAux                   = "vz-aux"
  constant VzEfi (line 70) | VzEfi                   = "vz-efi"
  constant QemuEfiCodeFD (line 71) | QemuEfiCodeFD           = "qemu-efi-code.fd"
  constant QemuEfiFullFD (line 72) | QemuEfiFullFD           = "qemu-efi-full.fd"
  constant AnsibleInventoryYAML (line 73) | AnsibleInventoryYAML    = "ansible-inventory.yaml"
  constant SocketDir (line 76) | SocketDir = "sock"
  constant MntDir (line 77) | MntDir    = "mnt"
  constant Protected (line 79) | Protected = "protected"
  constant DataDisk (line 85) | DataDisk = "datadisk"
  constant InUseBy (line 86) | InUseBy  = "in_use_by"
  constant LongestSock (line 97) | LongestSock = SSHSock + ".1234567890123456"
  function PIDFile (line 99) | func PIDFile(name string) string {

FILE: pkg/limatype/lima_instance.go
  constant StatusUnknown (line 18) | StatusUnknown       Status = ""
  constant StatusUninitialized (line 19) | StatusUninitialized Status = "Uninitialized"
  constant StatusInstalling (line 20) | StatusInstalling    Status = "Installing"
  constant StatusBroken (line 21) | StatusBroken        Status = "Broken"
  constant StatusStopped (line 22) | StatusStopped       Status = "Stopped"
  constant StatusRunning (line 23) | StatusRunning       Status = "Running"
  type Instance (line 26) | type Instance struct
    method Protect (line 55) | func (inst *Instance) Protect() error {
    method Unprotect (line 68) | func (inst *Instance) Unprotect() error {
    method MarshalJSON (line 77) | func (inst *Instance) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 94) | func (inst *Instance) UnmarshalJSON(data []byte) error {

FILE: pkg/limatype/lima_yaml.go
  type LimaYAML (line 16) | type LimaYAML struct
  type BaseTemplates (line 63) | type BaseTemplates
  type LocatorWithDigest (line 65) | type LocatorWithDigest struct
  constant LINUX (line 80) | LINUX   OS = "Linux"
  constant DARWIN (line 81) | DARWIN  OS = "Darwin"
  constant FREEBSD (line 82) | FREEBSD OS = "FreeBSD"
  constant X8664 (line 84) | X8664   Arch = "x86_64"
  constant AARCH64 (line 85) | AARCH64 Arch = "aarch64"
  constant ARMV7L (line 86) | ARMV7L  Arch = "armv7l"
  constant PPC64LE (line 87) | PPC64LE Arch = "ppc64le"
  constant RISCV64 (line 88) | RISCV64 Arch = "riscv64"
  constant S390X (line 89) | S390X   Arch = "s390x"
  constant REVSSHFS (line 91) | REVSSHFS MountType = "reverse-sshfs"
  constant NINEP (line 92) | NINEP    MountType = "9p"
  constant VIRTIOFS (line 93) | VIRTIOFS MountType = "virtiofs"
  constant WSLMount (line 94) | WSLMount MountType = "wsl2"
  constant QEMU (line 96) | QEMU VMType = "qemu"
  constant VZ (line 97) | VZ   VMType = "vz"
  constant WSL2 (line 98) | WSL2 VMType = "wsl2"
  type User (line 108) | type User struct
  type VMOpts (line 116) | type VMOpts
  type QEMUOpts (line 118) | type QEMUOpts struct
  type VZOpts (line 123) | type VZOpts struct
  type Rosetta (line 128) | type Rosetta struct
  type File (line 133) | type File struct
  type FileWithVMType (line 139) | type FileWithVMType struct
  type Kernel (line 144) | type Kernel struct
  type Image (line 149) | type Image struct
  type Disk (line 155) | type Disk struct
  type Mount (line 162) | type Mount struct
  constant SFTPDriverBuiltin (line 174) | SFTPDriverBuiltin           = "builtin"
  constant SFTPDriverOpenSSHSFTPServer (line 175) | SFTPDriverOpenSSHSFTPServer = "openssh-sftp-server"
  type SSHFS (line 178) | type SSHFS struct
  type NineP (line 184) | type NineP struct
  type Virtiofs (line 191) | type Virtiofs struct
  type SSH (line 195) | type SSH struct
  type Firmware (line 207) | type Firmware struct
  type Audio (line 217) | type Audio struct
  type VNCOptions (line 222) | type VNCOptions struct
  type Video (line 226) | type Video struct
  constant ProvisionModeSystem (line 235) | ProvisionModeSystem     ProvisionMode = "system"
  constant ProvisionModeUser (line 236) | ProvisionModeUser       ProvisionMode = "user"
  constant ProvisionModeBoot (line 237) | ProvisionModeBoot       ProvisionMode = "boot"
  constant ProvisionModeDependency (line 238) | ProvisionModeDependency ProvisionMode = "dependency"
  constant ProvisionModeAnsible (line 239) | ProvisionModeAnsible    ProvisionMode = "ansible"
  constant ProvisionModeData (line 240) | ProvisionModeData       ProvisionMode = "data"
  constant ProvisionModeYQ (line 241) | ProvisionModeYQ         ProvisionMode = "yq"
  type Provision (line 244) | type Provision struct
  type ProvisionData (line 257) | type ProvisionData struct
  type Containerd (line 265) | type Containerd struct
  constant ProbeModeReadiness (line 274) | ProbeModeReadiness ProbeMode = "readiness"
  type Probe (line 277) | type Probe struct
  constant ProtoTCP (line 288) | ProtoTCP Proto = "tcp"
  constant ProtoUDP (line 289) | ProtoUDP Proto = "udp"
  constant ProtoAny (line 290) | ProtoAny Proto = "any"
  type PortForward (line 293) | type PortForward struct
  type CopyToHost (line 309) | type CopyToHost struct
  type Network (line 315) | type Network struct
  type HostResolver (line 328) | type HostResolver struct
  type CACertificates (line 334) | type CACertificates struct
  type PreConfiguredDriverPayload (line 340) | type PreConfiguredDriverPayload struct
  function NewOS (line 345) | func NewOS(osname string) OS {
  function Goarm (line 357) | func Goarm() int {
  function NewArch (line 373) | func NewArch(arch string) Arch {
  function IsNativeArch (line 398) | func IsNativeArch(arch Arch) bool {
  function DefaultDriver (line 408) | func DefaultDriver() VMType {
  function DefaultNonNativeArchDriver (line 419) | func DefaultNonNativeArchDriver() VMType {

FILE: pkg/limayaml/defaults.go
  constant Default9pSecurityModel (line 45) | Default9pSecurityModel   string = "none"
  constant Default9pProtocolVersion (line 46) | Default9pProtocolVersion string = "9p2000.L"
  constant Default9pMsize (line 47) | Default9pMsize           string = "128KiB"
  constant Default9pCacheForRO (line 48) | Default9pCacheForRO      string = "fscache"
  constant Default9pCacheForRW (line 49) | Default9pCacheForRW      string = "mmap"
  constant DefaultVirtiofsQueueSize (line 51) | DefaultVirtiofsQueueSize int = 1024
  type ContainerdYAML (line 64) | type ContainerdYAML struct
  function defaultContainerdArchives (line 68) | func defaultContainerdArchives() []limatype.File {
  function FirstUsernetIndex (line 78) | func FirstUsernetIndex(l *limatype.LimaYAML) int {
  function MACAddress (line 82) | func MACAddress(uniqueID string) string {
  function MountTag (line 97) | func MountTag(location, mountPoint string) string {
  function defaultCPUs (line 102) | func defaultCPUs() int {
  function defaultMemory (line 110) | func defaultMemory() uint64 {
  function defaultMemoryAsString (line 118) | func defaultMemoryAsString() string {
  function defaultDiskSizeAsString (line 122) | func defaultDiskSizeAsString() string {
  function defaultGuestInstallPrefix (line 127) | func defaultGuestInstallPrefix() string {
  function FillDefault (line 145) | func FillDefault(ctx context.Context, y, d, o *limatype.LimaYAML, filePa...
  function ExistingLimaVersion (line 844) | func ExistingLimaVersion(instDir string) string {
  function fixUpForPlainMode (line 859) | func fixUpForPlainMode(y *limatype.LimaYAML) {
  function deleteNonStaticPortForwards (line 871) | func deleteNonStaticPortForwards(portForwards *[]limatype.PortForward) {
  function executeGuestTemplate (line 881) | func executeGuestTemplate(format, instDir string, user limatype.User, pa...
  function executeHostTemplate (line 902) | func executeHostTemplate(format, instDir string, param map[string]string...
  function FillPortForwardDefaults (line 935) | func FillPortForwardDefaults(rule *limatype.PortForward, instDir string,...
  function FillCopyToHostDefaults (line 987) | func FillCopyToHostDefaults(rule *limatype.CopyToHost, instDir string, u...
  function IsExistingInstanceDir (line 1004) | func IsExistingInstanceDir(dir string) bool {
  function ResolveOS (line 1019) | func ResolveOS(s *string) limatype.OS {
  function ResolveArch (line 1026) | func ResolveArch(s *string) limatype.Arch {
  function unique (line 1033) | func unique(s []string) []string {

FILE: pkg/limayaml/defaults_test.go
  function TestFillDefault (line 30) | func TestFillDefault(t *testing.T) {
  function TestContainerdDefault (line 724) | func TestContainerdDefault(t *testing.T) {
  function TestStaticPortForwarding (line 729) | func TestStaticPortForwarding(t *testing.T) {
  function TestMountTag (line 846) | func TestMountTag(t *testing.T) {
  function TestMountTagUniqueness (line 868) | func TestMountTagUniqueness(t *testing.T) {
  function TestMountTagDuplicateLocation (line 884) | func TestMountTagDuplicateLocation(t *testing.T) {

FILE: pkg/limayaml/defaults_unix.go
  function hostTimeZone (line 19) | func hostTimeZone() string {
  function extractTZFromPath (line 42) | func extractTZFromPath(zoneinfoFile string) (string, error) {

FILE: pkg/limayaml/defaults_unix_test.go
  function TestExtractTimezoneFromPath (line 16) | func TestExtractTimezoneFromPath(t *testing.T) {

FILE: pkg/limayaml/defaults_windows.go
  function hostTimeZone (line 8) | func hostTimeZone() string {

FILE: pkg/limayaml/limayaml_test.go
  function dumpJSON (line 19) | func dumpJSON(t *testing.T, d any) string {
  constant emptyYAML (line 25) | emptyYAML = "{}\n"
  function TestEmptyYAML (line 27) | func TestEmptyYAML(t *testing.T) {
  constant defaultYAML (line 35) | defaultYAML = "{}\n"
  function TestDefaultYAML (line 37) | func TestDefaultYAML(t *testing.T) {

FILE: pkg/limayaml/load.go
  function Load (line 23) | func Load(ctx context.Context, b []byte, filePath string) (*limatype.Lim...
  function LoadWithWarnings (line 30) | func LoadWithWarnings(ctx context.Context, b []byte, filePath string) (*...
  function load (line 34) | func load(ctx context.Context, b []byte, filePath string, warn bool) (*l...

FILE: pkg/limayaml/load_test.go
  function TestLoadEmpty (line 12) | func TestLoadEmpty(t *testing.T) {
  function TestLoadError (line 17) | func TestLoadError(t *testing.T) {
  function TestLoadDiskString (line 37) | func TestLoadDiskString(t *testing.T) {
  function TestLoadDiskStruct (line 51) | func TestLoadDiskStruct(t *testing.T) {

FILE: pkg/limayaml/marshal.go
  constant documentStart (line 17) | documentStart = "---\n"
  constant documentEnd (line 18) | documentEnd   = "...\n"
  function Marshal (line 22) | func Marshal(y *limatype.LimaYAML, stream bool) ([]byte, error) {
  function unmarshalDisk (line 34) | func unmarshalDisk(dst *limatype.Disk, b []byte) error {
  function unmarshalBaseTemplates (line 44) | func unmarshalBaseTemplates(dst *limatype.BaseTemplates, b []byte) error {
  function unmarshalLocatorWithDigest (line 54) | func unmarshalLocatorWithDigest(dst *limatype.LocatorWithDigest, b []byt...
  function Unmarshal (line 63) | func Unmarshal(data []byte, y *limatype.LimaYAML, comment string) error {
  function Convert (line 88) | func Convert(x, y any, comment string) error {

FILE: pkg/limayaml/marshal_test.go
  function dumpYAML (line 18) | func dumpYAML(t *testing.T, d any) string {
  function TestMarshalEmpty (line 24) | func TestMarshalEmpty(t *testing.T) {
  function TestMarshalTilde (line 29) | func TestMarshalTilde(t *testing.T) {
  type Opts (line 52) | type Opts struct
  function TestConvert (line 63) | func TestConvert(t *testing.T) {
  function TestVMOpts (line 76) | func TestVMOpts(t *testing.T) {
  function TestQEMUOpts (line 89) | func TestQEMUOpts(t *testing.T) {
  function TestVZOpts (line 106) | func TestVZOpts(t *testing.T) {
  function TestVMOptsNull (line 125) | func TestVMOptsNull(t *testing.T) {
  type FormatData (line 143) | type FormatData struct
  function TestVZOptsRosettaMessage (line 147) | func TestVZOptsRosettaMessage(t *testing.T) {

FILE: pkg/limayaml/validate.go
  function Validate (line 34) | func Validate(y *limatype.LimaYAML, warn bool) error {
  function validateFileObject (line 423) | func validateFileObject(f limatype.File, fieldName string) error {
  function validateNetwork (line 442) | func validateNetwork(y *limatype.LimaYAML) error {
  function validateParamIsUsed (line 518) | func validateParamIsUsed(y *limatype.LimaYAML) error {
  function validatePort (line 578) | func validatePort(field string, port int) error {
  function warnExperimental (line 592) | func warnExperimental(y *limatype.LimaYAML) {
  function ValidateAgainstLatestConfig (line 613) | func ValidateAgainstLatestConfig(ctx context.Context, yNew, yLatest []by...

FILE: pkg/limayaml/validate_test.go
  function TestValidateEmpty (line 16) | func TestValidateEmpty(t *testing.T) {
  function TestValidateMinimumLimaVersion (line 23) | func TestValidateMinimumLimaVersion(t *testing.T) {
  function TestValidateDigest (line 77) | func TestValidateDigest(t *testing.T) {
  function TestValidateProbes (line 92) | func TestValidateProbes(t *testing.T) {
  function TestValidateProvisionMode (line 117) | func TestValidateProvisionMode(t *testing.T) {
  function TestValidateProvisionData (line 149) | func TestValidateProvisionData(t *testing.T) {
  function TestValidateProvisionYQ (line 173) | func TestValidateProvisionYQ(t *testing.T) {
  function TestValidateAdditionalDisks (line 212) | func TestValidateAdditionalDisks(t *testing.T) {
  function TestValidateParamName (line 237) | func TestValidateParamName(t *testing.T) {
  function TestValidateParamValue (line 268) | func TestValidateParamValue(t *testing.T) {
  function TestValidateParamIsUsed (line 298) | func TestValidateParamIsUsed(t *testing.T) {
  function TestValidateMultipleErrors (line 351) | func TestValidateMultipleErrors(t *testing.T) {
  function TestValidateAgainstLatestConfig (line 379) | func TestValidateAgainstLatestConfig(t *testing.T) {

FILE: pkg/limayaml/validate_unix_test.go
  function TestValidateMounts (line 14) | func TestValidateMounts(t *testing.T) {

FILE: pkg/localpathutil/localpathutil.go
  function IsTildePath (line 16) | func IsTildePath(path string) bool {
  function Expand (line 24) | func Expand(orig string) (string, error) {

FILE: pkg/lockutil/lockutil_test.go
  constant parallel (line 17) | parallel = 20
  function TestWithDirLock (line 19) | func TestWithDirLock(t *testing.T) {

FILE: pkg/lockutil/lockutil_unix.go
  function WithDirLock (line 33) | func WithDirLock(dir string, fn func() error) error {
  function Flock (line 50) | func Flock(f *os.File, flags int) error {

FILE: pkg/lockutil/lockutil_windows.go
  constant flagLockfileExclusiveLock (line 40) | flagLockfileExclusiveLock = 0x00000002
  function WithDirLock (line 42) | func WithDirLock(dir string, fn func() error) error {
  function lockFileEx (line 73) | func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uin...
  function unlockFileEx (line 81) | func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ...

FILE: pkg/logrusutil/logrusutil.go
  constant epsilon (line 14) | epsilon = 1 * time.Second
  function PropagateJSON (line 19) | func PropagateJSON(logger *logrus.Logger, jsonLine []byte, header string...
  type JSON (line 66) | type JSON struct

FILE: pkg/logrusutil/logrusutil_test.go
  function TestPropagateJSON (line 15) | func TestPropagateJSON(t *testing.T) {

FILE: pkg/mcp/msi/filesystem.go
  type ListDirectoryParams (line 23) | type ListDirectoryParams struct
  type ListDirectoryResultEntry (line 28) | type ListDirectoryResultEntry struct
  type ListDirectoryResult (line 36) | type ListDirectoryResult struct
  type ReadFileResult (line 45) | type ReadFileResult struct
  type ReadFileParams (line 49) | type ReadFileParams struct
  type WriteFileResult (line 60) | type WriteFileResult struct
  type WriteFileParams (line 64) | type WriteFileParams struct
  type GlobParams (line 74) | type GlobParams struct
  type GlobResult (line 80) | type GlobResult struct
  type SearchFileContentParams (line 89) | type SearchFileContentParams struct
  type SearchFileContentResult (line 95) | type SearchFileContentResult struct

FILE: pkg/mcp/msi/shell.go
  type RunShellCommandParams (line 18) | type RunShellCommandParams struct
  type RunShellCommandResult (line 24) | type RunShellCommandResult struct

FILE: pkg/mcp/toolset/filesystem.go
  method ListDirectory (line 20) | func (ts *ToolSet) ListDirectory(ctx context.Context,
  method ReadFile (line 49) | func (ts *ToolSet) ReadFile(_ context.Context,
  method WriteFile (line 81) | func (ts *ToolSet) WriteFile(_ context.Context,
  method Glob (line 114) | func (ts *ToolSet) Glob(_ context.Context,
  method SearchFileContent (line 149) | func (ts *ToolSet) SearchFileContent(ctx context.Context,

FILE: pkg/mcp/toolset/shell.go
  method RunShellCommand (line 18) | func (ts *ToolSet) RunShellCommand(ctx context.Context,

FILE: pkg/mcp/toolset/toolset.go
  function New (line 26) | func New(limactl string) (*ToolSet, error) {
  type ToolSet (line 33) | type ToolSet struct
    method RegisterInstance (line 70) | func (ts *ToolSet) RegisterInstance(ctx context.Context, inst *limatyp...
    method RegisterServer (line 84) | func (ts *ToolSet) RegisterServer(server *mcp.Server) error {
    method Close (line 94) | func (ts *ToolSet) Close() error {
    method TranslateHostPath (line 105) | func (ts *ToolSet) TranslateHostPath(hostPath string) (string, error) {
  function newSFTPClient (line 42) | func newSFTPClient(ctx context.Context, inst *limatype.Instance) (*sftp....

FILE: pkg/must/must.go
  function Must (line 6) | func Must[T any](obj T, err error) T {

FILE: pkg/networks/commands.go
  constant SocketVMNet (line 18) | SocketVMNet = "socket_vmnet"
  method Check (line 24) | func (c *Config) Check(name string) error {
  method Usernet (line 32) | func (c *Config) Usernet(name string) (bool, error) {
  method DaemonPath (line 40) | func (c *Config) DaemonPath(daemon string) (string, error) {
  method IsDaemonInstalled (line 50) | func (c *Config) IsDaemonInstalled(daemon string) (bool, error) {
  method Sock (line 68) | func (c *Config) Sock(name string) string {
  method PIDFile (line 72) | func (c *Config) PIDFile(name, daemon string) string {
  method LogFile (line 76) | func (c *Config) LogFile(name, daemon, stream string) string {
  method User (line 81) | func (c *Config) User(daemon string) (osutil.User, error) {
  method MkdirCmd (line 94) | func (c *Config) MkdirCmd() string {
  method StartCmd (line 98) | func (c *Config) StartCmd(name, daemon string) string {
  method StopCmd (line 125) | func (c *Config) StopCmd(name, daemon string) string {

FILE: pkg/networks/commands_darwin_test.go
  function TestSock (line 12) | func TestSock(t *testing.T) {
  function TestPIDFile (line 20) | func TestPIDFile(t *testing.T) {

FILE: pkg/networks/commands_test.go
  function TestCheck (line 16) | func TestCheck(t *testing.T) {
  function TestLogFile (line 28) | func TestLogFile(t *testing.T) {
  function TestUser (line 38) | func TestUser(t *testing.T) {
  function TestMkdirCmd (line 67) | func TestMkdirCmd(t *testing.T) {
  function TestStartCmd (line 75) | func TestStartCmd(t *testing.T) {
  function TestStopCmd (line 96) | func TestStopCmd(t *testing.T) {

FILE: pkg/networks/config.go
  type defaultConfigTemplateArgs (line 26) | type defaultConfigTemplateArgs struct
  function defaultConfigBytes (line 30) | func defaultConfigBytes() ([]byte, error) {
  function fillDefaults (line 58) | func fillDefaults(cfg Config) (Config, error) {
  function DefaultConfig (line 78) | func DefaultConfig() (Config, error) {
  function ConfigFile (line 97) | func ConfigFile() (string, error) {
  function loadCache (line 106) | func loadCache() {
  function LoadConfig (line 158) | func LoadConfig() (Config, error) {
  function Sock (line 164) | func Sock(name string) (string, error) {
  function IsUsernet (line 180) | func IsUsernet(name string) bool {

FILE: pkg/networks/config_test.go
  function TestFillDefault (line 13) | func TestFillDefault(t *testing.T) {
  function TestFillDefaultWithV2 (line 25) | func TestFillDefaultWithV2(t *testing.T) {
  function TestFillDefaultWithV2AndGateway (line 40) | func TestFillDefaultWithV2AndGateway(t *testing.T) {

FILE: pkg/networks/const.go
  constant SlirpNICName (line 7) | SlirpNICName = "eth0"
  constant SlirpNetwork (line 9) | SlirpNetwork   = "192.168.5.0/24"
  constant SlirpGateway (line 10) | SlirpGateway   = "192.168.5.2"
  constant SlirpIPAddress (line 11) | SlirpIPAddress = "192.168.5.15"

FILE: pkg/networks/networks.go
  type Config (line 8) | type Config struct
  type Paths (line 14) | type Paths struct
  constant ModeUserV2 (line 21) | ModeUserV2  = "user-v2"
  constant ModeHost (line 22) | ModeHost    = "host"
  constant ModeShared (line 23) | ModeShared  = "shared"
  constant ModeBridged (line 24) | ModeBridged = "bridged"
  type Network (line 34) | type Network struct

FILE: pkg/networks/reconcile/reconcile.go
  function Reconcile (line 27) | func Reconcile(ctx context.Context, newInst string) error {
  function sudo (line 71) | func sudo(ctx context.Context, user, group, command string) error {
  function makeVarRun (line 86) | func makeVarRun(ctx context.Context, cfg *networks.Config) error {
  function startDaemon (line 115) | func startDaemon(ctx context.Context, cfg *networks.Config, name, daemon...
  function validateConfig (line 168) | func validateConfig(ctx context.Context, cfg *networks.Config) error {
  function startNetwork (line 179) | func startNetwork(ctx context.Context, cfg *networks.Config, name string...
  function stopNetwork (line 223) | func stopNetwork(ctx context.Context, cfg *networks.Config, name string)...

FILE: pkg/networks/sudoers.go
  function Sudoers (line 18) | func Sudoers() (string, error) {
  method passwordLessSudo (line 59) | func (c *Config) passwordLessSudo(ctx context.Context) error {
  method VerifySudoAccess (line 85) | func (c *Config) VerifySudoAccess(ctx context.Context, sudoersFile strin...

FILE: pkg/networks/usernet/client.go
  type Client (line 26) | type Client struct
    method ConfigureDriver (line 35) | func (c *Client) ConfigureDriver(ctx context.Context, inst *limatype.I...
    method UnExposeSSH (line 56) | func (c *Client) UnExposeSSH(sshPort int) error {
    method AddDNSHosts (line 63) | func (c *Client) AddDNSHosts(hosts map[string]string) error {
    method ResolveAndForwardSSH (line 75) | func (c *Client) ResolveAndForwardSSH(ipAddr string, sshPort int) error {
    method ResolveIPAddress (line 87) | func (c *Client) ResolveIPAddress(ctx context.Context, vmMacAddr strin...
    method Leases (line 117) | func (c *Client) Leases(ctx context.Context) (map[string]string, error) {
    method WaitOpeningSSHPort (line 133) | func (c *Client) WaitOpeningSSHPort(ctx context.Context, inst *limatyp...
  function NewClientByName (line 156) | func NewClientByName(nwName string) *Client {
  function NewClient (line 168) | func NewClient(endpointSock string, subnet net.IP) *Client {
  function create (line 172) | func create(sock string, subnet net.IP, base string) *Client {

FILE: pkg/networks/usernet/config.go
  constant FDSock (line 21) | FDSock       = "fd"
  constant QEMUSock (line 22) | QEMUSock     = "qemu"
  constant EndpointSock (line 23) | EndpointSock = "ep"
  function Sock (line 27) | func Sock(name string, sockType SockType) (string, error) {
  function SockWithDirectory (line 36) | func SockWithDirectory(dir, name string, sockType SockType) (string, err...
  function PIDFile (line 49) | func PIDFile(name string) (string, error) {
  function SubnetCIDR (line 58) | func SubnetCIDR(name string) (*net.IPNet, error) {
  function Subnet (line 75) | func Subnet(name string) (net.IP, error) {
  function GatewayIP (line 92) | func GatewayIP(subnet net.IP) string {
  function DNSIP (line 97) | func DNSIP(subnet net.IP) string {
  function Leases (line 102) | func Leases(name string) (string, error) {
  function netmaskToCidr (line 115) | func netmaskToCidr(baseIP, netMask net.IP) (net.IP, *net.IPNet, error) {

FILE: pkg/networks/usernet/config_test.go
  function TestUsernetConfig (line 15) | func TestUsernetConfig(t *testing.T) {

FILE: pkg/networks/usernet/dnshosts/dnshosts.go
  function ExtractZones (line 38) | func ExtractZones(hosts hostMap) []types.Zone {
  type hostMap (line 70) | type hostMap
    method hostIP (line 72) | func (z hostMap) hostIP(host string) net.IP {
  type zoneHost (line 91) | type zoneHost
    method name (line 93) | func (z zoneHost) name() string {
    method recordName (line 101) | func (z zoneHost) recordName() string {
    method dotIndex (line 109) | func (z zoneHost) dotIndex() int {

FILE: pkg/networks/usernet/dnshosts/dnshosts_test.go
  function Test_hostsMapIP (line 41) | func Test_hostsMapIP(t *testing.T) {
  function Test_zoneHost (line 71) | func Test_zoneHost(t *testing.T) {
  function TestExtractZones (line 101) | func TestExtractZones(t *testing.T) {

FILE: pkg/networks/usernet/gvproxy.go
  type GVisorNetstackOpts (line 27) | type GVisorNetstackOpts struct
  constant gatewayMacAddr (line 43) | gatewayMacAddr = "5a:94:ef:e4:0c:dd"
  function StartGVisorNetstack (line 45) | func StartGVisorNetstack(ctx context.Context, gVisorOpts *GVisorNetstack...
  function run (line 97) | func run(ctx context.Context, g *errgroup.Group, configuration *types.Co...
  function listenQEMU (line 125) | func listenQEMU(ctx context.Context, vn *virtualnetwork.VirtualNetwork) ...
  function listenFD (line 166) | func listenFD(ctx context.Context, vn *virtualnetwork.VirtualNetwork) er...
  function httpServe (line 222) | func httpServe(ctx context.Context, g *errgroup.Group, ln net.Listener, ...
  function muxWithExtension (line 244) | func muxWithExtension(n *virtualnetwork.VirtualNetwork) *http.ServeMux {
  function searchDomains (line 296) | func searchDomains() []string {
  function resolveSearchDomain (line 303) | func resolveSearchDomain(file string) []string {

FILE: pkg/networks/usernet/gvproxy_test.go
  function TestSearchDomain (line 15) | func TestSearchDomain(t *testing.T) {
  function createResolveFile (line 39) | func createResolveFile(t *testing.T, file, content string) {

FILE: pkg/networks/usernet/recoincile.go
  function Start (line 29) | func Start(ctx context.Context, name string) error {
  function Stop (line 130) | func Stop(ctx context.Context, name string) error {
  function mapToCliString (line 171) | func mapToCliString(m map[string]string) string {
  function readLeases (line 179) | func readLeases(name string) (map[string]string, error) {
  function writeLeases (line 197) | func writeLeases(ctx context.Context, nwName string) error {

FILE: pkg/networks/usernet/udpfileconn.go
  type UDPFileConn (line 12) | type UDPFileConn struct
    method Read (line 16) | func (conn *UDPFileConn) Read(b []byte) (n int, err error) {

FILE: pkg/networks/validate.go
  method Validate (line 19) | func (c *Config) Validate() error {
  function findBaseDirectory (line 59) | func findBaseDirectory(path string) string {
  function validatePath (line 68) | func validatePath(path string, allowDaemonGroupWritable bool) error {

FILE: pkg/osutil/dns_darwin.go
  function DNSAddresses (line 14) | func DNSAddresses() ([]string, error) {
  function proxyURL (line 31) | func proxyURL(proxy string, port any) string {
  function ProxySettings (line 49) | func ProxySettings() (map[string]string, error) {

FILE: pkg/osutil/dns_others.go
  function DNSAddresses (line 8) | func DNSAddresses() ([]string, error) {
  function ProxySettings (line 13) | func ProxySettings() (map[string]string, error) {

FILE: pkg/osutil/exit.go
  function HandleExitError (line 15) | func HandleExitError(err error) {

FILE: pkg/osutil/file.go
  function FileExists (line 13) | func FileExists(path string) bool {
  function Touch (line 19) | func Touch(path string) error {

FILE: pkg/osutil/machineid.go
  function machineID (line 37) | func machineID(ctx context.Context) (string, error) {
  function parseIOPlatformUUIDFromIOPlatformExpertDevice (line 61) | func parseIOPlatformUUIDFromIOPlatformExpertDevice(r io.Reader) (string,...

FILE: pkg/osutil/machineid_test.go
  function TestMachineID (line 13) | func TestMachineID(t *testing.T) {
  function TestParseIOPlatformUUIDFromIOPlatformExpertDevice (line 17) | func TestParseIOPlatformUUIDFromIOPlatformExpertDevice(t *testing.T) {

FILE: pkg/osutil/mount_darwin.go
  function Mount (line 17) | func Mount(ctx context.Context, fs, dev, mnt string, options []string) e...
  function Umount (line 31) | func Umount(ctx context.Context, mnt string) error {

FILE: pkg/osutil/osutil_linux.go
  constant UnixPathMax (line 12) | UnixPathMax = 108
  type Stat (line 15) | type Stat struct
  function SysStat (line 20) | func SysStat(fi fs.FileInfo) (Stat, bool) {
  constant SigInt (line 26) | SigInt = Signal(syscall.SIGINT)
  constant SigKill (line 29) | SigKill = Signal(syscall.SIGKILL)
  type Signal (line 31) | type Signal
  function SysKill (line 33) | func SysKill(pid int, sig Signal) error {

FILE: pkg/osutil/osutil_others.go
  constant UnixPathMax (line 14) | UnixPathMax = 104
  type Stat (line 17) | type Stat struct
  function SysStat (line 22) | func SysStat(fi fs.FileInfo) (Stat, bool) {
  constant SigInt (line 28) | SigInt = Signal(syscall.SIGINT)
  constant SigKill (line 31) | SigKill = Signal(syscall.SIGKILL)
  type Signal (line 33) | type Signal
  function SysKill (line 35) | func SysKill(pid int, sig Signal) error {

FILE: pkg/osutil/osutil_unix.go
  function Dup2 (line 21) | func Dup2(oldfd, newfd int) (err error) {
  function SignalName (line 25) | func SignalName(sig os.Signal) string {
  function Sysctl (line 29) | func Sysctl(ctx context.Context, name string) (string, error) {
  function IsEACCES (line 41) | func IsEACCES(err error) bool {

FILE: pkg/osutil/osutil_windows.go
  constant UnixPathMax (line 18) | UnixPathMax = 108
  type Stat (line 21) | type Stat struct
  function SysStat (line 26) | func SysStat(_ fs.FileInfo) (Stat, bool) {
  constant SigInt (line 31) | SigInt = Signal(2)
  constant SigKill (line 34) | SigKill = Signal(9)
  type Signal (line 36) | type Signal
  function SysKill (line 38) | func SysKill(pid int, _ Signal) error {
  function Dup2 (line 42) | func Dup2(_ int, _ syscall.Handle) error {
  function SignalName (line 46) | func SignalName(sig os.Signal) string {
  function Sysctl (line 57) | func Sysctl(_ context.Context, _ string) (string, error) {
  function IsEACCES (line 61) | func IsEACCES(err error) bool {

FILE: pkg/osutil/osversion_others.go
  function ProductVersion (line 15) | func ProductVersion() (*semver.Version, error) {

FILE: pkg/osutil/rosetta_darwin.go
  function IsBeingRosettaTranslated (line 14) | func IsBeingRosettaTranslated() bool {

FILE: pkg/osutil/rosetta_others.go
  function IsBeingRosettaTranslated (line 8) | func IsBeingRosettaTranslated() bool {

FILE: pkg/osutil/user.go
  type User (line 24) | type User struct
  type Group (line 33) | type Group struct
  function LookupUser (line 48) | func LookupUser(name string) (User, error) {
  function LookupGroup (line 74) | func LookupGroup(name string) (Group, error) {
  constant fallbackUser (line 93) | fallbackUser = "lima"
  constant fallbackUid (line 94) | fallbackUid  = 1000
  constant fallbackGid (line 95) | fallbackGid  = 1000
  function LimaUser (line 106) | func LimaUser(ctx context.Context, limaVersion string, warn bool, guestO...
  function call (line 174) | func call(ctx context.Context, args []string) (string, error) {
  function parseUidGid (line 184) | func parseUidGid(uidOrGid string) (uint32, error) {
  function formatUidGid (line 193) | func formatUidGid(uidOrGid uint32) string {

FILE: pkg/osutil/user_test.go
  constant limaVersion (line 15) | limaVersion = "1.0.0"
  function TestLimaUserAdminNew (line 18) | func TestLimaUserAdminNew(t *testing.T) {
  function TestLimaUserAdminOld (line 26) | func TestLimaUserAdminOld(t *testing.T) {
  function TestLimaUserInvalid (line 33) | func TestLimaUserInvalid(t *testing.T) {
  function TestLimaUserUid (line 40) | func TestLimaUserUid(t *testing.T) {
  function TestLimaUserGid (line 48) | func TestLimaUserGid(t *testing.T) {
  function TestLimaHomeDir (line 56) | func TestLimaHomeDir(t *testing.T) {

FILE: pkg/plist/plist.go
  type Plist (line 20) | type Plist struct
    method UnmarshalXML (line 44) | func (p *Plist) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)...
  type Value (line 25) | type Value struct
    method UnmarshalXML (line 68) | func (v *Value) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)...
  type Array (line 39) | type Array
    method UnmarshalXML (line 153) | func (a *Array) UnmarshalXML(dec *xml.Decoder, start xml.StartElement)...
  type Dict (line 42) | type Dict
    method UnmarshalXML (line 180) | func (d *Dict) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) ...

FILE: pkg/plist/plist_test.go
  function TestUnmarshalPlist (line 22) | func TestUnmarshalPlist(t *testing.T) {

FILE: pkg/plugins/plugins.go
  constant defaultPathExt (line 24) | defaultPathExt = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;...
  type Plugin (line 26) | type Plugin struct
    method Run (line 149) | func (plugin *Plugin) Run(ctx context.Context, args []string) {
  function isWindowsExecutableExt (line 72) | func isWindowsExecutableExt(ext string) bool {
  function isExecutable (line 82) | func isExecutable(path string) bool {
  function scanDirectory (line 99) | func scanDirectory(dir string) []Plugin {
  function extractDescFromScript (line 171) | func extractDescFromScript(path string) string {
  function Find (line 195) | func Find(name string) (*Plugin, error) {
  function UpdatePath (line 209) | func UpdatePath() error {

FILE: pkg/portfwd/client.go
  function HandleTCPConnection (line 21) | func HandleTCPConnection(_ context.Context, dialContext func(ctx context...
  function HandleUDPConnection (line 27) | func HandleUDPConnection(ctx context.Context, dialContext func(ctx conte...
  function DialContextToGRPCTunnel (line 46) | func DialContextToGRPCTunnel(client *guestagentclient.GuestAgentClient) ...
  type GrpcClientRW (line 69) | type GrpcClientRW struct
    method Write (line 79) | func (g *GrpcClientRW) Write(p []byte) (n int, err error) {
    method Read (line 92) | func (g *GrpcClientRW) Read(p []byte) (n int, err error) {
    method Close (line 101) | func (g *GrpcClientRW) Close() error {
    method LocalAddr (line 106) | func (g *GrpcClientRW) LocalAddr() net.Addr {
    method RemoteAddr (line 110) | func (g *GrpcClientRW) RemoteAddr() net.Addr {
    method SetDeadline (line 114) | func (g *GrpcClientRW) SetDeadline(_ time.Time) error {
    method SetReadDeadline (line 118) | func (g *GrpcClientRW) SetReadDeadline(_ time.Time) error {
    method SetWriteDeadline (line 122) | func (g *GrpcClientRW) SetWriteDeadline(_ time.Time) error {

FILE: pkg/portfwd/control_others.go
  function Control (line 14) | func Control(_, _ string, c syscall.RawConn) (err error) {

FILE: pkg/portfwd/control_windows.go
  function Control (line 12) | func Control(_, _ string, c syscall.RawConn) (err error) {

FILE: pkg/portfwd/forward.go
  type Forwarder (line 21) | type Forwarder struct
    method emitEvent (line 39) | func (fw *Forwarder) emitEvent(ev *events.PortForwardEvent) {
    method Close (line 45) | func (fw *Forwarder) Close() error {
    method OnEvent (line 49) | func (fw *Forwarder) OnEvent(ctx context.Context, dialContext func(ctx...
    method forwardingAddresses (line 100) | func (fw *Forwarder) forwardingAddresses(guest *api.IPPort) (hostAddr,...
    method isPortStaticallyForwarded (line 133) | func (fw *Forwarder) isPortStaticallyForwarded(guest *api.IPPort) bool {
  function NewPortForwarder (line 29) | func NewPortForwarder(rules []limatype.PortForward, ignoreTCP, ignoreUDP...
  function hostAddress (line 145) | func hostAddress(rule limatype.PortForward, guest *api.IPPort) string {

FILE: pkg/portfwd/listener.go
  type ClosableListeners (line 21) | type ClosableListeners struct
    method Close (line 41) | func (p *ClosableListeners) Close() error {
    method Forward (line 62) | func (p *ClosableListeners) Forward(ctx context.Context, dialContext f...
    method Remove (line 73) | func (p *ClosableListeners) Remove(_ context.Context, protocol, hostAd...
    method forwardTCP (line 96) | func (p *ClosableListeners) forwardTCP(ctx context.Context, dialContex...
    method forwardUDP (line 131) | func (p *ClosableListeners) forwardUDP(ctx context.Context, dialContex...
  function NewClosableListener (line 29) | func NewClosableListener() *ClosableListeners {
  function key (line 154) | func key(protocol, hostAddress, guestAddress string) string {
  function prepareUnixSocket (line 158) | func prepareUnixSocket(hostSocket string) error {
  function logListenError (line 168) | func logListenError(err error, proto, hostAddress string) {

FILE: pkg/portfwd/listener_darwin.go
  function Listen (line 16) | func Listen(ctx context.Context, listenConfig net.ListenConfig, hostAddr...
  function ListenPacket (line 51) | func ListenPacket(ctx context.Context, listenConfig net.ListenConfig, ho...
  type pseudoLoopbackListener (line 73) | type pseudoLoopbackListener struct
    method Accept (line 77) | func (p pseudoLoopbackListener) Accept() (net.Conn, error) {
  type pseudoLoopbackPacketConn (line 100) | type pseudoLoopbackPacketConn struct
    method ReadFrom (line 104) | func (pk *pseudoLoopbackPacketConn) ReadFrom(bytes []byte) (n int, add...
    method WriteTo (line 120) | func (pk *pseudoLoopbackPacketConn) WriteTo(bytes []byte, remoteAddr n...
  function IsLoopback (line 131) | func IsLoopback(addr string) bool {

FILE: pkg/portfwd/listener_others.go
  function Listen (line 14) | func Listen(ctx context.Context, listenConfig net.ListenConfig, hostAddr...
  function ListenPacket (line 31) | func ListenPacket(ctx context.Context, listenConfig net.ListenConfig, ho...

FILE: pkg/portfwdserver/server.go
  type TunnelServer (line 19) | type TunnelServer struct
    method Start (line 25) | func (s *TunnelServer) Start(stream api.GuestService_TunnelServer) err...
  function NewTunnelServer (line 21) | func NewTunnelServer() *TunnelServer {
  type GRPCServerRW (line 62) | type GRPCServerRW struct
    method Write (line 70) | func (g *GRPCServerRW) Write(p []byte) (n int, err error) {
    method Read (line 75) | func (g *GRPCServerRW) Read(p []byte) (n int, err error) {
    method Close (line 84) | func (g *GRPCServerRW) Close() error {
    method CloseRead (line 93) | func (g *GRPCServerRW) CloseRead() error {
    method CloseWrite (line 99) | func (g *GRPCServerRW) CloseWrite() error {
    method LocalAddr (line 105) | func (g *GRPCServerRW) LocalAddr() net.Addr {
    method RemoteAddr (line 109) | func (g *GRPCServerRW) RemoteAddr() net.Addr {
    method SetDeadline (line 113) | func (g *GRPCServerRW) SetDeadline(_ time.Time) error {
    method SetReadDeadline (line 117) | func (g *GRPCServerRW) SetReadDeadline(_ time.Time) error {
    method SetWriteDeadline (line 121) | func (g *GRPCServerRW) SetWriteDeadline(_ time.Time) error {

FILE: pkg/progressbar/progressbar.go
  type ProgressBar (line 16) | type ProgressBar struct
    method Update (line 20) | func (b *ProgressBar) Update(n int64) {
  function New (line 24) | func New(size int64) (*ProgressBar, error) {
  function showProgress (line 44) | func showProgress() bool {

FILE: pkg/ptr/ptr.go
  function Of (line 8) | func Of[T any](value T) *T {

FILE: pkg/ptr/ptr_test.go
  function TestOf (line 12) | func TestOf(t *testing.T) {

FILE: pkg/qemuimgutil/qemuimgutil.go
  constant QemuImgFormat (line 22) | QemuImgFormat = "qcow2"
  type QemuImageUtil (line 25) | type QemuImageUtil struct
    method CreateDisk (line 166) | func (q *QemuImageUtil) CreateDisk(ctx context.Context, disk string, s...
    method ResizeDisk (line 181) | func (q *QemuImageUtil) ResizeDisk(ctx context.Context, disk string, s...
    method MakeSparse (line 190) | func (q *QemuImageUtil) MakeSparse(_ context.Context, _ *os.File, _ in...
    method Convert (line 206) | func (q *QemuImageUtil) Convert(ctx context.Context, imageType image.T...
  type Info (line 30) | type Info struct
  type InfoChild (line 44) | type InfoChild struct
  type InfoFormatSpecific (line 49) | type InfoFormatSpecific struct
    method Qcow2 (line 63) | func (sp *InfoFormatSpecific) Qcow2() *InfoFormatSpecificDataQcow2 {
    method Vmdk (line 74) | func (sp *InfoFormatSpecific) Vmdk() *InfoFormatSpecificDataVmdk {
  function resizeDisk (line 54) | func resizeDisk(ctx context.Context, disk, format string, size int64) er...
  type InfoFormatSpecificDataQcow2 (line 85) | type InfoFormatSpecificDataQcow2 struct
  type InfoFormatSpecificDataVmdk (line 94) | type InfoFormatSpecificDataVmdk struct
  type InfoFormatSpecificDataVmdkExtent (line 101) | type InfoFormatSpecificDataVmdkExtent struct
  function convertToRaw (line 108) | func convertToRaw(ctx context.Context, source, dest string) error {
  function execQemuImgConvert (line 133) | func execQemuImgConvert(ctx context.Context, source, dest string) error {
  function parseInfo (line 145) | func parseInfo(b []byte) (*Info, error) {
  function getInfo (line 153) | func getInfo(ctx context.Context, f string) (*Info, error) {
  function GetInfo (line 195) | func GetInfo(ctx context.Context, path string) (*Info, error) {
  function AcceptableAsBaseDisk (line 239) | func AcceptableAsBaseDisk(info *Info) error {

FILE: pkg/qemuimgutil/qemuimgutil_test.go
  function TestParseInfo (line 12) | func TestParseInfo(t *testing.T) {

FILE: pkg/reflectutil/reflectutil.go
  function UnknownNonEmptyFields (line 25) | func UnknownNonEmptyFields(structOrStructPtr any, knownNames ...string) ...
  function isEmpty (line 54) | func isEmpty(v reflect.Value) bool {

FILE: pkg/reg
Condensed preview — 676 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,634K chars).
[
  {
    "path": ".codespellrc",
    "chars": 404,
    "preview": "# https://github.com/codespell-project/codespell#using-a-config-file\n\n[codespell]\n\n# Comma separated list of dirs to be "
  },
  {
    "path": ".editorconfig",
    "chars": 192,
    "preview": "root = true\n\n[*]\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n# Protobuf descriptors are binary files\n[*"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yaml",
    "chars": 194,
    "preview": "name: Bug report\ndescription: Report a potential bug\nbody:\n- type: textarea\n  attributes:\n    label: Description\n    des"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 361,
    "preview": "blank_issues_enabled: true\ncontact_links:\n- name: Ask a question (GitHub Discussions)\n  url: https://github.com/lima-vm/"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yaml",
    "chars": 113,
    "preview": "name: Feature request\ndescription: Request a feature\nbody:\n- type: textarea\n  attributes:\n    label: Description\n"
  },
  {
    "path": ".github/actions/setup_cache_for_template/action.yml",
    "chars": 2961,
    "preview": "name: 'setup cache for template'\ndescription: 'setup cache for template'\ninputs:\n  arch:\n    description: arch to setup "
  },
  {
    "path": ".github/actions/upload_failure_logs_if_exists/action.yml",
    "chars": 1065,
    "preview": "name: 'upload failure-logs if exists'\ndescription: 'upload failure-logs if exists'\ninputs:\n  suffix:\n    description: su"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 376,
    "preview": "version: 2\nupdates:\n- package-ecosystem: gomod\n  directories:\n  - \"/\"\n  - \"/hack/tools\"\n  schedule:\n    interval: daily\n"
  },
  {
    "path": ".github/workflows/codeql.yaml",
    "chars": 1602,
    "preview": "name: \"CodeQL Advanced\"\n\non:\n  # paths-ignore should be kept in sync with test.yml\n  push:\n    branches: [\"master\"]\n    "
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 4335,
    "preview": "# Forked from https://github.com/containerd/nerdctl/blob/v0.8.1/.github/workflows/release.yml\n# Apache License 2.0\n\nname"
  },
  {
    "path": ".github/workflows/scorecard.yml",
    "chars": 2609,
    "preview": "name: Scorecard supply-chain security\non:\n  # For Branch-Protection check. Only the default branch is supported. See\n  #"
  },
  {
    "path": ".github/workflows/spell.yml",
    "chars": 606,
    "preview": "# split from test.yml so as to run spell checks for doc-only PRs too\nname: spell\n\non:\n  push:\n    branches:\n    - master"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 23961,
    "preview": "name: test\n\non:\n  push:\n    branches:\n    - master\n    - 'release/**'\n    paths-ignore:\n    - \"docs/**\"\n    - \"website/*"
  },
  {
    "path": ".gitignore",
    "chars": 91,
    "preview": "_output/\n_artifacts/\nlima.REJECTED.yaml\ndefault-template.yaml\nschema-limayaml.json\n.config\n"
  },
  {
    "path": ".gitmodules",
    "chars": 563,
    "preview": "[submodule \"hack/bats/lib/bats-core\"]\n\tpath = hack/bats/lib/bats-core\n\turl = https://github.com/bats-core/bats-core.git\n"
  },
  {
    "path": ".golangci.yml",
    "chars": 4399,
    "preview": "# golangci-lint configuration file.\n# https://golangci-lint.run/usage/configuration/\nversion: \"2\"\nrun:\n  concurrency: 6\n"
  },
  {
    "path": ".ls-lint.yml",
    "chars": 830,
    "preview": "# ls-lint configuration file.\n# https://ls-lint.org/2.2/configuration/the-basics.html\nls:\n  .dir: kebab-case\n  .go: snak"
  },
  {
    "path": ".markdownlint.json",
    "chars": 233,
    "preview": "{\n  \"first-line-h1\": false,\n  \"no-inline-html\": false,\n  \"blanks-around-headers\": false,\n  \"blanks-around-lists\": false,"
  },
  {
    "path": ".protolint.yaml",
    "chars": 312,
    "preview": "# This is the configuration for protolint.\n# See https://github.com/yoheimuta/protolint/blob/v0.55.6/_example/config/.pr"
  },
  {
    "path": ".shellcheckrc",
    "chars": 22,
    "preview": "source-path=SCRIPTDIR\n"
  },
  {
    "path": ".yamllint",
    "chars": 307,
    "preview": "---\n\nextends: default\n\nignore: |\n  # this is a yaml template, needs to be executed\n  pkg/cidata/cloud-config.yaml\n\nrules"
  },
  {
    "path": "LICENSE",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "MAINTAINERS.md",
    "chars": 58,
    "preview": "Moved to <https://lima-vm.io/docs/community/governance/>.\n"
  },
  {
    "path": "Makefile",
    "chars": 32372,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n# Files are installed under $"
  },
  {
    "path": "NOTICE",
    "chars": 963,
    "preview": "Lima\nCopyright The Lima Authors.\n\nThis project contains portions of other projects that are licensed under the terms of "
  },
  {
    "path": "README.md",
    "chars": 4221,
    "preview": "[[🌎**Web site**]](https://lima-vm.io/)\n[[📖**Documentation**]](https://lima-vm.io/docs/)\n[[👤**Slack (`#lima`)**]](https:/"
  },
  {
    "path": "ROADMAP.md",
    "chars": 55,
    "preview": "Moved to <https://lima-vm.io/docs/community/roadmap/>.\n"
  },
  {
    "path": "cmd/apptainer.lima",
    "chars": 762,
    "preview": "#!/bin/sh\nset -eu\n: \"${LIMA_INSTANCE:=apptainer}\"\n: \"${APPTAINER_BINDPATH:=}\"\n\nif [ \"$(limactl ls -q \"$LIMA_INSTANCE\" 2>"
  },
  {
    "path": "cmd/docker.lima",
    "chars": 898,
    "preview": "#!/bin/sh\nset -eu\n\n# Environment Variables\n# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is \""
  },
  {
    "path": "cmd/kubectl.lima",
    "chars": 1608,
    "preview": "#!/bin/sh\nset -eu\n\n# Environment Variables\n# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is e"
  },
  {
    "path": "cmd/lima",
    "chars": 1607,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu\n\n# Enviro"
  },
  {
    "path": "cmd/lima-driver-krunkit/main_darwin_arm64.go",
    "chars": 351,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/lima-driver-qemu/main.go",
    "chars": 345,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/lima-driver-vz/main_darwin.go",
    "chars": 341,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/lima-driver-wsl2/main_windows.go",
    "chars": 345,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/lima-guestagent/daemon_linux.go",
    "chars": 4075,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/lima-guestagent/fake_cloud_init_darwin.go",
    "chars": 506,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/lima-guestagent/install_systemd_linux.go",
    "chars": 3557,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"b"
  },
  {
    "path": "cmd/lima-guestagent/lima-guestagent.TEMPLATE.service",
    "chars": 215,
    "preview": "[Unit]\nDescription=lima-guestagent\n\n[Service]\nExecStart={{.Binary}} daemon {{.Args}} --runtime-dir=\"%t/%N\"\nType=simple\nR"
  },
  {
    "path": "cmd/lima-guestagent/main.go",
    "chars": 986,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"s"
  },
  {
    "path": "cmd/lima-guestagent/root_darwin.go",
    "chars": 248,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/lima-guestagent/root_linux.go",
    "chars": 271,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/lima-guestagent/root_others.go",
    "chars": 227,
    "preview": "//go:build !linux && !darwin\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2"
  },
  {
    "path": "cmd/lima.bat",
    "chars": 361,
    "preview": "@echo off\nREM Environment Variables\nREM LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is \"defau"
  },
  {
    "path": "cmd/limactl/clone.go",
    "chars": 3864,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/completion.go",
    "chars": 2111,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"m"
  },
  {
    "path": "cmd/limactl/copy.go",
    "chars": 2728,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/limactl/debug.go",
    "chars": 1581,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"s"
  },
  {
    "path": "cmd/limactl/delete.go",
    "chars": 2224,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/disk.go",
    "chars": 12449,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/edit.go",
    "chars": 5692,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"b"
  },
  {
    "path": "cmd/limactl/editflags/editflags.go",
    "chars": 15166,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage editflags\n\nimport "
  },
  {
    "path": "cmd/limactl/editflags/editflags_test.go",
    "chars": 7404,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage editflags\n\nimport "
  },
  {
    "path": "cmd/limactl/factory-reset.go",
    "chars": 2225,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/gendoc.go",
    "chars": 4030,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"b"
  },
  {
    "path": "cmd/limactl/genschema.go",
    "chars": 2754,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/guest-install.go",
    "chars": 4602,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"b"
  },
  {
    "path": "cmd/limactl/hostagent.go",
    "chars": 4524,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/info.go",
    "chars": 1309,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/list.go",
    "chars": 11182,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"b"
  },
  {
    "path": "cmd/limactl/main.go",
    "chars": 8405,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/main_darwin.go",
    "chars": 257,
    "preview": "//go:build !external_vz && !no_vz\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apa"
  },
  {
    "path": "cmd/limactl/main_qemu.go",
    "chars": 260,
    "preview": "//go:build !external_qemu\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "cmd/limactl/main_windows.go",
    "chars": 254,
    "preview": "//go:build !external_wsl2\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "cmd/limactl/network.go",
    "chars": 7451,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/protect.go",
    "chars": 1578,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/prune.go",
    "chars": 3657,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl/restart.go",
    "chars": 1451,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/limactl/shell.go",
    "chars": 24045,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl/shell_test.go",
    "chars": 1631,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"t"
  },
  {
    "path": "cmd/limactl/show-ssh.go",
    "chars": 3722,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/snapshot.go",
    "chars": 5204,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/start-at-login.go",
    "chars": 842,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/limactl/start-at-login_unix.go",
    "chars": 1701,
    "preview": "//go:build !windows\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npacka"
  },
  {
    "path": "cmd/limactl/start-at-login_windows.go",
    "chars": 313,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/start.go",
    "chars": 19997,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl/stop.go",
    "chars": 1403,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"g"
  },
  {
    "path": "cmd/limactl/sudoers.go",
    "chars": 1412,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"f"
  },
  {
    "path": "cmd/limactl/sudoers_darwin.go",
    "chars": 1649,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl/sudoers_nodarwin.go",
    "chars": 311,
    "preview": "//go:build !darwin\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackag"
  },
  {
    "path": "cmd/limactl/template.go",
    "chars": 8783,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl/tunnel.go",
    "chars": 4250,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/unprotect.go",
    "chars": 1415,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/usernet.go",
    "chars": 2706,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"e"
  },
  {
    "path": "cmd/limactl/watch.go",
    "chars": 7831,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl-mcp/main.go",
    "chars": 6250,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage main\n\nimport (\n\t\"c"
  },
  {
    "path": "cmd/limactl-url-fedora-rawhide",
    "chars": 1293,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu\n\nif [ \"$#"
  },
  {
    "path": "cmd/nerdctl.lima",
    "chars": 323,
    "preview": "#!/bin/sh\nset -eu\n\n# Environment Variables\n# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is \""
  },
  {
    "path": "cmd/podman.lima",
    "chars": 801,
    "preview": "#!/bin/sh\nset -eu\n: \"${LIMA_INSTANCE:=podman}\"\n: \"${PODMAN:=podman}\"\n\nif [ \"$(limactl ls -q \"$LIMA_INSTANCE\" 2>/dev/null"
  },
  {
    "path": "cmd/yq/yq.go",
    "chars": 1095,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// SPDX-FileCopyrightText:"
  },
  {
    "path": "docs/README.md",
    "chars": 36,
    "preview": "Moved to <https://lima-vm.io/docs/>\n"
  },
  {
    "path": "go.mod",
    "chars": 5582,
    "preview": "// gomodjail:confined\nmodule github.com/lima-vm/lima/v2\n\ngo 1.25.7\n\nrequire (\n\tal.essio.dev/pkg/shellescape v1.6.0\n\tgith"
  },
  {
    "path": "go.sum",
    "chars": 36137,
    "preview": "al.essio.dev/pkg/shellescape v1.6.0 h1:NxFcEqzFSEVCGN2yq7Huv/9hyCEGVa/TncnOOBBeXHA=\nal.essio.dev/pkg/shellescape v1.6.0/"
  },
  {
    "path": "hack/allowed-licenses.txt",
    "chars": 97,
    "preview": "Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib\n"
  },
  {
    "path": "hack/ansible-test.yaml",
    "chars": 156,
    "preview": "- hosts: all\n  tasks:\n  - name: Create test file\n    file:\n      path: \"/tmp/param-{{ lookup('ansible.builtin.env', 'PAR"
  },
  {
    "path": "hack/bats/README.md",
    "chars": 214,
    "preview": "# BATS Integration Tests\n\nSee the [Testing](https://lima-vm.io/docs/dev/testing/) page for how to run these tests\nand th"
  },
  {
    "path": "hack/bats/extras/README.md",
    "chars": 241,
    "preview": "# Extra tests\n\nThe extra tests located in this directory are not automatically executed via `make bats`.\n\nSome tests are"
  },
  {
    "path": "hack/bats/extras/colima.bats",
    "chars": 460,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nloca"
  },
  {
    "path": "hack/bats/extras/freebsd.bats",
    "chars": 574,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nloca"
  },
  {
    "path": "hack/bats/extras/k8s.bats",
    "chars": 5282,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This test verifies that a "
  },
  {
    "path": "hack/bats/extras/port-monitor.bats",
    "chars": 1898,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This test verifies that wh"
  },
  {
    "path": "hack/bats/helpers/limactl.bash",
    "chars": 2015,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Create a dummy Lima instan"
  },
  {
    "path": "hack/bats/helpers/load.bash",
    "chars": 2828,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -o errexit -o nounset -o"
  },
  {
    "path": "hack/bats/helpers/logs.bash",
    "chars": 895,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Format the string the way "
  },
  {
    "path": "hack/bats/tests/copy.bats",
    "chars": 4430,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/list.bats",
    "chars": 10367,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\n# Us"
  },
  {
    "path": "hack/bats/tests/mcp.bats",
    "chars": 8653,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/path.bats",
    "chars": 339,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/preserve-env.bats",
    "chars": 5324,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/protect.bats",
    "chars": 2205,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/shell-sync.bats",
    "chars": 4924,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/shell.bats",
    "chars": 2967,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\nINST"
  },
  {
    "path": "hack/bats/tests/url-github.bats",
    "chars": 6715,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\n# Th"
  },
  {
    "path": "hack/bats/tests/yq.bats",
    "chars": 1344,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nload \"../helpers/load\"\n\n@tes"
  },
  {
    "path": "hack/brew-install-version.sh",
    "chars": 1120,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This script o"
  },
  {
    "path": "hack/cache-common-inc.sh",
    "chars": 16256,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# print"
  },
  {
    "path": "hack/calculate-cache.sh",
    "chars": 10870,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This "
  },
  {
    "path": "hack/codesign/debugserver",
    "chars": 4121,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# # `hack/codes"
  },
  {
    "path": "hack/common.inc.sh",
    "chars": 1002,
    "preview": "# shellcheck shell=bash\ncleanup_cmd=\"\"\ntrap 'eval ${cleanup_cmd}' EXIT\nfunction defer {\n\t[ -n \"${cleanup_cmd}\" ] && clea"
  },
  {
    "path": "hack/debug-cache.sh",
    "chars": 437,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu -o pipe"
  },
  {
    "path": "hack/gogenerate/protoc.sh",
    "chars": 970,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Generate Go cod"
  },
  {
    "path": "hack/inject-cmdline-to-template.sh",
    "chars": 3877,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n#\n# Thi"
  },
  {
    "path": "hack/install-qemu.sh",
    "chars": 458,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Install qemu on"
  },
  {
    "path": "hack/ltag/bash.txt",
    "chars": 91,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "hack/ltag/dockerfile.txt",
    "chars": 91,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "hack/ltag/go.txt",
    "chars": 94,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n"
  },
  {
    "path": "hack/ltag/makefile.txt",
    "chars": 91,
    "preview": "# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "hack/oss-fuzz-build.sh",
    "chars": 1348,
    "preview": "#!/bin/bash -eu\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This scri"
  },
  {
    "path": "hack/test-mount-home.sh",
    "chars": 822,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/test-nonplain-static-port-forward.sh",
    "chars": 1121,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/test-plain-static-port-forward.sh",
    "chars": 1166,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/test-port-forwarding.pl",
    "chars": 16762,
    "preview": "#!/usr/bin/env perl\n\n# This script tests the port forwarding settings of lima. It has to be run\n# twice: once to update "
  },
  {
    "path": "hack/test-selinux.sh",
    "chars": 2956,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/test-templates/alpine-iso-9p-writable.yaml",
    "chars": 861,
    "preview": "# Background: https://github.com/lima-vm/lima/pull/2234\n# Should be tested on a Linux host\nimages:\n- location: \"https://"
  },
  {
    "path": "hack/test-templates/net-user-v2.yaml",
    "chars": 543,
    "preview": "# A template to run lima instance with experimental user-v2 network enabled\n# This template requires Lima v0.16.0 or lat"
  },
  {
    "path": "hack/test-templates/test-misc.yaml",
    "chars": 2834,
    "preview": "# The test template for testing misc configurations:\n# - disk\n# - snapshots\n# - (More to come)\n#\nbase: template:ubuntu-2"
  },
  {
    "path": "hack/test-templates.sh",
    "chars": 23668,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/test-upgrade.sh",
    "chars": 3182,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/toolexec-for-codesign.sh",
    "chars": 1765,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This script is "
  },
  {
    "path": "hack/tools/go.mod",
    "chars": 12313,
    "preview": "module tools\n\ngo 1.25.0\n\n// Should be in sync with pinversion.go\ntool (\n\tgithub.com/containerd/ltag\n\tgithub.com/editorco"
  },
  {
    "path": "hack/tools/go.sum",
    "chars": 103523,
    "preview": "4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A=\n4d63.com/gocheckcompilerdirect"
  },
  {
    "path": "hack/tools/pinversion.go",
    "chars": 543,
    "preview": "//go:build tools\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Packa"
  },
  {
    "path": "hack/update-template-almalinux-kitten.sh",
    "chars": 11681,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-almalinux.sh",
    "chars": 11414,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-alpine.sh",
    "chars": 12424,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-archlinux.sh",
    "chars": 11253,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-centos-stream.sh",
    "chars": 10546,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-debian.sh",
    "chars": 20631,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-fedora.sh",
    "chars": 11340,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-freebsd.sh",
    "chars": 9841,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-macos.sh",
    "chars": 7360,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-opensuse.sh",
    "chars": 13900,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-oraclelinux.sh",
    "chars": 9125,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-rocky.sh",
    "chars": 11461,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template-ubuntu.sh",
    "chars": 22767,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/update-template.sh",
    "chars": 9638,
    "preview": "#!/usr/bin/env bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu"
  },
  {
    "path": "hack/validate-artifact.sh",
    "chars": 1369,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n#\n# This script "
  },
  {
    "path": "pkg/apfs/chown.go",
    "chars": 21647,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage apfs\n\nimport (\n\t\"e"
  },
  {
    "path": "pkg/apfs/chown_darwin_test.go",
    "chars": 2843,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage apfs\n\nimport (\n\t\"o"
  },
  {
    "path": "pkg/apfs/fletcher64.go",
    "chars": 1140,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage apfs\n\nimport (\n\t\"e"
  },
  {
    "path": "pkg/apfs/fletcher64_test.go",
    "chars": 1000,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage apfs\n\nimport (\n\t\"e"
  },
  {
    "path": "pkg/apfs/types.go",
    "chars": 3449,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package apfs provides m"
  },
  {
    "path": "pkg/autostart/autostart.go",
    "chars": 2092,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package autostart manag"
  },
  {
    "path": "pkg/autostart/autostart_test.go",
    "chars": 2924,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage autostart\n\nimport "
  },
  {
    "path": "pkg/autostart/launchd/io.lima-vm.autostart.INSTANCE.plist",
    "chars": 712,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "pkg/autostart/launchd/launchd.go",
    "chars": 3420,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage launchd\n\nimport (\n"
  },
  {
    "path": "pkg/autostart/launchd/launchd_test.go",
    "chars": 647,
    "preview": "//go:build !windows\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npacka"
  },
  {
    "path": "pkg/autostart/managers.go",
    "chars": 4904,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package autostart manag"
  },
  {
    "path": "pkg/autostart/managers_darwin.go",
    "chars": 594,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage autostart\n\nimport "
  },
  {
    "path": "pkg/autostart/managers_linux.go",
    "chars": 713,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage autostart\n\nimport "
  },
  {
    "path": "pkg/autostart/managers_others.go",
    "chars": 273,
    "preview": "//go:build !darwin && !linux\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2"
  },
  {
    "path": "pkg/autostart/systemd/lima-vm@INSTANCE.service",
    "chars": 267,
    "preview": "[Unit]\nDescription=Lima - Linux virtual machines, with a focus on running containers.\nDocumentation=man:lima(1)\n\n[Servic"
  },
  {
    "path": "pkg/autostart/systemd/systemd.go",
    "chars": 2341,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage systemd\n\nimport (\n"
  },
  {
    "path": "pkg/autostart/systemd/systemd_linux.go",
    "chars": 440,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage systemd\n\nimport (\n"
  },
  {
    "path": "pkg/autostart/systemd/systemd_others.go",
    "chars": 223,
    "preview": "//go:build !linux\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage"
  },
  {
    "path": "pkg/autostart/systemd/systemd_test.go",
    "chars": 633,
    "preview": "//go:build !windows\n\n// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npacka"
  },
  {
    "path": "pkg/bicopy/bicopy.go",
    "chars": 2248,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// From https://raw.github"
  },
  {
    "path": "pkg/cacheutil/cacheutil.go",
    "chars": 1694,
    "preview": "// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage cacheutil\n\nimport "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.FreeBSD/05-lima-mounts.sh",
    "chars": 676,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Populate mounts"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-alpine-user-group.sh",
    "chars": 631,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\ntest -f /etc/alpi"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-check-rtc-and-wait-ntp.sh",
    "chars": 2776,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu\n\n# In vz,"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-guest-home.sh",
    "chars": 599,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eu\n\n# The de"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-modprobe.sh",
    "chars": 726,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# Load modules as"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/00-reboot-if-required.sh",
    "chars": 894,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\n[ \"$L"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/01-alpine-ash-as-bash.sh",
    "chars": 642,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# This script pre"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/04-persistent-data-volume.sh",
    "chars": 5000,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\n# bash is used "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/05-lima-disks.sh",
    "chars": 2000,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux -o pip"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/05-lima-mounts.sh",
    "chars": 2793,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux -o pip"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/06-enable-mdns-on-systemd.sh",
    "chars": 1320,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux -o pip"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/06-etc-hosts.sh",
    "chars": 449,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux -o pip"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/07-etc-environment.sh",
    "chars": 1040,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\n# /etc/"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/08-shell-prompt.sh",
    "chars": 1548,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\n# This "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/09-host-dns-setup.sh",
    "chars": 1282,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\nreadonl"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/10-alpine-prep.sh",
    "chars": 1278,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\n# This "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/11-colorterm-environment.sh",
    "chars": 986,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\nif [ -d"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/20-rootless-base.sh",
    "chars": 2975,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\n# This "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/25-guestagent-base.sh",
    "chars": 3570,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\nif [ "
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/30-install-packages.sh",
    "chars": 8232,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\nINSTALL"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/35-setup-packages.sh",
    "chars": 1055,
    "preview": "#!/bin/sh\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n\nupdate_"
  },
  {
    "path": "pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh",
    "chars": 6124,
    "preview": "#!/bin/bash\n\n# SPDX-FileCopyrightText: Copyright The Lima Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -eux\n: \"${C"
  }
]

// ... and 476 more files (download for full content)

About this extraction

This page contains the full source code of the lima-vm/lima GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 676 files (2.3 MB), approximately 635.1k tokens, and a symbol index with 2343 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!