Skip to content

Commit 68b3644

Browse files
authored
Merge pull request #707 from AkihiroSuda/clarify-builtin-default
examples/default.yaml: clarify YAML default vs builtin default
2 parents ccc7a24 + ea9c1bb commit 68b3644

File tree

1 file changed

+42
-32
lines changed

1 file changed

+42
-32
lines changed

examples/default.yaml

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
# BASIC CONFIGURATION
33
# ===================================================================== #
44

5-
# Default values are specified by `null` instead of the builtin default value,
6-
# so they can be overridden by the default.yaml mechanism documented at the
7-
# end of this file.
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.
87

98
# Arch: "default", "x86_64", "aarch64".
10-
# Default: "default" (corresponds to the host architecture)
9+
# 🟢 Builtin default: "default" (corresponds to the host architecture)
1110
arch: null
1211

13-
# An image must support systemd and cloud-init.
14-
# Ubuntu and Fedora are known to work.
15-
# Default: none (must be specified)
12+
# OpenStack-compatible disk image.
13+
# 🟢 Builtin default: null (must be specified)
14+
# 🔵 This file: Ubuntu 21.10 Impish Indri images
1615
images:
1716
# Try to use a local image first.
1817
- location: "~/Downloads/impish-server-cloudimg-amd64.img"
@@ -28,55 +27,58 @@ images:
2827
arch: "aarch64"
2928

3029
# CPUs: if you see performance issues, try limiting cpus to 1.
31-
# Default: 4
30+
# 🟢 Builtin default: 4
3231
cpus: null
3332

3433
# Memory size
35-
# Default: "4GiB"
34+
# 🟢 Builtin default: "4GiB"
3635
memory: null
3736

3837
# Disk size
39-
# Default: "100GiB"
38+
# 🟢 Builtin default: "100GiB"
4039
disk: null
4140

4241
# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest
43-
# Default: null
42+
# 🟢 Builtin default: null (Mount nothing)
43+
# 🔵 This file: Mount the home as read-only, /tmp/lima as writable
4444
mounts:
4545
- location: "~"
4646
# CAUTION: `writable` SHOULD be false for the home directory.
4747
# Setting `writable` to true is possible, but untested and dangerous.
48-
# Default: false
48+
# 🟢 Builtin default: false
4949
writable: null
5050
sshfs:
5151
# Enabling the SSHFS cache will increase performance of the mounted filesystem, at
5252
# the cost of potentially not reflecting changes made on the host in a timely manner.
5353
# Warning: It looks like PHP filesystem access does not work correctly when
5454
# the cache is disabled.
55-
# Default: true
55+
# 🟢 Builtin default: true
5656
cache: null
5757
# SSHFS has an optional flag called 'follow_symlinks'. This allows mounts
5858
# to be properly resolved in the guest os and allow for access to the
5959
# contents of the symlink. As a result, symlinked files & folders on the Host
6060
# system will look and feel like regular files directories in the Guest OS.
61-
# Default: false
61+
# 🟢 Builtin default: false
6262
followSymlinks: null
6363
- location: "/tmp/lima"
64+
# 🟢 Builtin default: false
65+
# 🔵 This file: true (only for "/tmp/lima")
6466
writable: true
65-
sshfs:
66-
followSymlinks: null
6767

6868
ssh:
6969
# A localhost port of the host. Forwarded to port 22 of the guest.
70-
# Default: 0 (automatically assigned to a free port)
70+
# 🟢 Builtin default: 0 (automatically assigned to a free port)
71+
# NOTE: when the instance name is "default", the builtin default value is set to
72+
# 60022 for backward compatibility.
7173
localPort: 0
7274
# Load ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
7375
# This option is useful when you want to use other SSH-based
7476
# applications such as rsync with the Lima instance.
7577
# If you have an insecure key under ~/.ssh, do not use this option.
76-
# Default: true
78+
# 🟢 Builtin default: true
7779
loadDotSSHPubKeys: null
7880
# Forward ssh agent into the instance.
79-
# Default: false
81+
# 🟢 Builtin default: false
8082
forwardAgent: null
8183

8284
# ===================================================================== #
@@ -85,20 +87,21 @@ ssh:
8587

8688
containerd:
8789
# Enable system-wide (aka rootful) containerd and its dependencies (BuildKit, Stargz Snapshotter)
88-
# Default: false
90+
# 🟢 Builtin default: false
8991
system: null
9092
# Enable user-scoped (aka rootless) containerd and its dependencies
91-
# Default: true
93+
# 🟢 Builtin default: true
9294
user: null
9395
# # Override containerd archive
94-
# # Default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)
96+
# # 🟢 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)
9597
# archives:
9698
# - location: "~/Downloads/nerdctl-full-X.Y.Z-linux-amd64.tar.gz"
9799
# arch: "x86_64"
98100
# digest: "sha256:..."
99101

100102
# Provisioning scripts need to be idempotent because they might be called
101103
# multiple times, e.g. when the host VM is being restarted.
104+
# 🟢 Builtin default: null
102105
# provision:
103106
# # `system` is executed with the root privilege
104107
# - mode: system
@@ -116,6 +119,8 @@ containerd:
116119
# set number
117120
# EOF
118121

122+
# Probe scripts to check readiness.
123+
# 🟢 Builtin default: null
119124
# probes:
120125
# # Only `readiness` probes are supported right now.
121126
# - mode: readiness
@@ -139,25 +144,26 @@ containerd:
139144
# You can see what options are available for host emulation with: `qemu-system-$(arch) -cpu help`.
140145
# Setting of instructions is supported like this: "qemu64,+ssse3".
141146
cpuType:
142-
# Default: "cortex-a72" (or "host" when running on arm64)
147+
# 🟢 Builtin default: "cortex-a72" (or "host" when running on aarch64 host)
143148
aarch64: null
144-
# Default: "qemu64" (or "host" when running on amd64)
149+
# 🟢 Builtin default: "qemu64" (or "host" when running on x86_64 host)
145150
x86_64: null
146151

147152
firmware:
148-
# Use legacy BIOS instead of UEFI.
149-
# Default: false
153+
# Use legacy BIOS instead of UEFI. Ignored for aarch64.
154+
# 🟢 Builtin default: false
150155
legacyBIOS: null
151156

152157
video:
153158
# QEMU display, e.g., "none", "cocoa", "sdl", "gtk".
154-
# As of QEMU v5.2, enabling this is known to have negative impact
159+
# As of QEMU v6.2, enabling this is known to have negative impact
155160
# on performance on macOS hosts: https://gitlab.com/qemu-project/qemu/-/issues/334
156-
# Default: "none"
161+
# 🟢 Builtin default: "none"
157162
display: null
158163

159164
# The instance can get routable IP addresses from the vmnet framework using
160165
# https://github.com/lima-vm/vde_vmnet.
166+
# 🟢 Builtin default: null
161167
networks:
162168
# Lima can manage daemons for networks defined in $LIMA_HOME/_config/networks.yaml
163169
# automatically. Both vde_switch and vde_vmnet binaries must be installed into
@@ -177,7 +183,7 @@ networks:
177183
# optionally with vde:// prefix
178184
# - vnl: "vde:///var/run/vde.ctl"
179185
# # VDE Switch port number (not TCP/UDP port number). Set to 65535 for PTP mode.
180-
# # Default: 0
186+
# # Builtin default: 0
181187
# switchPort: 0
182188
# # MAC address of the instance; lima will pick one based on the instance name,
183189
# # so DHCP assigned ip addresses should remain constant over instance restarts.
@@ -234,6 +240,7 @@ networks:
234240
# The same template variables as for listing instances can be used, for example {{.Dir}}.
235241
# You can view the complete list of variables using `limactl list --list-fields` command.
236242
# It also includes {{.HostOS}} and {{.HostArch}} vars, for the runtime GOOS and GOARCH.
243+
# 🟢 Builtin default: null
237244
# message: |
238245
# This will be shown to the user.
239246

@@ -242,6 +249,7 @@ networks:
242249
# to /etc/environment.
243250
# If you set any of "ftp_proxy", "http_proxy", "https_proxy", or "no_proxy", then
244251
# Lima will automatically set an uppercase variant to the same value as well.
252+
# 🟢 Builtin default: null
245253
# env:
246254
# KEY: value
247255

@@ -250,7 +258,7 @@ networks:
250258
# replace the strings "localhost" and "127.0.0.1" with the host gateway address from inside
251259
# the VM, so it stays routable. Use of the process environment can be disabled by setting
252260
# propagateProxyEnv to false.
253-
# Default: true
261+
# 🟢 Builtn default: true
254262
propagateProxyEnv: null
255263

256264
# The host agent implements a DNS server that looks up host names on the host
@@ -260,13 +268,14 @@ propagateProxyEnv: null
260268
# can only work when using a vmnet network interface and the host has working
261269
# IPv6 configured as well.
262270
hostResolver:
263-
# Default: true
271+
# 🟢 Builtin default: true
264272
enabled: null
265-
# Default: false
273+
# 🟢 Builtin default: false
266274
ipv6: null
267275
# Static names can be defined here as an alternative to adding them to the hosts /etc/hosts.
268276
# Values can be either other hostnames, or IP addresses. The host.lima.internal name is
269277
# predefined to specify the gateway address to the host.
278+
# 🟢 Builtin default: null
270279
hosts:
271280
# guest.name: 127.1.1.1
272281
# host.name: host.lima.internal
@@ -278,6 +287,7 @@ hostResolver:
278287
# that has an IPv4 address, to the list. In case this still doesn't work (e.g. VPN
279288
# setups), the servers can be specified here explicitly. If nameservers are specified
280289
# here, then the configuration from network preferences will be ignored.
290+
# 🟢 Builtin default: null
281291
# dns:
282292
# - 1.1.1.1
283293
# - 1.0.0.1

0 commit comments

Comments
 (0)