Easy way to transfer files between host and LXC container on LVM

Revised answer: LXC containers share the same kernel as the host, so any filesystem they mount should be accessible from outside.

If you do a cat /proc/mounts on the host, can you see the container filesystems?

If you see a line like /dev/mapper/... /var/lib/lxc/o1/rootfs ext4 ... then you should be able to access /var/lib/lxc/o1/rootfs from the host, without any further commands.

Leave a Comment