I have a case where I have a disk image that has an XFS filesystem that I have to mount as a block device or loop device within an LXD container.
This then needs to be mounted in a folder inside the LXD container so an application in it can manage and utilize the entire .img for its own needs.
I’m not entirely sure how to do this in LXD, is there any easy way to add this? I can’t do a loop mount inside the LXD container because it’s unprivileged.
Getting an image file represented as a block device inside the container.
Mounting filesystem from that block device inside the container.
A unix-block device allows for passing through a block device from the host to the container, but does not support presenting an image file as a block device.