From 4bf19d486ddcd8aaae2e57694844e470981724d9 Mon Sep 17 00:00:00 2001 From: saxsir <1664554+saxsir@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:43:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20mount=E3=81=97=E3=81=9F=E3=83=87?= =?UTF-8?q?=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=8C=E3=83=91?= =?UTF-8?q?=E3=83=BC=E3=83=9F=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs. https://github.com/lima-vm/lima/issues/231#issuecomment-1145113879 --- Makefile | 5 ++++- docker_x86_64.yaml | 34 +++++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 4d82633..39c648c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # aarch64 or x86_64 ARCH:="aarch64" -TARGET:= +TARGET:= ifeq ($(ARCH),"aarch64") TARGET:=docker else @@ -17,5 +17,8 @@ stop: build: limactl start $(TARGET).yaml +clean: stop + limactl delete $(TARGET) + list: limactl list diff --git a/docker_x86_64.yaml b/docker_x86_64.yaml index ee3d37d..36e9803 100644 --- a/docker_x86_64.yaml +++ b/docker_x86_64.yaml @@ -40,6 +40,12 @@ memory: null # 🟢 Builtin default: "100GiB" disk: null + +# Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (EXPERIMENTAL, from QEMU’s virtio-9p-pci, aka virtfs), +# or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`) +# 🟢 Builtin default: "reverse-sshfs" +mountType: 9p + # Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest # 🟢 Builtin default: null (Mount nothing) # 🔵 This file: Mount the home as read-only, /tmp/lima as writable @@ -84,17 +90,31 @@ mounts: # See https://www.kernel.org/doc/Documentation/filesystems/9p.txt # 🟢 Builtin default: "fscache" for non-writable mounts, "mmap" for writable mounts cache: null + - location: "~/src" + writable: true + 9p: + # Supported security models are "passthrough", "mapped-xattr", "mapped-file" and "none". + # "mapped-xattr" and "mapped-file" are useful for persistent chown but incompatible with symlinks. + # 🟢 Builtin default: "none" (since Lima v0.13) + securityModel: "mapped-xattr" + # Select 9P protocol version. Valid options are: "9p2000" (legacy), "9p2000.u", "9p2000.L". + # 🟢 Builtin default: "9p2000.L" + protocolVersion: null + # The number of bytes to use for 9p packet payload, where 4KiB is the absolute minimum. + # 🟢 Builtin default: "128KiB" + msize: null + # Specifies a caching policy. Valid options are: "none", "loose", "fscache" and "mmap". + # Try choosing "mmap" or "none" if you see a stability issue with the default "fscache". + # See https://www.kernel.org/doc/Documentation/filesystems/9p.txt + # 🟢 Builtin default: "fscache" for non-writable mounts, "mmap" for writable mounts + cache: "mmap" - location: "/tmp/lima" # 🟢 Builtin default: false # 🔵 This file: true (only for "/tmp/lima") writable: true - - location: "~/src" - writable: true - -# Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (EXPERIMENTAL, from QEMU’s virtio-9p-pci, aka virtfs), -# or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`) -# 🟢 Builtin default: "reverse-sshfs" -mountType: 9p + 9p: + securityModel: "mapped-xattr" + cache: "mmap" ssh: # A localhost port of the host. Forwarded to port 22 of the guest.