Skip to content

Commit

Permalink
qemu: use 9p by default
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
AkihiroSuda committed Oct 26, 2023
1 parent 3e736f6 commit c0d19c6
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 10 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions examples/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/almalinux-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/centos-stream-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/centos-stream-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/debian-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion examples/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions examples/deprecated/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/experimental/opensuse-tumbleweed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/opensuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/oraclelinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/oraclelinux-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/rocky-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions examples/rocky-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 5 additions & 2 deletions pkg/limayaml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit c0d19c6

Please sign in to comment.