Show more user-friendly output, from the `start` command
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Currently, the `limactl start` defaults to dumping the log with the INFO level to the console.
Turning off the logging means that only the final message (if any), was showing to the user.
I was experimenting with a less verbose mode, that only showed the major progress steps...
There were only two events in the start, Booting and Running, so I wanted to add requirements.
Booting: `INFO[0000] SSH Local Port: 60022 `
* `Starting "default"`
Running: `INFO[0028] READY. Run `lima` to open the shell. `
* `READY.`
The log also has some internal info, like mounts and forwards.
```
INFO[0000] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0010] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0017] [hostagent] The essential requirement 1 of 5 is satisfied
INFO[0017] [hostagent] Waiting for the essential requirement 2 of 5: "user session is ready for ssh"
INFO[0027] [hostagent] Waiting for the essential requirement 2 of 5: "user session is ready for ssh"
INFO[0028] [hostagent] The essential requirement 2 of 5 is satisfied
INFO[0028] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0028] [hostagent] The essential requirement 3 of 5 is satisfied
INFO[0028] [hostagent] Waiting for the essential requirement 4 of 5: "/etc/fuse.conf (/etc/fuse3.conf) to contain \"user_allow_other\""
INFO[0028] [hostagent] The essential requirement 4 of 5 is satisfied
INFO[0028] [hostagent] Waiting for the essential requirement 5 of 5: "the guest agent to be running"
INFO[0028] [hostagent] The essential requirement 5 of 5 is satisfied
INFO[0028] [hostagent] Mounting "/home/anders" on "/home/anders"
INFO[0028] [hostagent] Mounting "/tmp/lima" on "/tmp/lima"
INFO[0028] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/home/anders/.lima/default/ga.sock" (host)
INFO[0028] [hostagent] Waiting for the optional requirement 1 of 2: "systemd must be available"
INFO[0028] [hostagent] Not forwarding TCP 127.0.0.53:53
INFO[0028] [hostagent] Not forwarding TCP 127.0.0.54:53
INFO[0028] [hostagent] The optional requirement 1 of 2 is satisfied
INFO[0028] [hostagent] Not forwarding TCP [::]:22
INFO[0028] [hostagent] Waiting for the optional requirement 2 of 2: "containerd binaries to be installed"
INFO[0028] [hostagent] The optional requirement 2 of 2 is satisfied
INFO[0028] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished"
INFO[0028] [hostagent] The final requirement 1 of 1 is satisfied
```
Counted the total, and added a progress bar:
```console
$ limactl --silent start --progress
Starting "default"
Waiting 1 / 8 [--->________________________] "ssh" (essential 1/5)
Waiting 2 / 8 [------>_____________________] "user session is ready for ssh" (essential 2/5)
Waiting 3 / 8 [---------->_________________] "sshfs binary to be installed" (essential 3/5)
Waiting 4 / 8 [------------->______________] "fuse to \"allow_other\" as user" (essential 4/5)
Waiting 5 / 8 [----------------->__________] "the guest agent to be running" (essential 5/5)
Waiting 6 / 8 [-------------------->_______] "systemd must be available" (optional 1/2)
Waiting 7 / 8 [------------------------>___] "containerd binaries to be installed" (optional 2/2)
Waiting 8 / 8 [----------------------------] "boot scripts must have finished" (final 1/1)
READY.
```
Found it less distracting, if the old steps remained.
By default, the new step information replaces the old.
Contributor guide
Assessment
This issue has not been assessed yet.