Skip to content

Commit 9210ae0

Browse files
authored
Merge pull request #3951 from AkihiroSuda/remove-tmp-lima
templates: default: remove /tmp/lima
2 parents edd734f + 6450ac7 commit 9210ae0

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

pkg/yqutil/yqutil_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func TestEvaluateExpressionComplex(t *testing.T) {
6767
content := `
6868
# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest
6969
# 🟢 Builtin default: null (Mount nothing)
70-
# 🔵 This file: Mount the home as read-only, /tmp/lima as writable
70+
# 🔵 This file: Mount the home as read-only
7171
mounts:
7272
- location: "~"
7373
# Configure the mountPoint inside the guest.
@@ -80,7 +80,7 @@ mounts:
8080
expected := `
8181
# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest
8282
# 🟢 Builtin default: null (Mount nothing)
83-
# 🔵 This file: Mount the home as read-only, /tmp/lima as writable
83+
# 🔵 This file: Mount the home as read-only
8484
mounts:
8585
- location: "~"
8686
# Configure the mountPoint inside the guest.

templates/_default/mounts.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
mounts:
22
- location: "~"
33

4-
- location: "{{.GlobalTempDir}}/lima"
5-
mountPoint: /tmp/lima
6-
writable: true
4+
# # /tmp/lima is no longer mounted by default since Lima v2.0.
5+
# - location: "{{.GlobalTempDir}}/lima"
6+
# mountPoint: /tmp/lima
7+
# writable: true

templates/default.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ disk: null
3838
# {{.GlobalTempDir}}, and {{.TempDir}}. The global temp dir is always "/tmp" on Unix.
3939
# "mountPoint" can use these template variables: {{.Home}}, {{.Name}}, {{.Hostname}}, {{.UID}}, {{.User}}, and {{.Param.Key}}.
4040
# 🟢 Builtin default: [] (Mount nothing)
41-
# 🔵 This file: Mount the home as read-only, /tmp/lima as writable (inherited via the `base` mechanism later in this file)
41+
# 🔵 This file: Mount the home as read-only (inherited via the `base` mechanism later in this file)
42+
# Until Lima v1.2, /tmp/lima was mounted too as writable.
4243
mounts: []
4344
# - location: "~"
4445
# # Configure the mountPoint inside the guest.
@@ -79,10 +80,6 @@ mounts: []
7980
# # See https://www.kernel.org/doc/Documentation/filesystems/9p.txt
8081
# # 🟢 Builtin default: "fscache" for non-writable mounts, "mmap" for writable mounts
8182
# cache: null
82-
# - location: "/tmp/lima"
83-
# # 🟢 Builtin default: false
84-
# # 🔵 This file: true (only for "/tmp/lima")
85-
# writable: true
8683

8784
# List of mount types not supported by the kernel of this distro.
8885
# Also used to resolve the default mount type when not explicitly specified.

website/content/en/docs/config/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The current default spec:
1010
- CPU: 4 cores
1111
- Memory: 4 GiB
1212
- Disk: 100 GiB
13-
- Mounts: `~` (read-only), `/tmp/lima` (writable)
13+
- Mounts: `~` (read-only), `/tmp/lima` (writable; removed in Lima v2.0)
1414
- SSH: 127.0.0.1:<Random port>
1515

1616
For environment variables, see [Environment Variables](./environment-variables/).

website/content/en/docs/examples/_index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ lima uname -a
1010

1111
## Accessing host files
1212

13-
By default, the VM has read-only accesses to `/Users/<USERNAME>` and read-write accesses to `/tmp/lima`.
13+
By default, the VM has read-only accesses to `/Users/<USERNAME>`.
1414

1515
To allow writing to `/Users/<USERNAME>`:
1616
```bash
@@ -20,6 +20,14 @@ limactl edit --mount-writable --mount-type=virtiofs
2020
Specifying `--mount-type=virtiofs` is not necessary here, but it is highly recommended
2121
for the best performance and stability.
2222

23+
{{% alert title="Hint" color=success %}}
24+
Lima prior to v2.0 mounts `/tmp/lima` too in read-write mode.
25+
26+
This directory is no longer mounted by default since Lima v2.0.
27+
To mount `/tmp/lima` in Lima v2.0 and later, set `--mount /tmp/lima:w`.
28+
The `:w` suffix indicates read-write mode.
29+
{{% /alert %}}
30+
2331
## Running containers
2432
{{< tabpane text=true >}}
2533

0 commit comments

Comments
 (0)