Skip to content

Commit 08b597f

Browse files
authored
Merge pull request #1953 from AkihiroSuda/qemu-9p-default
qemu: use 9p by default
2 parents a26c031 + 8d217c4 commit 08b597f

File tree

24 files changed

+165
-57
lines changed

24 files changed

+165
-57
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,15 @@ jobs:
256256
if: matrix.template == '../hack/test-templates/test-misc.yaml'
257257
- name: "Show cache"
258258
run: ./hack/debug-cache.sh
259+
- name: "Adjust LIMACTL_CREATE_ARGS"
260+
# Change the mount type from 9p to reverse-sshfs, as a workaround for:
261+
#
262+
# > level=fatal msg="failed to get unprivileged mount flags for \"/home/runner/lima-container-engine-test-tmp/random\": stat /home/runner/lima-container-engine-test-tmp/random: no such file or directory"
263+
#
264+
# The issue is not reproducible on a local MacBook.
265+
# https://github.com/lima-vm/lima/issues/2701
266+
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --mount-type=reverse-sshfs" >>$GITHUB_ENV
267+
if: matrix.template == 'archlinux.yaml'
259268
- name: "Test"
260269
uses: nick-fields/retry@v3
261270
with:

examples/almalinux-8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ images:
1616
arch: "x86_64"
1717
- location: "https://repo.almalinux.org/almalinux/8/cloud/aarch64/images/AlmaLinux-8-GenericCloud-latest.aarch64.qcow2"
1818
arch: "aarch64"
19+
mountTypesUnsupported: ["9p"]
1920
mounts:
2021
- location: "~"
2122
- location: "/tmp/lima"

examples/almalinux-9.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ images:
1313
arch: "x86_64"
1414
- location: "https://repo.almalinux.org/almalinux/9/cloud/aarch64/images/AlmaLinux-9-GenericCloud-latest.aarch64.qcow2"
1515
arch: "aarch64"
16+
mountTypesUnsupported: ["9p"]
1617
mounts:
1718
- location: "~"
1819
- location: "/tmp/lima"

examples/centos-stream-9.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ images:
1414
arch: "x86_64"
1515
- location: "https://cloud.centos.org/centos/9-stream/aarch64/images/CentOS-Stream-GenericCloud-9-latest.aarch64.qcow2"
1616
arch: "aarch64"
17+
mountTypesUnsupported: ["9p"]
1718
mounts:
1819
- location: "~"
1920
- location: "/tmp/lima"

examples/debian-11.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ images:
1313
arch: "x86_64"
1414
- location: "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-arm64.qcow2"
1515
arch: "aarch64"
16-
16+
mountTypesUnsupported: ["9p"]
1717
mounts:
1818
- location: "~"
1919
- location: "/tmp/lima"

examples/debian-12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ images:
1313
arch: "x86_64"
1414
- location: "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2"
1515
arch: "aarch64"
16-
16+
mountTypesUnsupported: ["9p"]
1717
mounts:
1818
- location: "~"
1919
- location: "/tmp/lima"

examples/default.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ mounts:
7171
# Configure the mountPoint inside the guest.
7272
# 🟢 Builtin default: value of location
7373
mountPoint: null
74-
# CAUTION: `writable` SHOULD be false for the home directory.
75-
# Setting `writable` to true is possible, but untested and dangerous.
74+
# Setting `writable` to true is discouraged when mountType is set to "reverse-sshfs".
7675
# 🟢 Builtin default: false
7776
writable: null
7877
sshfs:
@@ -112,9 +111,14 @@ mounts:
112111
# 🔵 This file: true (only for "/tmp/lima")
113112
writable: true
114113

115-
# Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (EXPERIMENTAL, from QEMU’s virtio-9p-pci, aka virtfs),
114+
# List of mount types not supported by the kernel of this distro.
115+
# Also used to resolve the default mount type when not explicitly specified.
116+
# 🟢 Builtin default: null
117+
mountTypesUnsupported: null
118+
119+
# Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (EXPERIMENTAL until Lima v1.0, from QEMU’s virtio-9p-pci, aka virtfs),
116120
# or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`; will graduate from experimental in Lima v1.0)
117-
# 🟢 Builtin default: "reverse-sshfs" (for QEMU), "virtiofs" (for vz)
121+
# 🟢 Builtin default: "default" (resolved to be "9p" for QEMU since Lima v1.0, "virtiofs" for vz)
118122
mountType: null
119123

120124
# Enable inotify support for mounted directories (EXPERIMENTAL)

examples/experimental/9p.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# ⚠️ ⚠️ ⚠️ `template://experimental/9p` will be removed in Lima v1.0,
2+
# as 9p will graduate from experimental and will be the default mount type for QEMU.
3+
#
4+
# For Lima v1.0 and later, use the following command instead:
5+
# ```
6+
# limactl create --vm-type=qemu template://default
7+
# ```
8+
19
# This template requires Lima v0.10.0 or later.
210
# On macOS hosts, QEMU needs to be v7.0.0 or later. Homebrew's QEMU v6.2.0_1 can be used too.
311
# This template is planned to be merged to default.yaml in Lima v1.0 (ETA: 2022 Q2).

examples/experimental/opensuse-tumbleweed.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ images:
55
arch: "x86_64"
66
- location: "https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.aarch64-Cloud.qcow2"
77
arch: "aarch64"
8+
mountTypesUnsupported: ["9p"]
89
mounts:
910
- location: "~"
1011
- location: "/tmp/lima"

examples/opensuse-leap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ images:
55
arch: "x86_64"
66
- location: "https://download.opensuse.org/distribution/leap/15.6/appliances/openSUSE-Leap-15.6-Minimal-VM.aarch64-Cloud.qcow2"
77
arch: "aarch64"
8+
mountTypesUnsupported: ["9p"]
89
mounts:
910
- location: "~"
1011
- location: "/tmp/lima"

0 commit comments

Comments
 (0)