I have a container created in LXD that I want to deploy with a host. This host offers only LXC.
How can I make my container work on a system with only LXC installed?
I have a container created in LXD that I want to deploy with a host. This host offers only LXC.
How can I make my container work on a system with only LXC installed?
I have the same issue I have a host which provisions LXD container and I need to ‘convert’ them to LXC.
I tried a few things:
Both without much success.
Is this possible to achieve? Installing LXD is not an option for my usecase.
(I think it should since LXD as fare as I understand it is just a frontend to LXC but I don’t see how it would work)
You’ll also need to get the lxc.conf file from /var/snap/lxd/common/lxd/logs/ and put that as config
, then likely do a bunch of changes in there for the various paths, remove the hooks, …
Yeah I figured out that adding a basic config file does the trick.
(Also using the same version of LXC in LXD and on the LXC host helped)
But this is the only way?
There is no support in LXD to export a container with the config
file?
Correct, the config
file is a LXC thing which LXD doesn’t use internally, instead we just render it as needed when talking to liblxc.
When you export a LXD container, what you get instead is the LXD configuration.