LXD/Vanilla - Exposing host folder to guest not working
Exposing a host folder to the guest container with the built-in lxd function (device add) doesn’t work properly. The folder doesn’t show up if the folder gets added when the container is stopped. The folder shows up for one session if the container is already running. It does work properly on another system (ArchLinux x64). I’ve contacted upstream but stgraber currently is not at the office for some time providing only limited support. I’ve created a thread in official support forum as well.
Steps to reproduce:
<code class="text">
lxc init images:alpine/edge alpine
lxc config set alpine security.privileged false
printf "uid 0 0\ngid 0 0" | lxc config set alpine raw.idmap -
lxc config device add alpine myboot disk source=/boot path=/hostboot
lxc start alpine
lxc exec alpine -- ls /hostboot
</code>
/etc/subuid:
root:1000000:65536
/etc/subgid:
root:1000000:65536
lxd-3.0.0-r3
Alpine edge i686
Linux alpine 4.14.37-0-vanilla #1-Alpine SMP Thu Apr 26 11:44:01 UTC
2018 i686 Linux
(from redmine: issue id 8852, created on 2018-04-29)