[Lxc-users] [systemd-devel] Unable to run systemd in an LXC / cgroup container.

John lxc at jelmail.com
Thu Dec 6 20:00:28 UTC 2012


On 06/12/12 19:48, Stéphane Graber wrote:
> On 12/06/2012 02:45 PM, John wrote:
>> On 06/12/12 17:10, Serge Hallyn wrote:
>>> Quoting John (lxc at jelmail.com):
>>>> On 05/12/12 21:59, Serge Hallyn wrote:
>>>>> You have to specify a template, i.e. '-t debian'.
>>>>>
>>>> Oh. I wasn't using a template.
>>>>
>>>> Up to now, I have an existing root fileyststem, say
>>>> /srv/lxc/mycontainer.x86_64 that is pointed to by my configuration
>>>> file, say mycontainer.conf, by its lxc.rootfs entry. I have seen
>>>> lxc-create as merely inserting the config from mycontainer.conf into
>>>> /var/lib/lxc/mycontainer/config and nothing more.
>>>>
>>>> I haven't used a template script to create a container because I've
>>>> got my own that I have been using ever since I first started using
>>>> lxc (there were no templates back then, well not for arch anyway!).
>>>>
>>>> I've always done a destroy/create to update the LXC configuration
>>>> for a container. This now seems to be the wrong way given destroy
>>>> removes the rootfs and create expects a template. What's the new way
>>>> ?
>>>>
>>>> I've looked at the man page for lxc-create but am none the wiser.
>>>> How do I now create a container (or just update the config) for an
>>>> existing root filesystem ?
>>> Hm, I see.  Yeah this behavior likely changed with the introduction
>>> of custom template paths.
>>>
>>> Perhaps we should allow '-t none' for exactly your use case.
>>>
>>> Stéphane?
>>>
>>> -serge
>>>
>> Or perhaps, allow leaving off the -t unless you want to work with a
>> template ?
>> (kind of like it's been to date). Would that not work ?
>
> Yeah, that makes sense, I'll fix it.
>
> Basically allow for "-t none" and have it default to that when not
> specified, that should essentially revert to the previous behaviour.
>
>
While on the subject, any reason for lxc-destroy now being destructive?
This in, my opinion, is a significant behavioural change and I did 
actually unwittingly delete one of my containers last night. Luckily it 
was just a test one :)

Can we make lxc-destroy work like it did before (or provide a cmdline 
option to make it so) ?

I don't know how else to update lxc config without doing a 
destroy/create cycle (except for hand-editing 
/var/lib/mycontainer/config but I expect that's verboten).

sorry - going off topic for the original thread.

J





More information about the lxc-users mailing list