From 8d217c43895445b9a87d82496d77b806bce093ba Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 26 Oct 2023 22:50:29 +0900 Subject: [PATCH] qemu: use 9p by default Templates for the following distro are updated to continue using reverse-sshfs, as 9p is not available on them. - AlmaLinux - CentOS Stream - Debian - openSUSE - Oracle Linux - Rocky Linux Close issue 971 Signed-off-by: Akihiro Suda --- .github/workflows/test.yml | 9 +++ examples/almalinux-8.yaml | 1 + examples/almalinux-9.yaml | 1 + examples/centos-stream-9.yaml | 1 + examples/debian-11.yaml | 2 +- examples/debian-12.yaml | 2 +- examples/default.yaml | 7 ++- .../experimental/opensuse-tumbleweed.yaml | 1 + examples/opensuse-leap.yaml | 1 + examples/oraclelinux-8.yaml | 1 + examples/oraclelinux-9.yaml | 1 + examples/rocky-8.yaml | 1 + examples/rocky-9.yaml | 1 + hack/test-templates/test-misc.yaml | 3 + pkg/limayaml/defaults.go | 38 ++++++++++++- pkg/limayaml/limayaml.go | 55 ++++++++++--------- pkg/limayaml/validate.go | 6 ++ pkg/version/versionutil/versionutil.go | 40 ++++++++------ pkg/version/versionutil/versionutil_test.go | 10 ++++ pkg/vz/vz_driver_darwin.go | 1 + website/content/en/docs/faq/_index.md | 20 +++++++ 21 files changed, 153 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e861d09a79f..21023a39d4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -256,6 +256,15 @@ jobs: if: matrix.template == '../hack/test-templates/test-misc.yaml' - name: "Show cache" run: ./hack/debug-cache.sh + - name: "Adjust LIMACTL_CREATE_ARGS" + # Change the mount type from 9p to reverse-sshfs, as a workaround for: + # + # > 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" + # + # The issue is not reproducible on a local MacBook. + # https://github.com/lima-vm/lima/issues/2701 + run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --mount-type=reverse-sshfs" >>$GITHUB_ENV + if: matrix.template == 'archlinux.yaml' - name: "Test" uses: nick-fields/retry@v3 with: diff --git a/examples/almalinux-8.yaml b/examples/almalinux-8.yaml index f8cd58acefe..718769f516d 100644 --- a/examples/almalinux-8.yaml +++ b/examples/almalinux-8.yaml @@ -16,6 +16,7 @@ images: arch: "x86_64" - location: "https://repo.almalinux.org/almalinux/8/cloud/aarch64/images/AlmaLinux-8-GenericCloud-latest.aarch64.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/almalinux-9.yaml b/examples/almalinux-9.yaml index 6575950a5ab..f39bfce8f25 100644 --- a/examples/almalinux-9.yaml +++ b/examples/almalinux-9.yaml @@ -13,6 +13,7 @@ images: arch: "x86_64" - location: "https://repo.almalinux.org/almalinux/9/cloud/aarch64/images/AlmaLinux-9-GenericCloud-latest.aarch64.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/centos-stream-9.yaml b/examples/centos-stream-9.yaml index 1989c9816ce..99832545b61 100644 --- a/examples/centos-stream-9.yaml +++ b/examples/centos-stream-9.yaml @@ -14,6 +14,7 @@ images: arch: "x86_64" - location: "https://cloud.centos.org/centos/9-stream/aarch64/images/CentOS-Stream-GenericCloud-9-latest.aarch64.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/debian-11.yaml b/examples/debian-11.yaml index 92eeea266a7..1e74a7ff5c1 100644 --- a/examples/debian-11.yaml +++ b/examples/debian-11.yaml @@ -13,7 +13,7 @@ images: arch: "x86_64" - location: "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-arm64.qcow2" arch: "aarch64" - +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/debian-12.yaml b/examples/debian-12.yaml index ccf4218d975..9b9ba1645da 100644 --- a/examples/debian-12.yaml +++ b/examples/debian-12.yaml @@ -13,7 +13,7 @@ images: arch: "x86_64" - location: "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2" arch: "aarch64" - +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/default.yaml b/examples/default.yaml index 1e1e478f995..490d948e6a2 100644 --- a/examples/default.yaml +++ b/examples/default.yaml @@ -111,9 +111,14 @@ mounts: # 🔵 This file: true (only for "/tmp/lima") writable: true +# List of mount types not supported by the kernel of this distro. +# Also used to resolve the default mount type when not explicitly specified. +# 🟢 Builtin default: null +mountTypesUnsupported: null + # 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), # or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`; will graduate from experimental in Lima v1.0) -# 🟢 Builtin default: "reverse-sshfs" (for QEMU), "virtiofs" (for vz) +# 🟢 Builtin default: "default" (resolved to be "9p" for QEMU since Lima v1.0, "virtiofs" for vz) mountType: null # Enable inotify support for mounted directories (EXPERIMENTAL) diff --git a/examples/experimental/opensuse-tumbleweed.yaml b/examples/experimental/opensuse-tumbleweed.yaml index fdb9802e5a0..ec3b0492fc8 100644 --- a/examples/experimental/opensuse-tumbleweed.yaml +++ b/examples/experimental/opensuse-tumbleweed.yaml @@ -5,6 +5,7 @@ images: arch: "x86_64" - location: "https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.aarch64-Cloud.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/opensuse-leap.yaml b/examples/opensuse-leap.yaml index e0f1360018f..f74feca7d96 100644 --- a/examples/opensuse-leap.yaml +++ b/examples/opensuse-leap.yaml @@ -5,6 +5,7 @@ images: arch: "x86_64" - location: "https://download.opensuse.org/distribution/leap/15.6/appliances/openSUSE-Leap-15.6-Minimal-VM.aarch64-Cloud.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/oraclelinux-8.yaml b/examples/oraclelinux-8.yaml index 76ac366cde7..c3f5ca9cd83 100644 --- a/examples/oraclelinux-8.yaml +++ b/examples/oraclelinux-8.yaml @@ -12,6 +12,7 @@ images: - location: "https://yum.oracle.com/templates/OracleLinux/OL8/u10/aarch64/OL8U10_aarch64-kvm-cloud-b100.qcow2" arch: "aarch64" digest: "sha256:def7b8055e275507a593f07dc6076a2adc5967af046c003072b479e69f25f407" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/oraclelinux-9.yaml b/examples/oraclelinux-9.yaml index 4c79205d009..d9e1443c006 100644 --- a/examples/oraclelinux-9.yaml +++ b/examples/oraclelinux-9.yaml @@ -9,6 +9,7 @@ images: - location: "https://yum.oracle.com/templates/OracleLinux/OL9/u4/aarch64/OL9U4_aarch64-kvm-cloud-b90.qcow2" arch: "aarch64" digest: "sha256:1f4e20190e87c76e8c3b4a9e15e660972386cbfa4f128e5cdcd8faa43a713d44" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/rocky-8.yaml b/examples/rocky-8.yaml index 21ca6e36abc..e2ad6e66614 100644 --- a/examples/rocky-8.yaml +++ b/examples/rocky-8.yaml @@ -16,6 +16,7 @@ images: arch: "x86_64" - location: "https://dl.rockylinux.org/pub/rocky/8/images/aarch64/Rocky-8-GenericCloud.latest.aarch64.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/rocky-9.yaml b/examples/rocky-9.yaml index 5e9e483d73d..8976d84a78d 100644 --- a/examples/rocky-9.yaml +++ b/examples/rocky-9.yaml @@ -14,6 +14,7 @@ images: arch: "x86_64" - location: "https://dl.rockylinux.org/pub/rocky/9/images/aarch64/Rocky-9-GenericCloud.latest.aarch64.qcow2" arch: "aarch64" +mountTypesUnsupported: ["9p"] mounts: - location: "~" - location: "/tmp/lima" diff --git a/hack/test-templates/test-misc.yaml b/hack/test-templates/test-misc.yaml index 2f2c17cae4b..6284c4acc67 100644 --- a/hack/test-templates/test-misc.yaml +++ b/hack/test-templates/test-misc.yaml @@ -1,5 +1,6 @@ # The test template for testing misc configurations: # - disk +# - snapshots # - (More to come) # # This template requires Lima v1.0.0-alpha.0 or later. @@ -18,6 +19,8 @@ images: - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" +# 9p is not compatible with `limactl snapshot` +mountTypesUnsupported: ["9p"] mounts: - location: "~" writable: true diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go index 2ba3534b7ca..8e4d2ca9756 100644 --- a/pkg/limayaml/defaults.go +++ b/pkg/limayaml/defaults.go @@ -27,6 +27,7 @@ import ( "github.com/lima-vm/lima/pkg/ptr" "github.com/lima-vm/lima/pkg/store/dirnames" "github.com/lima-vm/lima/pkg/store/filenames" + "github.com/lima-vm/lima/pkg/version/versionutil" ) const ( @@ -171,6 +172,17 @@ func defaultGuestInstallPrefix() string { // - CACertificates Files and Certs are uniquely appended in d, y, o order func FillDefault(y, d, o *LimaYAML, filePath string) { instDir := filepath.Dir(filePath) + + // existingLimaVersion can be empty if the instance was created with Lima prior to v0.20, + // or, when editing a template file without an instance (`limactl edit foo.yaml`) + var existingLimaVersion string + limaVersionFile := filepath.Join(instDir, filenames.LimaVersion) + if b, err := os.ReadFile(limaVersionFile); err == nil { + existingLimaVersion = strings.TrimSpace(string(b)) + } else if !errors.Is(err, os.ErrNotExist) { + logrus.WithError(err).Warnf("Failed to read %q", limaVersionFile) + } + if y.VMType == nil { y.VMType = d.VMType } @@ -547,6 +559,11 @@ func FillDefault(y, d, o *LimaYAML, filePath string) { } } + y.MountTypesUnsupported = append(append(o.MountTypesUnsupported, y.MountTypesUnsupported...), d.MountTypesUnsupported...) + mountTypesUnsupported := make(map[string]struct{}) + for _, f := range y.MountTypesUnsupported { + mountTypesUnsupported[f] = struct{}{} + } // MountType has to be resolved before resolving Mounts if y.MountType == nil { y.MountType = d.MountType @@ -554,14 +571,29 @@ func FillDefault(y, d, o *LimaYAML, filePath string) { if o.MountType != nil { y.MountType = o.MountType } - if y.MountType == nil || *y.MountType == "" { - if *y.VMType == VZ { + if y.MountType == nil || *y.MountType == "" || *y.MountType == "default" { + switch *y.VMType { + case VZ: y.MountType = ptr.Of(VIRTIOFS) - } else { + case QEMU: + y.MountType = ptr.Of(NINEP) + if _, ok := mountTypesUnsupported[NINEP]; ok { + // Use REVSSHFS if the instance does not support 9p + y.MountType = ptr.Of(REVSSHFS) + } else if isExistingInstanceDir(instDir) && !versionutil.GreaterEqual(existingLimaVersion, "1.0.0") { + // Use REVSSHFS if the instance was created with Lima prior to v1.0 + y.MountType = ptr.Of(REVSSHFS) + } + default: y.MountType = ptr.Of(REVSSHFS) } } + if _, ok := mountTypesUnsupported[*y.MountType]; ok { + // We cannot return an error here, but Validate() will return it. + logrus.Warnf("Unsupported mount type: %q", *y.MountType) + } + if y.MountInotify == nil { y.MountInotify = d.MountInotify } diff --git a/pkg/limayaml/limayaml.go b/pkg/limayaml/limayaml.go index ee02018e3ff..e4ed9ff8e92 100644 --- a/pkg/limayaml/limayaml.go +++ b/pkg/limayaml/limayaml.go @@ -7,33 +7,34 @@ import ( ) type LimaYAML struct { - MinimumLimaVersion *string `yaml:"minimumLimaVersion,omitempty" json:"minimumLimaVersion,omitempty"` - VMType *VMType `yaml:"vmType,omitempty" json:"vmType,omitempty"` - VMOpts VMOpts `yaml:"vmOpts,omitempty" json:"vmOpts,omitempty"` - OS *OS `yaml:"os,omitempty" json:"os,omitempty"` - Arch *Arch `yaml:"arch,omitempty" json:"arch,omitempty"` - Images []Image `yaml:"images" json:"images"` // REQUIRED - CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty"` - CPUs *int `yaml:"cpus,omitempty" json:"cpus,omitempty"` - Memory *string `yaml:"memory,omitempty" json:"memory,omitempty"` // go-units.RAMInBytes - Disk *string `yaml:"disk,omitempty" json:"disk,omitempty"` // go-units.RAMInBytes - AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty"` - Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"` - MountType *MountType `yaml:"mountType,omitempty" json:"mountType,omitempty"` - MountInotify *bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty"` - SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty"` // REQUIRED (FIXME) - Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"` - Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"` - Video Video `yaml:"video,omitempty" json:"video,omitempty"` - Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty"` - UpgradePackages *bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty"` - Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty"` - GuestInstallPrefix *string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty"` - Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty"` - PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"` - CopyToHost []CopyToHost `yaml:"copyToHost,omitempty" json:"copyToHost,omitempty"` - Message string `yaml:"message,omitempty" json:"message,omitempty"` - Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty"` + MinimumLimaVersion *string `yaml:"minimumLimaVersion,omitempty" json:"minimumLimaVersion,omitempty"` + VMType *VMType `yaml:"vmType,omitempty" json:"vmType,omitempty"` + VMOpts VMOpts `yaml:"vmOpts,omitempty" json:"vmOpts,omitempty"` + OS *OS `yaml:"os,omitempty" json:"os,omitempty"` + Arch *Arch `yaml:"arch,omitempty" json:"arch,omitempty"` + Images []Image `yaml:"images" json:"images"` // REQUIRED + CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty"` + CPUs *int `yaml:"cpus,omitempty" json:"cpus,omitempty"` + Memory *string `yaml:"memory,omitempty" json:"memory,omitempty"` // go-units.RAMInBytes + Disk *string `yaml:"disk,omitempty" json:"disk,omitempty"` // go-units.RAMInBytes + AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty"` + Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"` + MountTypesUnsupported []string `yaml:"mountTypesUnsupported,omitempty" json:"mountTypesUnsupported,omitempty"` + MountType *MountType `yaml:"mountType,omitempty" json:"mountType,omitempty"` + MountInotify *bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty"` + SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty"` // REQUIRED (FIXME) + Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"` + Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"` + Video Video `yaml:"video,omitempty" json:"video,omitempty"` + Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty"` + UpgradePackages *bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty"` + Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty"` + GuestInstallPrefix *string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty"` + Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty"` + PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"` + CopyToHost []CopyToHost `yaml:"copyToHost,omitempty" json:"copyToHost,omitempty"` + Message string `yaml:"message,omitempty" json:"message,omitempty"` + Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty"` // `network` was deprecated in Lima v0.7.0, removed in Lima v0.14.0. Use `networks` instead. Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"` Param map[string]string `yaml:"param,omitempty" json:"param,omitempty"` diff --git a/pkg/limayaml/validate.go b/pkg/limayaml/validate.go index eb4181bb3e3..123f9b85432 100644 --- a/pkg/limayaml/validate.go +++ b/pkg/limayaml/validate.go @@ -185,6 +185,12 @@ func Validate(y *LimaYAML, warn bool) error { return fmt.Errorf("field `mountType` must be %q or %q or %q, or %q, got %q", REVSSHFS, NINEP, VIRTIOFS, WSLMount, *y.MountType) } + for _, f := range y.MountTypesUnsupported { + if f == *y.MountType { + return fmt.Errorf("field `mountType` must not be one of %v (`mountTypesUnsupported`), got %q", y.MountTypesUnsupported, *y.MountType) + } + } + if warn && runtime.GOOS != "linux" { for i, mount := range y.Mounts { if mount.Virtiofs.QueueSize != nil { diff --git a/pkg/version/versionutil/versionutil.go b/pkg/version/versionutil/versionutil.go index f7b81a5823b..d95d11bd0db 100644 --- a/pkg/version/versionutil/versionutil.go +++ b/pkg/version/versionutil/versionutil.go @@ -15,26 +15,34 @@ func Parse(version string) (*semver.Version, error) { return semver.NewVersion(version) } -// GreaterThan returns true if the Lima version used to create an instance is greater -// than a specific older version. Always returns false if the Lima version is the empty string. -// Unparsable lima versions (like SHA1 commit ids) are treated as the latest version and return true. -// limaVersion is a `github describe` string, not a semantic version. So "0.19.1-16-gf3dc6ed.m" -// will be considered greater than "0.19.1". -func GreaterThan(limaVersion, oldVersion string) bool { +func compare(limaVersion, oldVersion string) int { if limaVersion == "" { - return false + if oldVersion == "" { + return 0 + } + return -1 } version, err := Parse(limaVersion) if err != nil { - return true + return 1 } - switch version.Compare(*semver.New(oldVersion)) { - case -1: - return false - case +1: - return true - case 0: - return strings.Contains(limaVersion, "-") + cmp := version.Compare(*semver.New(oldVersion)) + if cmp == 0 && strings.Contains(limaVersion, "-") { + cmp = 1 } - panic("unreachable") + return cmp +} + +// GreaterThan returns true if the Lima version used to create an instance is greater +// than a specific older version. Always returns false if the Lima version is the empty string. +// Unparsable lima versions (like SHA1 commit ids) are treated as the latest version and return true. +// limaVersion is a `github describe` string, not a semantic version. So "0.19.1-16-gf3dc6ed.m" +// will be considered greater than "0.19.1". +func GreaterThan(limaVersion, oldVersion string) bool { + return compare(limaVersion, oldVersion) > 0 +} + +// GreaterEqual return true if limaVersion >= oldVersion. +func GreaterEqual(limaVersion, oldVersion string) bool { + return compare(limaVersion, oldVersion) >= 0 } diff --git a/pkg/version/versionutil/versionutil_test.go b/pkg/version/versionutil/versionutil_test.go index 410a8848353..46f69a790a0 100644 --- a/pkg/version/versionutil/versionutil_test.go +++ b/pkg/version/versionutil/versionutil_test.go @@ -14,3 +14,13 @@ func TestGreaterThan(t *testing.T) { assert.Equal(t, GreaterThan("0.2.0", "0.1.0"), true) assert.Equal(t, GreaterThan("abacab", "0.1.0"), true) } + +func TestGreaterEqual(t *testing.T) { + assert.Equal(t, GreaterEqual("", ""), true) + assert.Equal(t, GreaterEqual("", "0.1.0"), false) + assert.Equal(t, GreaterEqual("0.0.1", "0.1.0"), false) + assert.Equal(t, GreaterEqual("0.1.0", "0.1.0"), true) + assert.Equal(t, GreaterEqual("0.1.0-2", "0.1.0"), true) + assert.Equal(t, GreaterEqual("0.2.0", "0.1.0"), true) + assert.Equal(t, GreaterEqual("abacab", "0.1.0"), true) +} diff --git a/pkg/vz/vz_driver_darwin.go b/pkg/vz/vz_driver_darwin.go index 28fa8560b74..b8c17cdaff5 100644 --- a/pkg/vz/vz_driver_darwin.go +++ b/pkg/vz/vz_driver_darwin.go @@ -39,6 +39,7 @@ var knownYamlProperties = []string{ "Message", "Mounts", "MountType", + "MountTypesUnsupported", "MountInotify", "Networks", "OS", diff --git a/website/content/en/docs/faq/_index.md b/website/content/en/docs/faq/_index.md index 6457c1c00f3..fd3914b5f97 100644 --- a/website/content/en/docs/faq/_index.md +++ b/website/content/en/docs/faq/_index.md @@ -32,6 +32,7 @@ weight: 6 - [Filesystem sharing](#filesystem-sharing) - ["Filesystem is slow"](#filesystem-is-slow) - ["Filesystem is not writable"](#filesystem-is-not-writable) + - ["Filesystem is unmounted after upgrading Lima to v1.0 (pre-release)"](#filesystem-is-unmounted-after-upgrading-lima-to-v10-pre-release) - [External projects](#external-projects) - ["I am using Rancher Desktop. How to deal with the underlying Lima?"](#i-am-using-rancher-desktop-how-to-deal-with-the-underlying-lima) - ["Hints for debugging other problems?"](#hints-for-debugging-other-problems) @@ -230,6 +231,25 @@ mounts: Run `limactl edit ` to open the YAML editor for an existing instance. +#### "Filesystem is unmounted after upgrading Lima to v1.0 (pre-release)" + +Lima v1.0 (pre-release) changed the default mount type for QEMU from `reverse-sshfs` to `9p`. + +The `9p` mount type is known to be incompatible with the following guest operating systems: +- AlmaLinux, CentOS Stream, Oracle Linux, and RockyLinux +- Debian GNU/Linux +- openSUSE + +A new instance of these OS still use `reverse-sshfs` by default. +However, an existing instance created with a previous version of Lima may potentially need +running the following command (usually not needed): + +``` +limactl edit --mount-type=reverse-sshfs +``` + +Ubuntu users are not affected by this issue. + ### External projects #### "I am using Rancher Desktop. How to deal with the underlying Lima?"