[Lxc-users] Sharing container rootfs

Purcareata Bogdan-B43198 B43198 at freescale.com
Fri Jun 7 08:45:44 UTC 2013


Hello,

I have a question regarding containers and their supporting rootfs. Is there an option for lxc-create that will use a default path (or other backing store) as rootfs?

I understand that by specifying -B ... it will try to _create_ the rootfs in an alternate place. In my scenario, I plan to configure the rootfs externally - there will be a single host rootfs image which will be bind-mounted --make-slave for several containers. I just want to know if there is an option for lxc-create that will skip creating the rootfs and just use one as is. I didn't see any such option for lxc-clone either.

Assuming there isn't such an option, my setup has the following steps:
- create a container with default options
- delete the ${rootfs}/
- update the config file to point to the new rootfs path - which I configured with bind-mounts

Does this look ok for my scenario? Is this the right setup?

Thank you,
Bogdan P.






More information about the lxc-users mailing list