canonical / canonical/multipass

Multipass info command should skip unreachable VMs in its output

Open
#4,527 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 1h
Merged PRs (30d)
44

Description

**Describe the bug**
I have multiple multipass VMs on my machine. After applying usg, fips and stig guidelines authentication is only possible via my rsa key.

When I try to get all my VMs I get an error:
```
➜ ~ multipass info
info failed: ssh failed to authenticate: 'Access denied for 'publickey'. Authentication that can continue: publickey'
```

Only if I purge the offending VM is running the `multipass info` command possible again.

**To Reproduce**

Follow: https://documentation.ubuntu.com/canonical-kubernetes/latest/snap/howto/install/fips/#enable-fips, https://documentation.ubuntu.com/canonical-kubernetes/latest/snap/howto/install/disa-stig/#apply-host-stig on a multipass VM.

**Expected behavior**

While the error is correct for the multipass info command, I would expect my other VMs that are still accessible for multipass to be reflected in the output. The error message could also be more precise telling me which VM is not reachable.

**Logs**
```
➜ ~ tail -n 30 /Library/Logs/Multipass/multipassd.log

[2025-11-24T11:45:11.323] [debug] [arp] [49106] started: arp -an
[2025-11-24T11:45:13.435] [debug] [arp] [49109] started: arp -an
[2025-11-24T11:45:15.532] [debug] [arp] [49112] started: arp -an
[2025-11-24T11:45:15.565] [debug] [green] Caching initial SSH session
[2025-11-24T11:45:48.243] [debug] [green] QMP: {"timestamp": {"seconds": 1763981148, "microseconds": 243648}, "event": "RTC_CHANGE", "data": {"offset": 0, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:46:38.969] [debug] [louise-dev] QMP: {"timestamp": {"seconds": 1763981198, "microseconds": 968991}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:46:44.979] [debug] [red] QMP: {"timestamp": {"seconds": 1763981204, "microseconds": 978983}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:48:06.800] [info] [usg] SSH session disconnected
[2025-11-24T11:48:06.803] [debug] [usg] Caching new SSH session
[2025-11-24T11:48:52.965] [debug] [usg] QMP: {"timestamp": {"seconds": 1763981332, "microseconds": 964955}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:54:27.065] [debug] [daemon] Returning setting local.driver=qemu
[2025-11-24T11:54:55.633] [debug] [async task] fetch manifest periodically
[2025-11-24T11:54:55.642] [info] [VMImageHost] Did not find any supported products in "appliance"
[2025-11-24T11:56:46.966] [debug] [green] QMP: {"timestamp": {"seconds": 1763981806, "microseconds": 966088}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:56:56.166] [info] [usg] SSH session disconnected
[2025-11-24T11:56:56.166] [debug] [usg] Caching new SSH session
[2025-11-24T11:57:40.977] [debug] [louise-dev] QMP: {"timestamp": {"seconds": 1763981860, "microseconds": 977408}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:57:50.993] [debug] [red] QMP: {"timestamp": {"seconds": 1763981870, "microseconds": 993688}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}

[2025-11-24T11:58:43.798] [info] [usg] SSH session disconnected
[2025-11-24T11:58:43.798] [debug] [usg] Caching new SSH session
[2025-11-24T11:59:50.965] [debug] [usg] QMP: {"timestamp": {"seconds": 1763981990, "microseconds": 965526}, "event": "RTC_CHANGE", "data": {"offset": 1, "qom-path": "/machine/unattached/device[7]"}}
```

**Additional info**
multipass 1.16.1+mac
multipassd 1.16.1+mac
qemu
Apple M1, macOSTahoe 26.0

**Additional context**
NA

Contributor guide

Open the contributing guide

Research direction

Start at the `multipass info` command entry point and trace how an SSH authentication failure from one VM is handled. Reproduce the case with one inaccessible VM and one accessible VM. Done means accessible VMs still appear and the output identifies the VM that could not be reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.