3

I'm running multipass on Ubuntu Desktop 21.04 to create many Ubuntu VMs on this Ubuntu machine. I need to mount a folder I created at the root directory /app to one of the VMs. While ls -l /app shows the folder, multipass mount /app newvm gives the error that Source path "/app" does not exist.

If I try to use autocomplete with multipass mount / and press tab it shows most of the folders in my root directory but not the /app folder.

For testing, I created a new root level folder using sudo mkdir /bob. Then multipass mount /bob newvm. Still same error. Source path "/bob" does not exist

Why would multipass not show all the root level folders?

Ryan
  • 133
  • 4
  • Ubuntu 20? No such release, so do you mean Ubuntu Core 20? (Ubuntu uses *year.month* for *deb* based products & the *year* format for *snap* only products) – guiverc Jun 26 '21 at 02:34
  • Actually it is Ubuntu Desktop 21 (21.04). I started with Ubuntu Desktop 20.04.2.0, but recently upgraded. I've updated the post with that version number, if it matters. – Ryan Jun 26 '21 at 03:16

1 Answers1

5

If Multipass was installed the 'default' way snap install multipass, it won't be able to access directories outside of your /home, /mnt, or /media because of its strict confinement policy. Classic snaps, installs using the --classic parameter, don't have this restriction and have much greater access to the system as they aren't tightly sandboxed.

A little more on confinement policies.

If it's not convenient to move the /app directory to /mnt or /media (and I assume its not convenient to put it in your /home), you can try installing multipass with snap install multipass --classic

Interesting to note the video on the snap store page uses the --classic flag in the demo, but the install button does not include it.

wizardpurple
  • 409
  • 3
  • 7
  • Thanks. More confinement is important for me, so I will move /app inside of /mnt. It’s inconvenient but doable. – Ryan Jun 26 '21 at 04:20