Why is Multipass behaving like it is strictly confined?

During my unsuccessful snapcraft build, Multipass is failing to recognize my source files located in /opt/my-source-files.

For my environment, I had installed both snapcraft and multipass with the following commands: • sudo snap install snapcraft --classic • sudo snap install multipass --classic

snap list:

Name Version Rev Tracking Publisher Notes core20 20230801 2015 latest/stable canonical✓ base core22 20230801 864 latest/stable canonical✓ base multipass 1.12.2 10244 latest/stable canonical✓ - snapcraft 7.5.3 9726 latest/stable canonical✓ classic snapd 2.60.4 20290 latest/stable canonical✓ snapd snappy-debug 0.36-snapd2.59.4 704 latest/stable canonical✓ -

Finally, when looking into snapcraft.yaml for Multipass, I can see this:

name: multipass title: Multipass icon: data/multipass.gui.svg summary: Instant Ubuntu VMs description: | Multipass is a tool to launch and manage VMs on Windows, Mac and Linux that simulates a cloud environment with support for cloud-init. Get Ubuntu on-demand with clean integration to your IDE and version control on your native platform. license: GPL-3.0

adopt-info: multipass confinement: strict base: core22

If the “sudo snap install multipass --classic” doesn’t do it, what will it take to install the classic version of Multipass to avoid the following error:

Source path “/opt/edgenoplugins” does not exist An error occurred with the instance when trying to mount with ‘multipass’: returned exit code 1. Ensure that ‘multipass’ is setup correctly and try again.

Thx.

Classic is nothing a user can choose (and snapd should have told you that when you tried to install multipass with the --classic switch), it is a completely different packaging task, the packager needs to pick…

I fear your only solution is to actually use your source files from some location the snap can access (you could bind mount the dir into /mnt and use the removable-media media interface if you do not want to move them around)

Thanks for the confirmation.

(I also appreciate all of your many other helpful posts as well).

1 Like

Hi @mtlkid,

Multipass is indeed a strictly confined snap and as @ogra says, one cannot install a strict snap as classic. @ogra is also correct in saying that the source needs to be in a location that Multipass has access to such as anywhere in your home directory. If you want to use the removable media workaround, you will need to manually make the connection:

$ sudo snap connect multipass:removable-media

Hope this helps!

1 Like