diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 689c5614bd7b..3296ad4f3027 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -171,13 +171,6 @@ jobs: retry_on: error max_attempts: 3 command: ./hack/test-templates.sh templates/default.yaml - - name: "Test experimental/9p.yaml" - uses: nick-invision/retry@v2 - with: - timeout_minutes: 30 - retry_on: error - max_attempts: 3 - command: ./hack/test-templates.sh templates/experimental/9p.yaml - name: "Test test-misc.yaml" uses: nick-invision/retry@v2 with: diff --git a/examples/almalinux-8.yaml b/examples/almalinux-8.yaml index 904bdb90fda8..cd83d964242e 100644 --- a/examples/almalinux-8.yaml +++ b/examples/almalinux-8.yaml @@ -16,6 +16,8 @@ images: arch: "x86_64" - location: "https://repo.almalinux.org/almalinux/8/cloud/aarch64/images/AlmaLinux-8-GenericCloud-latest.aarch64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/almalinux-9.yaml b/examples/almalinux-9.yaml index 66e5e903b61b..bb9a2951522b 100644 --- a/examples/almalinux-9.yaml +++ b/examples/almalinux-9.yaml @@ -13,6 +13,8 @@ images: arch: "x86_64" - location: "https://repo.almalinux.org/almalinux/9/cloud/aarch64/images/AlmaLinux-9-GenericCloud-latest.aarch64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/centos-stream-8.yaml b/examples/centos-stream-8.yaml index 9e5e670f038d..f4c684ace0e4 100644 --- a/examples/centos-stream-8.yaml +++ b/examples/centos-stream-8.yaml @@ -17,6 +17,8 @@ images: arch: "x86_64" - location: "https://cloud.centos.org/centos/8-stream/aarch64/images/CentOS-Stream-GenericCloud-8-latest.aarch64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/centos-stream-9.yaml b/examples/centos-stream-9.yaml index 5a279014fb42..c7776be2cb07 100644 --- a/examples/centos-stream-9.yaml +++ b/examples/centos-stream-9.yaml @@ -14,6 +14,8 @@ images: arch: "x86_64" - location: "https://cloud.centos.org/centos/9-stream/aarch64/images/CentOS-Stream-GenericCloud-9-latest.aarch64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/debian-11.yaml b/examples/debian-11.yaml index 8dbdebe5c6d7..8205f2e852f1 100644 --- a/examples/debian-11.yaml +++ b/examples/debian-11.yaml @@ -14,6 +14,8 @@ images: - location: "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-arm64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/debian-12.yaml b/examples/debian-12.yaml index 1f02c332b1a1..01b743c76e4c 100644 --- a/examples/debian-12.yaml +++ b/examples/debian-12.yaml @@ -14,6 +14,8 @@ images: - location: "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/default.yaml b/examples/default.yaml index b204c7920b18..68cb0c71110b 100644 --- a/examples/default.yaml +++ b/examples/default.yaml @@ -99,7 +99,7 @@ mounts: # 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`) -# 🟢 Builtin default: "reverse-sshfs" (for QEMU), "virtiofs" (for vz) +# 🟢 Builtin default: "9p" (for QEMU, since Lima v1.0), "virtiofs" (for vz) mountType: null # Lima disks to attach to the instance. The disks will be accessible from inside the diff --git a/examples/deprecated/centos-7.yaml b/examples/deprecated/centos-7.yaml index de4a37b87339..cc22c2ca4f87 100644 --- a/examples/deprecated/centos-7.yaml +++ b/examples/deprecated/centos-7.yaml @@ -12,6 +12,8 @@ images: containerd: system: false user: false +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/experimental/opensuse-tumbleweed.yaml b/examples/experimental/opensuse-tumbleweed.yaml index c3fe0b1bc845..7ea7af3b294b 100644 --- a/examples/experimental/opensuse-tumbleweed.yaml +++ b/examples/experimental/opensuse-tumbleweed.yaml @@ -17,6 +17,8 @@ images: - location: "https://provo-mirror.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/opensuse.yaml b/examples/opensuse.yaml index b6a74ec007b5..940b653bb454 100644 --- a/examples/opensuse.yaml +++ b/examples/opensuse.yaml @@ -5,6 +5,8 @@ images: arch: "x86_64" - location: "https://download.opensuse.org/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.aarch64-Cloud.qcow2" arch: "aarch64" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/oraclelinux-8.yaml b/examples/oraclelinux-8.yaml index 3c22bcfe1225..105d69c55b51 100644 --- a/examples/oraclelinux-8.yaml +++ b/examples/oraclelinux-8.yaml @@ -12,6 +12,8 @@ images: - location: "https://yum.oracle.com/templates/OracleLinux/OL8/u8/aarch64/OL8U8_aarch64-kvm-b42.qcow" arch: "aarch64" digest: "sha256:8fe33ebf15780a2d3917a80b3bddabac834f97ac62fc677d35480ebc80cd6db5" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/oraclelinux-9.yaml b/examples/oraclelinux-9.yaml index 1677f0106c34..ae795c159fd2 100644 --- a/examples/oraclelinux-9.yaml +++ b/examples/oraclelinux-9.yaml @@ -9,6 +9,8 @@ images: - location: "https://yum.oracle.com/templates/OracleLinux/OL9/u2/aarch64/OL9U2_aarch64-kvm-b39.qcow" arch: "aarch64" digest: "sha256:48351bc318b59ab6d54a2f22d11a28891cd54b9ec2fbbcdf83a7c8483b856221" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/rocky-8.yaml b/examples/rocky-8.yaml index 592c6af8af6e..84ab05075a72 100644 --- a/examples/rocky-8.yaml +++ b/examples/rocky-8.yaml @@ -10,6 +10,8 @@ images: - location: "https://dl.rockylinux.org/pub/rocky/8.8/images/aarch64/Rocky-8-GenericCloud-Base-8.8-20230518.0.aarch64.qcow2" arch: "aarch64" digest: "sha256:dcedb823982fab67094c6c8237b8c06e28cf5c4a7bfe7db43ff23c1b9347c746" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/examples/rocky-9.yaml b/examples/rocky-9.yaml index ce20e1d7b515..ffa86dfe2b34 100644 --- a/examples/rocky-9.yaml +++ b/examples/rocky-9.yaml @@ -7,6 +7,8 @@ images: - location: "http://dl.rockylinux.org/pub/rocky/9.2/images/aarch64/Rocky-9-GenericCloud-Base-9.2-20230513.0.aarch64.qcow2" arch: "aarch64" digest: "sha256:eb7752c0be359007ad470e43b0d8c921e31d3ad7d4bcec9b6a2b18a8d17c05d8" +# The mount type is set to reverse-sshfs because 9p (default for QEMU) is not supported by the guest kernel. VZ users should specify `--mount-type=virtiofs` on `limactl create` for better performance. +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/hack/test-templates/test-misc.yaml b/hack/test-templates/test-misc.yaml index 8b6d69902234..541f56be8fe3 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 v0.14.0 or later. @@ -18,6 +19,8 @@ images: - location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img" arch: "aarch64" +# 9p is not compatible with `limactl snapshot` +mountType: "reverse-sshfs" mounts: - location: "~" - location: "/tmp/lima" diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go index 0cf38bc90e66..5b1608959f01 100644 --- a/pkg/limayaml/defaults.go +++ b/pkg/limayaml/defaults.go @@ -518,9 +518,12 @@ func FillDefault(y, d, o *LimaYAML, filePath string) { y.MountType = o.MountType } if y.MountType == nil || *y.MountType == "" { - if *y.VMType == VZ { + switch *y.VMType { + case VZ: y.MountType = pointer.String(VIRTIOFS) - } else { + case QEMU: + y.MountType = pointer.String(NINEP) + default: y.MountType = pointer.String(REVSSHFS) } } diff --git a/website/content/en/docs/faq/_index.md b/website/content/en/docs/faq/_index.md index 5633e76537c4..ee7af07032af 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) @@ -231,6 +232,24 @@ 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 driver for QEMU from `reverse-sshfs` to `9p`. + +This change 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 needs running the following command: + +``` +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?"