The edit command never registers --plain (only create/start do), so the
docs example failed with "unknown flag: --plain". Note that plain mode
can only be chosen when the instance is created.
Fixes#5688
Signed-off-by: ump45nose <52391318+ump45nose@users.noreply.github.com>
`listInstances` passed the stderr of `limactl list --json` through to the
terminal. On a fresh installation it printed "No instance found. Run
`limactl create` to create an instance." before the TUI started. The
warning stayed hidden behind the TUI and reappeared when the menu
suspended to run `limactl create`, which was confusing.
Buffer the stderr and only include it in the error when the command fails.
Also fix the error from `cmd.Start()` being discarded.
Fixes#5681
Assisted-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
errcheck v1.30.0 reports a bare receive from an error channel as an
unchecked error. Each receive it flagged waits for a process or server
to exit after Lima has stopped or killed it, so the error adds nothing;
discard it with "_ = <-ch".
But staticcheck's S1005 flags "_ = <-ch" as an unnecessary blank
assignment, so each spelling of the discard fails one of the two
linters. Disable S1005. It also flags blank identifiers in range loops,
such as "for _ = range", but gofmt's simplify step and revive's range
rule still catch those.
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
CNCF moved Lima's maintainers from project-maintainers.csv to
project-maintainers-.project.csv, which it generates from
lima-vm/.project/maintainers.yaml and the maintainers' LFID profiles.
The governance page still linked the old file, and its note told
whoever changes an affiliation to edit that file.
Link the new file, and have the note point to those two sources
instead.
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
The boot modprobe list now includes nft_compat. On dnf, when iptables is
being installed and modprobe -n xt_comment fails, the package script
installs kernel-modules-extra for the running kernel, or
kernel-uek-modules when the release is UEK, then runs the modprobe
script again so xt_comment and nft_compat are loaded before rootless
BuildKit starts. On AlmaLinux 10 those modules ship in
kernel-modules-extra, not kernel-modules. A modules package missing
from the repositories yields a warning and the install continues. The
Oracle Linux virtiofs path still requests kernel-uek-modules, appends it
only when it is not already listed, and UEK repositories are enabled
whenever that package is in the extra set.
Fixes#5623
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
A template can leave a param empty for `limactl create --param` to
fill in. When that param sets a mount location, `limactl validate`
fails, because an empty location is not an absolute path.
`validate` and `copy` now accept the `--set` and `--param` flags that
`limactl create` already has, so `validate` can check a template with
the values that `create` will get.
Shell completion for `--set` now works for every command that takes
the flag, so the new template flags complete too. Before, only
`limactl create` and `limactl start` completed it; `edit`, `clone`,
`rename` and `restart` did not.
Fixes#5670
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
Running tests was failing on a fresh clone before! (っ╥﹏╥ς)
hidutil attach -nomount is deprecated on on macOS 27 (Touhou), so it logs
the following to STDERR whenever it's used:
hdiutil: WARNING: 'hdiutil attach -nomount ...' is deprecated. Please use
'diskutil image attach --noMount ...' instead.
For this specific command, it might be better to read STDOUT only.
Signed-off-by: Seth Falco <seth@falco.fun>
To avoid syncing generated or sensitive data into a vm, a new sync-exclude flag
is added, to be used in conjunction with --sync. This allows to specify rsync excludes
which are then not synced.
Additionally a .limasyncignore file can be created, which also considered and
passed to rsync as the exclude-from flag.
Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
Signed-off-by: Ansuman Sahoo <anshumansahoo500@gmail.com>
macOS ssh polls with select(), so the ControlMaster quits with
"poll: Invalid argument" once it holds fd 1024. The hostagent raises
the fd limit that its children inherit, and Virtualization.framework
raises it again during VM start. So about 1000 forwarded connections
kill the master, and every forward it holds dies with it. Nothing logs
why.
Run every ssh that the hostagent package's own code starts under a soft
fd limit of at most 1024. Any of them started with ControlMaster=auto
can become the master, and an ssh -O forward that cannot reach a master
at its fd limit opens its own connection and holds the forward itself,
so it needs the limit too. At the limit, accept() fails with EMFILE and
ssh retries it a second later, so new connections wait or get reset
while open ones keep working. The hostagent itself keeps the higher
limit, which the gRPC forwarder needs.
sshocker's ExecuteScript starts ssh on its own, where the limit cannot
reach it. So every guest script now runs through the hostagent's copy
of that function, which only Windows guests used before.
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
Press `c` or F7 in the instance list (or "Create Instance" in the
empty state) to open a form for the instance name, template, CPUs,
memory, disk, VM type, and whether to start the instance after
creation. Empty fields fall back to the template defaults.
The other `limactl create` flags (mounts, networks, port forwards,
`--set`, `--param`, etc.) are available in the "Details" section, which
is hidden by default. Its fields are generated from the flag
definitions of `limactl create`, and the description of the focused
field is shown below the form.
To minimize free-text input, the values are chosen from dropdowns
whenever the choices are known: the shell completion values of the
flags, the drivers, and the image variants of the selected template.
"Other..." in a dropdown allows entering a value that is not in the
list.
"Create" runs `limactl start` (or `limactl create`) with the
corresponding flags. "Edit" opens an editor for the template YAML with
the form values applied, and then creates the instance from the edited
YAML. In both cases, the menu is suspended while limactl is running, and
the new instance is selected when returning to the menu.
The form can be navigated with the arrow keys as well as with Tab:
Up/Down move between the fields and the buttons (except in an open
dropdown list, and except between the lines of a text area), and
Left/Right move between the buttons.
The single-key shortcuts of the instance list are now only handled
while the list has the focus, so that they do not interfere with typing
into the form.
Fixes#5595
Assisted-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Use terminal-default colors for text and explicit styles for focused list items, modal buttons, and borders.
Signed-off-by: deltron-fr <kayceoogbonnaya2304@gmail.com>
Merge the windows-plain-wsl2 and windows-plain-qemu jobs into a
windows-plain matrix job, and add HCS to the matrix, running the
plain-Windows smoke test against templates/experimental/hcs.yaml.
The full test suite is not run for HCS, as the HCS driver still lacks
several features (mounts, port forwarding, ...).
Fixes#5465
Assisted-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>