How do I setup multipass correctly? [Solved]

I need some help in understanding the correct way to setup multipass. I have tried to snap very simple snap packages following the tutorials I have seen and reguardless of what system I’m trying to build on I always run into the same multipass error.

I always start by launching mutipass
multipass launch

I then run snapcraft on the snapcraft.yaml file
snapcraft

Then I get the following error message.
An error occurred with the instance when trying to launch with ‘multipass’: returned exit code 2.
Ensure that ‘multipass’ is setup correctly and try again.

When I run
multipass launch -vvv

I get the following error message
launch failed: The following errors occurred:
enriched-eulachon: shutdown called while starting

These error messages are not providing me with much to go on and worse yet finding information on multipass is very difficult, Any help would be appreciated.

Thank You

Can you post the output of snap logs multipass?

The command snap logs multipass returns nothing

Maybe @saviq can shed some light. Meanwhile, what’s the output of snap version?

I am currently trying to develop on a digital ocean server but as I said the error seems to follow me around.
snap 2.40
snapd 2.40
series 16
ubuntu 18.04
kernel 4.15.0-58-generic

How about a more simplified question, in the error message it says “Ensure that ‘multipass’ is setup correctly and try again.”

What is the correct way to setup multipass?

I just snap install multipass and it worked. What did you do?

This is how I thought it was supposed to work but I keep getting the error so I try the command multipass launch thinking that I’m supposed to have a VM already running but that doesn’t seem to work.

Does journalctl -u snap.multipass.multipassd.service print anything?

Multipass launches VMs, make sure that whatever could instances you use, they support KVM.

Snapcraft sets up and tears down VMs as part of the build process, so you shouldn’t need to manually launch anything before hand.

Of course, if you’re having trouble launching VMs with Multipass directly then Snapcraft isn’t going to have much luck either.

Hi @Ph055a, we’re currently improving the error reporting in Multipass.

Can you please try the edge channel?

snap refresh multipass --edge
multipass launch

It will let you know if your host can do virtualization, but if you’re doing it on DigitalOcean there’s a good chance it’s already inside a VM and nesting is uncommon. You could try snapcraft --use-lxd in that scenario.

Let us know how it goes!

2 Likes

Thanks for all the replies, I seemed to have fixed the issue by installing multipass using --edge as suggested by @Saviq. I am now able to build on my local machine without any issues and I’m going to experiment with using LXD on digital ocean. I wasn’t even thinking about nesting (Duh!) I was just trying to get it to work somewhere.

Thanks again for all the help.

I got a similar error message and was able to make progress by disabling VirtualBox, so you might be running into problems where different virtualization programs are contending over something that they can’t share.

sudo systemctl stop virtualbox