Multipass launch failure

I am on the latest stable multipass snap, and the latest stable snapcraft snap.

But launching the multipass VM fails with:

launch failed: Remote “snapcraft” is unknown or unreachable.

Is the multipass provider compatible with targeting 22.04 version?

$ snap refresh snapcraft
snap "snapcraft" has no updates available
$ snap info snapcraft | grep installed
installed:          7.2.9                               (8619) 65MB classic
Launching instance... - (20.5s)                                                                                                                                      Traceback (most recent call last):
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 176, in launch
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 66, in _run
    return, check=True, capture_output=True, **kwargs)
  File "/snap/snapcraft/8619/usr/lib/python3.8/", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['multipass', 'launch', 'snapcraft:22.04', '--name', 'snapcraft-checkbox-kivu-classic-on-amd64-for-amd64-16386155', '--cpus', '2', '--mem', '2G', '--disk', '64G']' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/snap/snapcraft/8619/bin/snapcraft", line 8, in <module>
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/", line 228, in run
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/", line 204, in _run_dispatcher
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_cli/", line 448, in run
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/commands/", line 259, in run
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/commands/", line 132, in run, parsed_args)
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/parts/", line 208, in run
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/parts/", line 249, in _run_command
    _run_in_provider(project, command_name, parsed_args)
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/snapcraft/parts/", line 530, in _run_in_provider
    with provider.launched_environment(
  File "/snap/snapcraft/8619/usr/lib/python3.8/", line 113, in __enter__
    return next(self.gen)
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 105, in launched_environment
    instance = launch(
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 76, in launch
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 292, in launch
  File "/snap/snapcraft/8619/lib/python3.8/site-packages/craft_providers/multipass/", line 178, in launch
    raise MultipassError(
craft_providers.multipass.errors.MultipassError: Failed to launch VM 'snapcraft-checkbox-kivu-classic-on-amd64-for-amd64-16386155'.
* Command that failed: 'multipass launch snapcraft:22.04 --name snapcraft-checkbox-kivu-classic-on-amd64-for-amd64-16386155 --cpus 2 --mem 2G --disk 64G'
* Command exit code: 2
* Command output: b'warning: "--mem" long option will be deprecated in favour of "--memory" in a future release.Please update any scripts, etc.\n\r                                                                                \r\r                                                                                \r'
* Command standard error output: b'launch failed: Remote "snapcraft" is unknown or unreachable.\n'

Hi @bram,

This sounds similar to, where the suggestion is to run snap restart multipass.

Can you confirm if that works?

And thanks for posting - I’ve made a craft-providers issue to improve the error handling.

Thank you.

That made this error indeed go away.

1 Like