containers / krunvm

Create microVMs from OCI images
Apache License 2.0
1.41k stars 42 forks source link

Adding support for non-top-level directories when setting up a volume #23

Open c3d opened 2 years ago

c3d commented 2 years ago

The following message is a bit puzzling:

% krunvm  changevm f35 -v /Users/ddd:/home/ddd
Invalid volume, only single direct root children are supported as guest_path

With podman, it is perfectly fine to pass a directory like this. This can be worked around using a bind mount from a top-level directory, but I'm curious about the reason for that restriction to start with.

slp commented 2 years ago

On macOS, libkrun implements volume sharing by extending virtio-fs to have special nodes on top of the root inode. While it's technically possible to extend this to allow those special nodes to reside anywhere in the filesystem, I'm not sure if the benefits justify the increase in complexity (krunvm doesn't intend to be a podman replacement).