I am a total beginner with LXC/LXD and I would like to understand its concept, and try to figure out if this tool could provide me with a functionality I need.
Functionality: I work with two different Linux distributions: Nix OS at home, Debian at job. For this reason I would like to have a kind of Debian environment in Nix OS. It was considered: VM (like virtual box) and containers. The second one is more appealing to me as it feels more like doing a ssh to my own machine
Questions: My main question (beside if containers is the solution to the goal above) is related with the file system.
How the containers LXC/LXD works regarding the file-system? I understood that they will create a large image file that somehow is mounted. But actually, I could see from Nix OS the file hierarchy of the ‘Debian container’ although apparently it is a brtfs… (I had to select this option after lxd init) and I have an ext4 file system. What I misunderstood here? Probably there is a brtfs image mounted on the path where I can see the files. But then, where is this image physically?
Essentially I understand that we have three steps:
[daemon init] > lxd init
[create container] > lxc launch images:debian/buster/amd64 nixdebian
[run the container] > lxc exec nixdebian -- /bin/bash
Could I select where the container is stored? Do I need to create a brtfs partition for it?
Within this three main step where I can select the location of the containers?
The fact that
Debian containermight be a brtfs file on my ext4 could harm anything?
Thanks for your help!