You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
limactl validate fails to validate lima.yml that use Go template in mount location #5670
SshHostKeyDir is intentionally blank as it's only intended to be populated via CLI with --param "SshHostKeyDir=$(realpath .agent-devenv/ssh_host_keys)".
I generate the SSH host keys on the host, and mount them to the VM. That way I can rebuild the VM freely without disrupting known_hosts.
time="2026-10-21T23:31:15Z" level=fatal msg="failed to validate YAML file `lima/agent-devenv-debian-13.yml`: field `mounts[0].location` must be an absolute path, got `.`"
Potential solutions in my order of preference:
The validate command should probably ignore the fields if it starts with a Go template.
Alternatively, it could allow us to pass --param so that we can specify example values.
Or both! (Ignore by default, or validate with specific --param values if passed to CLI.)
Thanks for chiming in! Yeah, I realized my first idea doesn't really fit. Sorry, my original proposal was from a user's perspective as it was before I looked at the code!
I can see you've self-assigned this, so I'll just leave what I'd established/wrote so far anyway. Your choice if you do anything with it!
Don't be afraid to pester though if you'd like me to handle it!
WIP test case (doesn't handle/pass the equivalent of --param yet):
@SethFalco Please see #5672. I'm going to leave it as a draft until I have time to properly review it; it is completely AI generated so far. I hope it does what you are looking for.
Activity
jandubois commentedon Oct 23, 2026
I don't see how this would work. The go templates are already evaluated by the time the lima template is validated.
Yes, I think both
limactl template validateandlimactl template copyshould support--setand--paramoptions.SethFalco commentedon Oct 23, 2026
Thanks for chiming in! Yeah, I realized my first idea doesn't really fit. Sorry, my original proposal was from a user's perspective as it was before I looked at the code!
I can see you've self-assigned this, so I'll just leave what I'd established/wrote so far anyway. Your choice if you do anything with it!
Don't be afraid to pester though if you'd like me to handle it!
WIP test case (doesn't handle/pass the equivalent of
--paramyet):pkg/limayaml/validate_test.goThe "issue" is that the Go templates are interpolated in
Load.Validatedoesn't have the context of which properties are dynamic or not.So indeed, an easier fix would probably be to make it possible to have
limactl validatesupport args the same way other commands can.jandubois commentedon Oct 23, 2026
@SethFalco Please see #5672. I'm going to leave it as a draft until I have time to properly review it; it is completely AI generated so far. I hope it does what you are looking for.
limactl template: add --set and --param to copy and validate