canonical/multipass

[snapshot] Lack of interactive stdin causes unhandled exception on `multipass restore`

Geschlossen

#4.825 geöffnet am 15.04.2026

 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (634 Forks)batch import
buggood first issuelowlow hanging fruit

Repository-Metriken

Stars
 (6.956 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 16T 2h) (50 gemergte PRs in 30 T)

Beschreibung

Describe the bug I am trying to restore the state of a VM without interactive stdin. If the --destructive flag is not used, it results in an unhandled exception.

└─[2] echo "no" | multipass stop a             
└─[λ] echo "no" | multipass restore a.snapshot1
[2026-04-15T17:44:54.113] [error] [client] Caught an unhandled exception: Unable to query client for confirmation. Use '--destructive' to automatically discard current machine state.

To Reproduce How, and what happened?

  1. multipass launch -n a && multipass stop a
  2. multipass snapshot a
  3. echo "no" | multipass restore a.snapshot1

Expected behavior Multipass should handle the exception and output the error message to the user.

Additional info

  • OS: Ubuntu 24.04 (authd)
  • CPU architecture or model: amd64
  • multipass version: 1.17.0-dev

Contributor Guide