New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alpine, virtiofs: /etc/fstab
contains timezone: Asia/Tokyo
#2235
Comments
This is truly bizarre:
The only place we use the There is no code in And as far as I can tell the only place I'll try to repro later. |
Happens to me too: $ limactl shell alpine cat /etc/fstab
# /etc/fstab
#LIMA-START
mount0 /Users/jan virtiofs ro,nofail 0 0
mount1 /tmp/lima virtiofs rw,nofail 0 0
timezone: America/Vancouver
#LIMA-END Still don't understand how this is even possible. |
I figured it out. My confusion comes from the fact that the Rancher Desktop fork of This PR replaced the code that edited I see the responsible code in upstream at https://github.com/lima-vm/alpine-lima/blob/main/lima-init.sh#L48-L68. And it explains the mounts:
- [mount0, /Users/jan, virtiofs, "ro,nofail", "0", "0"]
- [mount1, /tmp/lima, virtiofs, "rw,nofail", "0", "0"]
timezone: America/Vancouver Since the mounts are modified via regular expressions, that just don't match on the Now the question is if the Rancher Desktop PR is appropriate for the Lima repo, or if we should fix the I have no idea why the PR never made it into the upstream repo; I guess I should audit the whole diff to see if anything else was dropped accidentally. |
The same thing happens with QEMU and
It doesn't happen for {{- if or (eq .MountType "9p") (eq .MountType "virtiofs") }}
{{- if .Mounts }}
mounts:
{{- range $m := $.Mounts}}
- [{{$m.Tag}}, {{$m.MountPoint}}, {{$m.Type}}, "{{$m.Options}}", "0", "0"]
{{- end }}
{{- end }}
{{- end }} The simplest fix would be to insert a blank line before the timezone (because the --- pkg/cidata/cidata.TEMPLATE.d/user-data
+++ pkg/cidata/cidata.TEMPLATE.d/user-data
@@ -21,6 +21,7 @@ mounts:
{{- end }}
{{- if .TimeZone }}
+
timezone: {{.TimeZone}}
{{- end }} |
Yes, it is needed to successfully mount directories whose names contain spaces. I'll create a PR. |
I believe this is fixed: $ limactl shell alpine cat /etc/fstab
# /etc/fstab
$ limactl shell alpine cat /etc/timezone
America/Vancouver |
Seems specific to alpine + virtiofs
The text was updated successfully, but these errors were encountered: