跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

default.yaml

737 行 · 34.9 KB历史下载
1# ===================================================================== #
2# BASIC CONFIGURATION
3# ===================================================================== #
4
5# Default values in this YAML file are specified by `null` instead of Lima's "builtin default" values,
6# so they can be overridden by the $LIMA_HOME/_config/default.yaml mechanism documented at the end of this file.
7
8# VM type: "qemu", "vz" (on macOS 13 and later), or "default".
9# The vmType can be specified only on creating the instance.
10# The vmType of existing instances cannot be changed.
11# 🟢 Builtin default: "vz" (on macOS 13.5 and later), "qemu" (on others)
12vmType: null
13
14# Arch: "default", "x86_64", "aarch64".
15# 🟢 Builtin default: "default" (corresponds to the host architecture)
16arch: null
17
18
19# OpenStack-compatible disk image.
20# Each image has a `location` URL for the disk image, an `arch` setting, an optional `digest`,
21# an optional `variant` (e.g. "server", "minimal", "genericcloud"), and an optional `archVariant`
22# for the CPU micro-architecture level (e.g. "v3" for x86-64-v3; the image still runs as `arch`).
23# If multiple image variants are defined for the target architecture, the first one is used by default,
24# but they can be filtered using the `--image-variant` and `--arch-variant` flags when running
25# `limactl start` or `limactl create`.
26# To specify a custom kernel and initial RAM disk, nest `kernel` and `initrd` under an image entry:
27# - location: "https://example.com/image.qcow2"
28# # kernel specifies a custom kernel to boot.
29# kernel:
30# location: "https://example.com/vmlinuz"
31# digest: "sha256:..."
32# cmdline: "console=ttyS0 root=/dev/sda1"
33# # initrd specifies a custom initial RAM disk.
34# initrd:
35# location: "https://example.com/initrd.img"
36# digest: "sha256:..."
37# 🟢 Builtin default: none (must be specified)
38# 🔵 This file: Ubuntu images (inherited via the `base` mechanism later in this file)
39images: []
40
41# CPUs
42# 🟢 Builtin default: min(4, host CPU cores)
43cpus: null
44
45# Memory size
46# 🟢 Builtin default: min("4GiB", half of host memory)
47memory: null
48
49# Disk size
50# 🟢 Builtin default: "100GiB"
51disk: null
52
53# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest
54# "location" can use these template variables: {{.Home}}, {{.Dir}}, {{.Name}}, {{.UID}}, {{.User}}, {{.Param.Key}},
55# {{.GlobalTempDir}}, and {{.TempDir}}. The global temp dir is always "/tmp" on Unix.
56# "mountPoint" can use these template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
57# 🟢 Builtin default: [] (Mount nothing)
58# 🔵 This file: Mount the home as read-only (inherited via the `base` mechanism later in this file)
59# Until Lima v1.2, /tmp/lima was mounted too as writable.
60mounts: []
61# - location: "~"
62# # Configure the mountPoint inside the guest.
63# # 🟢 Builtin default: value of location
64# mountPoint: null
65# # Setting `writable` to true is discouraged when mountType is set to "reverse-sshfs".
66# # 🟢 Builtin default: false
67# writable: null
68# sshfs:
69# # Enabling the SSHFS cache will increase performance of the mounted filesystem, at
70# # the cost of potentially not reflecting changes made on the host in a timely manner.
71# # Warning: It looks like PHP filesystem access does not work correctly when
72# # the cache is disabled.
73# # 🟢 Builtin default: true
74# cache: null
75# # SSHFS has an optional flag called 'follow_symlinks'. This allows mounts
76# # to be properly resolved in the guest os and allow for access to the
77# # contents of the symlink. As a result, symlinked files & folders on the Host
78# # system will look and feel like regular files directories in the Guest OS.
79# # 🟢 Builtin default: false
80# followSymlinks: null
81# # SFTP driver, "builtin" or "openssh-sftp-server". "openssh-sftp-server" is recommended.
82# # 🟢 Builtin default: "openssh-sftp-server" if OpenSSH SFTP Server binary is found, otherwise "builtin"
83# sftpDriver: null
84# # File names that are read-only at any depth, enforced by the host even against a compromised guest.
85# # Requires `sftpDriver: builtin` on every mount, and a writable mount of a folder holding another
86# # one must list the same names.
87# # 🟢 Builtin default: []
88# readonlyNames: []
89# 9p:
90# # Supported security models are "passthrough", "mapped-xattr", "mapped-file" and "none".
91# # "mapped-xattr" and "mapped-file" are useful for persistent chown but incompatible with symlinks.
92# # 🟢 Builtin default: "none" (since Lima v0.13)
93# securityModel: null
94# # Select 9P protocol version. Valid options are: "9p2000" (legacy), "9p2000.u", "9p2000.L".
95# # 🟢 Builtin default: "9p2000.L"
96# protocolVersion: null
97# # The number of bytes to use for 9p packet payload, where 4KiB is the absolute minimum.
98# # 🟢 Builtin default: "128KiB"
99# msize: null
100# # Specifies a caching policy. Valid options are: "none", "loose", "fscache" and "mmap".
101# # Try choosing "mmap" or "none" if you see a stability issue with the default "fscache".
102# # See https://www.kernel.org/doc/Documentation/filesystems/9p.txt
103# # 🟢 Builtin default: "fscache" for non-writable mounts, "mmap" for writable mounts
104# cache: null
105
106# List of mount types not supported by the kernel of this distro.
107# Also used to resolve the default mount type when not explicitly specified.
108#
109# NOTE: 9p is broken in Linux v6.9, v6.10, and v6.11.
110# The issue was fixed in Linux v6.12-rc5 (https://github.com/torvalds/linux/commit/be2ca38).
111#
112# 🟢 Builtin default: []
113mountTypesUnsupported: null
114
115# Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (QEMU’s virtio-9p-pci, aka virtfs),
116# or "virtiofs" (experimental on Linux; needs `vmType: vz` on macOS).
117# 🟢 Builtin default: "default" (resolved to be "9p" for QEMU since Lima v1.0 on non-Windows, "virtiofs" for vz)
118mountType: null
119
120# Enable inotify support for mounted directories (EXPERIMENTAL)
121# 🟢 Builtin default: Disabled by default
122mountInotify: null
123
124# ===================================================================== #
125# ADVANCED CONFIGURATION
126# ===================================================================== #
127
128# Lima disks to attach to the instance. The disks will be accessible from inside the
129# instance, labeled by name. (e.g. if the disk is named "data", it will be labeled
130# "lima-data" inside the instance). The disk will be mounted inside the instance at
131# `/mnt/lima-${VOLUME}`.
132# 🟢 Builtin default: []
133additionalDisks:
134# disks should either be a list of disk name strings, for example:
135# - "data"
136# or a list of disk objects with extra parameters, for example:
137# - name: "data"
138# format: true
139# fsType: "ext4"
140
141ssh:
142 # A localhost port of the host. Forwarded to port 22 of the guest.
143 # 🟢 Builtin default: 0 (automatically assigned to a free port)
144 localPort: null
145 # Load ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
146 # This option is useful when you want to use other SSH-based
147 # applications such as rsync with the Lima instance.
148 # If you have an insecure key under ~/.ssh, do not use this option.
149 # 🟢 Builtin default: false (since Lima v1.0)
150 loadDotSSHPubKeys: null
151 # Forward ssh agent into the instance.
152 # The ssh agent socket can be mounted in a container at the path `/run/host-services/ssh-auth.sock`.
153 # Set the environment variable `SSH_AUTH_SOCK` value to the path above.
154 # The socket is accessible by the non-root user inside the Lima instance.
155 # 🟢 Builtin default: false
156 forwardAgent: null
157 # Forward X11 into the instance
158 # 🟢 Builtin default: false
159 forwardX11: null
160 # Trust forwarded X11 clients
161 # 🟢 Builtin default: false
162 forwardX11Trusted: null
163 # Enable SSH over vsock.
164 # 🟢 Builtin default: true for vz with Linux guests, false otherwise
165 overVsock: null
166
167caCerts:
168 # If set to `true`, this will remove all the default trusted CA certificates that
169 # are normally shipped with the OS.
170 # 🟢 Builtin default: false
171 removeDefaults: null
172
173 # A list of trusted CA certificate files. The files will be read and passed to cloud-init.
174 files:
175 # - examples/hello.crt
176
177 # A list of trusted CA certificates. These are directly passed to cloud-init.
178 certs:
179 # - |
180 # -----BEGIN CERTIFICATE-----
181 # YOUR-ORGS-TRUSTED-CA-CERT-HERE
182 # -----END CERTIFICATE-----
183 # - |
184 # -----BEGIN CERTIFICATE-----
185 # YOUR-ORGS-TRUSTED-CA-CERT-HERE
186 # -----END CERTIFICATE-----
187
188# Upgrade the instance on boot
189# Reboot after upgrade if required
190# 🟢 Builtin default: false
191upgradePackages: null
192
193containerd:
194 # Enable system-wide (aka rootful) containerd and its dependencies (BuildKit, Stargz Snapshotter)
195 # Note that `nerdctl.lima` only works in rootless mode; you have to use `lima sudo nerdctl ...`
196 # to use rootful containerd with nerdctl.
197 # 🟢 Builtin default: false
198 system: null
199 # Enable user-scoped (aka rootless) containerd and its dependencies
200 # 🟢 Builtin default: true for Linux x86_64 and aarch64 guests, false otherwise
201 user: null
202# # Override containerd archive
203# # 🟢 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)
204# archives:
205# - location: "~/Downloads/nerdctl-full-X.Y.Z-linux-amd64.tar.gz"
206# arch: "x86_64"
207# digest: "sha256:..."
208
209# Provisioning scripts need to be idempotent because they might be called
210# multiple times, e.g. when the host VM is being restarted.
211# The scripts can use the following template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
212#
213# EXPERIMENTAL Alternatively the script can be provided using the "file" property. This file is read when the instance
214# is created and then stored under the "script" property. When "file" is specified "script" must be empty.
215# The "file" property can either be a string (URL), or an object with a "url" and "digest" properties.
216# The "digest" property is currently unused.
217# Relative script files will be resolved relative to the location of the template file.
218# 🟢 Builtin default: []
219# provision:
220# # `system` is executed with root privileges
221# - mode: system
222# script: |
223# #!/bin/bash
224# set -eux -o pipefail
225# export DEBIAN_FRONTEND=noninteractive
226# apt-get install -y vim
227# # `user` is executed without root privileges
228# - mode: user
229# file:
230# url: user-provisioning.sh
231# digest: deadbeef
232# # `boot` is executed directly by /bin/sh as part of cloud-init-local.service's early boot process,
233# # which is why there is no hash-bang specified in the example
234# # See cloud-init docs for more info https://docs.cloud-init.io/en/latest/reference/examples.html#run-commands-on-first-boot
235# - mode: boot
236# script: |
237# systemctl disable NetworkManager-wait-online.service
238# # `dependency` is executed before the regular dependency resolution workflow in
239# # pkg/cidata/cidata.TEMPLATE.d/boot.Linux/30-install-packages.sh
240# # If skipDefaultDependencyResolution is set on at least one `dependency` mode provisioning script, the regular
241# # dependency resolution workflow in pkg/cidata/cidata.TEMPLATE.d/boot.Linux/30-install-packages.sh will be skipped.
242# - mode: dependency
243# skipDefaultDependencyResolution: false
244# script: |
245# #!/bin/bash
246# dnf config-manager --add-repo ...
247# dnf install ...
248# # `ansible` is executed after other scripts are complete
249# # It requires `ansible-playbook` command to be installed.
250# # Environment variables such as ANSIBLE_CONFIG can be used, to control the behavior of the playbook execution.
251# # See ansible docs, and `ansible-config`, for more info https://docs.ansible.com/ansible/latest/playbook_guide/
252# # DEPRECATED The ansible mode is deprecated, and should not be used. Instead call ansible-playbook directly,
253# # either from the host after the instance is started or from the instance by running ansible locally instead.
254# - mode: ansible
255# playbook: playbook.yaml
256# # `data` is a file that is written to the guest filesystem and not executed at all.
257# # The file is written after the boot scripts, but before any other provisioning scripts are run.
258# # Note that reverse-sshfs mounts are not established at this time; other mount types are already mounted.
259# # The `path` and `content` properties are required. The `file` property can be used the same way as with
260# # other provisioning scripts, in which case `content` must be empty. The `owner` defaults to "root:root";
261# # the permissions default to 644. The `overwrite` property defaults to `true`, in which case the file will
262# # be overwritten on every boot.
263# # `path`, `contents`, and `owner` are evaluated as guest templates (see above).
264# - mode: data
265# path: /etc/conf.d/example
266# content: |
267# FOO=bar
268# owner: "root:root"
269# permissions: 644
270# overwrite: false
271# # Create or edit a file in the guest filesystem by using `yq`.
272# # The file specified by `path` will be updated by `expression`.
273# # An empty file of the required `format` will be created if it does not yet exist.
274# # `format` defaults to "auto" and will be detected by file extension of `path`.
275# # If the extension is not recognized by `yq` then `format` must be set to a
276# # value from this list:
277# # "auto", "csv", "ini", "json", "props", "tsv", "toml", "xml", "yaml"
278# # See https://github.com/mikefarah/yq for more info.
279# # Any missing directories will be created as needed.
280# # The file permissions will be set to the specified value.
281# # The file and directory creation will be performed as the specified owner.
282# # If the existing file is not writable by the specified owner, the operation will fail.
283# # `path` and `expression` are required.
284# # `owner` and `permissions` are optional. Defaults to "root:root" (on Linux) and 644.
285# - mode: yq
286# path: "{{.Home}}/.config/docker/daemon.json"
287# expression: ".features.containerd-snapshotter = {{.Param.containerdSnapshotter}}"
288# format: auto
289# owner: "{{.User}}"
290# permissions: 644
291#
292# Q. In what order are provision scripts executed?
293# A. All provisions are processed per boot by each module in stages of cloud-init as follows:
294# 1. cloud-init 'init' stage
295# bootcmd:
296# - `mode: boot` scripts are executed
297#
298# 2. cloud-init 'config' stage
299# write_files:
300# - `00-lima.boot.sh` is created, but not executed
301#
302# 3. cloud-init 'final' stage
303# scripts_per_boot:
304# - `00-lima.boot.sh` is executed; remaining provisions are processed in the following order:
305# - LIMA pre-defined boot scripts:
306# - `boot.Linux/{00-..., ..., 25-...}`
307# - `boot.Linux/30-install-packages.sh`
308# - `mode: dependency` scripts are executed
309# - `boot.Linux/{35-..., ...}`
310# - `mode: data` files are copied
311# - `mode: yq` files are processed
312# - `mode: system` scripts are executed
313# - `mode: user` scripts are executed
314
315# Probe scripts to check readiness.
316# The scripts run in user mode. They must start with a '#!' line.
317# The scripts can use the following template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
318# EXPERIMENTAL Alternatively the script can be provided using the "file" property. This file is read when the instance
319# is created and then stored under the "script" property. When "file" is specified "script" must be empty.
320# The "file" property can either be a string (URL), or an object with a "url" and "digest" properties.
321# The "digest" property is currently unused.
322# Relative script files will be resolved relative to the location of the template file.
323# 🟢 Builtin default: []
324# probes:
325# # Only `readiness` probes are supported right now.
326# - mode: readiness
327# description: vim to be installed
328# script: |
329# #!/bin/bash
330# set -eux -o pipefail
331# if ! timeout 30s bash -c "until command -v vim; do sleep 3; done"; then
332# echo >&2 "vim is not installed yet"
333# exit 1
334# fi
335# hint: |
336# vim was not installed in the guest. Make sure the package system is working correctly.
337# Also see "/var/log/cloud-init-output.log" in the guest.
338
339# ===================================================================== #
340# FURTHER ADVANCED CONFIGURATION
341# ===================================================================== #
342
343# A template should specify the minimum Lima version required to parse this template correctly.
344# It should not be set if the minimum version is less than 1.0.0
345# 🟢 Builtin default: not set
346# 🔵 This file: "1.1.0" to use the `base` templating mechanism
347minimumLimaVersion: 2.0.0
348
349# EXPERIMENTAL
350# Default settings can be imported from base templates. These will be merged in when the instance
351# is created, and the combined template is stored in the instance directory.
352# This setting can be either a single string (URL), or a list of locators.
353# A locator is again either a string (URL), or an object with "url" and "digest" properties, e.g.
354# base: [{url: ./base.yaml, digest: decafbad}, …]
355# The "digest" property is currently unused.
356# Any relative base template name will be resolved relative to the location of the main template.
357# 🟢 Builtin default: no base template
358# 🔵 This file: Ubuntu images and default mount points
359base:
360- template:_images/ubuntu
361- template:_default/mounts
362
363# User to be used inside the VM
364user:
365 # User name. An explicitly specified username is not validated by Lima.
366 # 🟢 Builtin default: same as the host username, if it is a valid Linux username, otherwise "lima"
367 name: null
368 # Full name or display name of the user.
369 # 🟢 Builtin default: user information from the host
370 comment: null
371 # Numeric user id. It is not currently possible to specify a group id.
372 # 🟢 Builtin default: same as the host user id of the current user (NOT a lookup of the specified "username").
373 uid: null
374 # Home directory inside the VM, NOT the mounted home directory of the host.
375 # It can use the following template variables: {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
376 # 🟢 Builtin default: "/home/{{.User}}.guest" (Also accessible as "/home/{{.User}}.linux")
377 home: null
378 # Shell. Needs to be an absolute path on POSIX guests.
379 # For Windows guests, this is the command-line interpreter used by `limactl shell`,
380 # and must be one of "cmd.exe", "powershell.exe", or "pwsh.exe".
381 # The shell must already exist in the guest image.
382 # 🟢 Builtin default: "/bin/bash" (Linux), "/bin/zsh" (macOS), "/bin/sh" (FreeBSD), "cmd.exe" (Windows)
383 shell: null
384 # EXPERIMENTAL
385 # If false, a secure 16-character random password will be generated inside
386 # the guest on first boot and saved to `~/password` (with 0600 permissions).
387 # The user should manually rotate this password after the initial login.
388 # 🟢 Builtin default: true (false for macOS)
389 passwordlessSudo: null
390
391vmOpts:
392 qemu:
393 # Minimum version of QEMU required to create an instance of this template.
394 # Will be ignored if the vmType is not "qemu"
395 # 🟢 Builtin default: not set
396 minimumVersion: null
397 # Specify desired QEMU CPU type for each arch.
398 # You can see what options are available for host emulation with: `qemu-system-$(arch) -cpu help`.
399 # Setting of instructions is supported like this: "qemu64,+ssse3".
400 # 🟢 Builtin default: hard-coded arch map with type (see the output of `limactl info | jq .defaultTemplate.cpuType`)
401 cpuType:
402 # aarch64: "max" # (or "host" when running on aarch64 host)
403 # armv7l: "max" # (or "host" when running on armv7l host)
404 # riscv64: "max" # (or "host" when running on riscv64 host)
405 # x86_64: "max" # (or "host" when running on x86_64 host; additional options are appended on Intel Mac)
406 vz:
407 # Specify the disk image format: "raw" or "asif".
408 # Currently only applies to the primary disk image.
409 # "asif" requires macOS 26+, and does not support converting back to "raw".
410 # 🟢 Builtin default: "raw"
411 diskImageFormat: null
412 rosetta:
413 # Enable Rosetta inside the VM; needs `vmType: vz`
414 # Hint: try `softwareupdate --install-rosetta` if Lima gets stuck at `Installing rosetta...`
415 # 🟢 Builtin default: false
416 enabled: null
417 # Register rosetta to /proc/sys/fs/binfmt_misc
418 # 🟢 Builtin default: false
419 binfmt: null
420
421# OS: "Linux".
422# 🟢 Builtin default: "Linux"
423os: null
424
425# EXPERIMENTAL
426# osOpts configures guest OS specific settings.
427# Currently Windows guest only uses this option.
428# osOpts:
429# Windows:
430# virtioWin:
431# - location: /
432# arch: "x86_64"
433
434# DEPRECATED: Use vmOpts.qemu.cpuType instead. See the vmOpts.qemu.cpuType section above for configuration.
435cpuType:
436
437# DEPRECATED: Use vmOpts.vz.rosetta instead. See the vmOpts.vz.rosetta section above for configuration.
438rosetta:
439 enabled: null
440 binfmt: null
441
442# Specify the timezone name (as used by the zoneinfo database). Specify the empty string
443# to not set a timezone in the instance.
444# 🟢 Builtin default: use name from /etc/timezone or deduce from symlink target of /etc/localtime
445timezone: null
446
447firmware:
448 # Use legacy BIOS instead of UEFI. Ignored for aarch64 and vz.
449 # 🟢 Builtin default: false
450 legacyBIOS: null
451# # Override UEFI images
452# # 🟢 Builtin default: uses VM's default UEFI, except for qemu + aarch64.
453# # See <https://lists.gnu.org/archive/html/qemu-devel/2023-12/msg01694.html>
454# images:
455# - location: "~/Downloads/edk2-aarch64-code.fd.gz"
456# arch: "aarch64"
457# digest: "sha256:..."
458# vmType: "qemu"
459
460audio:
461 # EXPERIMENTAL
462 # QEMU audiodev, e.g., "none", "coreaudio", "pa", "alsa", "oss".
463 # VZ driver, use "vz" as device name
464 # Choosing "none" will mute the audio output, and not play any sound.
465 # Choosing "default" will pick a suitable choice of: coreaudio, pa, dsound, oss.
466 # As of QEMU v6.2 the default is to create a disconnected sound device
467 # that is still visible in the guest but not connected to the host.
468 # 🟢 Builtin default: ""
469 device: null
470 # The virtual hardware presentation for QEMU driver. Options are "hda" (legacy) or "virtio" (paravirtualized, requires QEMU >= 8.2).
471 # VZ driver always uses virtio-sound regardless of this setting.
472 # 🟢 Builtin default: "" (resolves to "hda" when audio.device is set)
473 interface: null
474 # EXPERIMENTAL
475 # Attach a microphone as well as speakers, so the guest gets a capture device
476 # (ALSA "pcmC0D1c") and not only playback. Needs audio.device to be set.
477 # Off by default: an input stream makes macOS ask for microphone permission on
478 # behalf of Lima.
479 # VZ driver only. The QEMU driver warns and ignores it.
480 # 🟢 Builtin default: false
481 microphone: null
482
483video:
484 # QEMU display, e.g., "none", "cocoa", "sdl", "gtk", "vnc", "default".
485 # Choosing "none" will hide the video output, and not show any window.
486 # Choosing "vnc" will use a network server, and not show any window.
487 # Choosing "default" will pick the first available of: gtk, sdl, cocoa.
488 # As of QEMU v6.2, enabling anything but none or vnc is known to have negative impact
489 # on performance on macOS hosts: https://gitlab.com/qemu-project/qemu/-/issues/334
490 # 🟢 Builtin default: "none"
491 display: null
492 # VNC (Virtual Network Computing) is a platform-independent graphical
493 # desktop-sharing system that uses the Remote Frame Buffer protocol (RFB)
494 vnc:
495 # VNC display, e.g.,"to=L", "host:d", "unix:path", "none"
496 # By convention the TCP port is 5900+d, connections from any host.
497 # 🟢 Builtin default: "127.0.0.1:0,to=9"
498 display: null
499
500# The instance can get routable IP addresses from the vmnet framework using
501# https://github.com/lima-vm/socket_vmnet.
502# 🟢 Builtin default: []
503networks:
504# Lima can manage daemons for networks defined in $LIMA_HOME/_config/networks.yaml
505# automatically. The socket_vmnet binary must be installed into
506# secure locations only alterable by the "root" user.
507# - lima: shared
508# # MAC address of the instance; lima will pick one based on the instance name,
509# # so DHCP assigned ip addresses should remain constant over instance restarts.
510# macAddress: ""
511# # Interface name, defaults to "lima0", "lima1", etc.
512# interface: ""
513# # Interface metric, lowest metric becomes the preferred route.
514# # Defaults to 100. Builtin SLIRP network uses 200.
515# metric: 100
516#
517# Lima can also connect to "unmanaged" networks addressed by "socket". This
518# means that the daemons will not be controlled by Lima, but must be started
519# before the instance. The interface type (host, shared, or bridged) is
520# configured in socket_vmnet and not in lima.
521# - socket: "/var/run/socket_vmnet"
522
523
524# The "vzNAT" IP address is accessible from the host, but not from other guests.
525# Needs `vmType: vz`
526# - vzNAT: true
527
528# Port forwarding rules. Forwarding between ports 22 and ssh.localPort cannot be overridden.
529# Rules are checked sequentially until the first one matches.
530# portForwards:
531# - guestPort: 443
532# hostIP: "0.0.0.0" # overrides the default value "127.0.0.1"; allows privileged port forwarding
533# # default: hostPort: 443 (same as guestPort)
534# # default: guestIP: "127.0.0.1" (also matches bind addresses "0.0.0.0", "::", and "::1")
535# # default: proto: "tcp" (other options: "udp, "any")
536#
537# - guestPortRange: [4000, 4999]
538# hostIP: "0.0.0.0" # overrides the default value "127.0.0.1"
539# # default: hostPortRange: [4000, 4999] (must specify same number of ports as guestPortRange)
540#
541# - guestPort: 80
542# hostPort: 8080 # overrides the default value 80
543#
544# - guestIP: "127.0.0.2" # overrides the default value "127.0.0.1"
545# hostIP: "127.0.0.2" # overrides the default value "127.0.0.1"
546# # default: guestPortRange: [1, 65535]
547# # default: hostPortRange: [1, 65535]
548#
549# - guestIP: 0.0.0.0 # otherwise defaults to 127.0.0.1
550# proto: any # tcp and udp
551# ignore: true # don't forward these ports (guestPortRange, in this case 1-65535)
552#
553# - guestPort: 7443
554# guestIP: "0.0.0.0" # Will match *any* interface
555# guestIPMustBeZero: false # 0.0.0.0 matches any bound interface, not just 0.0.0.0 itself
556# hostIP: "0.0.0.0" # Forwards to 0.0.0.0, exposing it externally
557#
558# - guestSocket: "/run/user/{{.UID}}/my.sock"
559# hostSocket: mysocket
560# # default: reverse: false
561# # "guestSocket" can include these template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
562# # "hostSocket" can include {{.Home}}, {{.Dir}}, {{.Name}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
563# # "reverse" can only be used for unix sockets right now, not for tcp sockets.
564# # Put sockets into "{{.Dir}}/sock" to avoid collision with Lima internal sockets!
565# # Sockets can also be forwarded to ports and vice versa, but not to/from a range of ports.
566# # Forwarding requires the lima user to have rw access to the "guestsocket",
567# # and the local user rwx access to the directory of the "hostsocket".
568#
569# # Lima internally appends this fallback rule at the end:
570# - guestIP: "127.0.0.1"
571# proto: "any"
572# guestPortRange: [1, 65535]
573# hostIP: "127.0.0.1"
574# hostPortRange: [1, 65535]
575# # Any port still not matched by a rule will not be forwarded (ignored)
576
577# Copy files from the guest to the host. Copied after provisioning scripts have been completed.
578# copyToHost:
579# - guest: "/etc/myconfig.cfg"
580# host: "{{.Dir}}/copied-from-guest/myconfig"
581# # skipIfMissing: false
582# # deleteOnStop: false
583# # "guest" can include these template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
584# # "host" can include {{.Home}}, {{.Dir}}, {{.Name}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
585# # "skipIfMissing" will skip copying the file from the guest if the file is missing.
586# # "deleteOnStop" will delete the file from the host when the instance is stopped.
587
588# Message. Information to be shown to the user, given as a Go template for the instance.
589# The same template variables as for listing instances can be used, for example {{.Dir}}.
590# You can view the complete list of variables using `limactl list --list-fields` command.
591# It also includes {{.HostOS}} and {{.HostArch}} vars, for the runtime GOOS and GOARCH.
592# 🟢 Builtin default: ""
593# message: |
594# This will be shown to the user.
595
596# Extra environment variables that will be loaded into the VM at start up.
597# These variables are consumed by internal init scripts, and also added
598# to /etc/environment.
599# If you set any of "ftp_proxy", "http_proxy", "https_proxy", or "no_proxy", then
600# Lima will automatically set an uppercase variant to the same value as well.
601# 🟢 Builtin default: {}
602# env:
603# KEY: value
604
605# Defines variables used for customizing the functionality.
606# Key names must start with an uppercase or lowercase letter followed by
607# any number of letters, digits, and underscores.
608# Values must not contain non-printable characters except for spaces and tabs.
609# These variables can be referenced as {{.Param.Key}} in lima.yaml.
610# In provisioning scripts and probes they are also available as predefined
611# environment variables, prefixed with "PARAM_" (so `Key` → `$PARAM_Key`).
612# param:
613# Key: value
614
615# Lima will override the proxy environment variables with values from the current process
616# environment (the environment in effect when you run `limactl start`). It will automatically
617# replace the strings "localhost" and "127.0.0.1" with the host gateway address from inside
618# the VM, so it stays routable. Use of the process environment can be disabled by setting
619# propagateProxyEnv to false.
620# 🟢 Builtin default: true
621propagateProxyEnv: null
622
623# The host agent implements a DNS server that looks up host names on the host
624# using the local system resolver. This means changing VPN and network settings
625# are reflected automatically into the guest, including conditional forward,
626# and mDNS lookup. By default, only IPv4 addresses will be returned. IPv6 addresses
627# can only work when using a vmnet network interface and the host has working
628# IPv6 configured as well.
629hostResolver:
630 # 🟢 Builtin default: true (except for hcs driver; it should be always false with hcs driver)
631 enabled: null
632 # 🟢 Builtin default: false
633 ipv6: null
634 # Static names can be defined here as an alternative to adding them to the hosts /etc/hosts.
635 # Values can be either other hostnames, or IP addresses. The host.lima.internal name is
636 # predefined to specify the gateway address to the host.
637 # 🟢 Builtin default: {}
638 hosts:
639 # guest.name: 127.1.1.1
640 # host.name: host.lima.internal
641
642# If hostResolver.enabled is false, then the following rules apply for configuring dns:
643# Explicitly set DNS addresses for qemu user-mode networking. By default, qemu picks *one*
644# nameserver from the host config and forwards all queries to this server. On macOS
645# Lima adds the nameservers configured for the first host interface in service order,
646# that has an IPv4 address, to the list. In case this still doesn't work (e.g. VPN
647# setups), the servers can be specified here explicitly. If nameservers are specified
648# here, then the configuration from network preferences will be ignored.
649# 🟢 Builtin default: []
650# dns:
651# - 1.1.1.1
652# - 1.0.0.1
653
654# Prefix to use for installing guest agent, and containerd with dependencies (if configured)
655# 🟢 Builtin default: /usr/local
656guestInstallPrefix: null
657
658# When the "plain" mode is enabled:
659# - the YAML properties for mounts, port forwarding, containerd, etc. will be ignored
660# - guest agent will not be running
661# - dependency packages like sshfs will not be installed into the VM
662# User-specified provisioning scripts will be still executed.
663# See https://lima-vm.io/docs/config/plain/ for the full behavior.
664# 🟢 Builtin default: false
665plain: null
666
667# When the "nestedVirtualization" feature is enabled:
668# - Allows running a VM inside the guest VM.
669# - The guest VM must configure QEMU with the `-cpu host` parameters to run a nested VM:
670# qemu-system-aarch64 -accel kvm -cpu host -M virt
671# - Without specifying `-cpu host`, nested virtualization may fail with the error:
672# qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument
673# - Supported with `vmType: vz` or `vmType: krunkit` on Apple M3 or later (macOS 15 or later).
674# - Supported with `vmType: qemu` for aarch64 guests (`-machine virt,virtualization=on`):
675# - macOS (HVF): QEMU 11.1 or later, on Apple M3 or later (macOS 15 or later).
676# - Linux (KVM): QEMU 10.1 or later, and a host kernel (6.16 or later) booted with `kvm-arm.mode=nested`.
677# - For x86_64 guests with `vmType: qemu` on Linux (KVM), nested virtualization is controlled by the host
678# (the `nested` parameter of the kvm_intel / kvm_amd module) and is exposed to the guest via `-cpu host`.
679# 🟢 Builtin default: false
680nestedVirtualization: null
681
682# EXPERIMENTAL
683# When enabled, an emulated TPM 2.0 device is provided to the guest via swtpm.
684# Requires swtpm to be installed on the host. Only supported with vmType: qemu.
685# Currently not supported on Windows hosts as swtpm doesn't support Windows.
686# 🟢 Builtin default: false
687tpm: null
688
689# ===================================================================== #
690# GLOBAL DEFAULTS AND OVERRIDES
691# ===================================================================== #
692
693# The builtin defaults can be changed globally by creating a $LIMA_HOME/_config/default.yaml
694# file. It will be used by ALL instances under the same $LIMA_HOME, and it
695# will be applied on each `limactl start`, so can affect instance restarts.
696
697# A similar mechanism is $LIMA_HOME/_config/override.yaml, which will take
698# precedence even over the settings in an instances lima.yaml file.
699# It also applies to ALL instances under the same $LIMA_HOME, and is applied
700# on each restart. It can be used to globally override settings, e.g. make
701# the mount of the home directory writable.
702
703# EXPERIMENTAL
704# A third mechanism is $LIMA_HOME/_config/base.yaml. It is similar to
705# `default.yaml` but will be merged during the `base` template embedding
706# when the instance is created, and not on every start. It becomes part
707# of the lima.yaml file.
708
709# On each instance start the config settings are determined: If a value is
710# not set in `lima.yaml`, then the `default.yaml` is used. If that file
711# doesn't exist, or the value is not defined in the file, then the builtin
712# default is used. If `override.yaml` exists and defines the value, then
713# it overrides whatever has been chosen so far.
714
715# For slices (e.g. `mounts`, `provision`) and maps (`env`) the entries are
716# combined instead of replacing each other. Slices are produced from override
717# settings, followed by lima.yaml, followed by default.yaml (but NOT from
718# builtin defaults). Maps are produced starting with default.yaml values,
719# overwriting with lima.yaml ones, overwriting with override.yaml.
720
721# Exceptions:
722# - `dns` will use the list from the highest priority file; they are not
723# combined. If override.yaml defines a list of `dns` entries, then the
724# settings in default.yaml and lima.yaml are ignored.
725#
726# - `mounts` will update the `writable` setting when 2 entries have the
727# same `location` value. For this reason they are processed in the opposite
728# order: starting with default, followed by lima, and then override.
729#
730# -`networks` will replace lower priority entries with the same `interface`
731# name with higher priority definitions. This does not apply if the
732# `interface` field is empty. `networks` are therefore also processed
733# in lowest to highest priority order.
734
735# ===================================================================== #
736# END OF TEMPLATE
737# ===================================================================== #