[systemd-devel] systemd put it uinder a custom slice
Bhasker C V
bhasker at unixindia.com
Wed Oct 30 11:08:43 UTC 2019
Hi all,
I have been googl-ing for a few days now but could not stumble upon a
solution I am looking for.
Apologies if this is a noob question.
Is there a way to use custom slices with my systemd-nspawn container ?
I see that systemd-nspawn man page says using --slice= but any such
cgroup created is not accepted by this option (I dont know how to create
a slice externally from systemd unit-files)
$ sudo cgcreate -g freezer,memory:/test
$ sudo systemd-nspawn -jbD ./a --slice=/test
Spawning container a on /tmp/a.
Press ^] three times within 1s to kill container.
Failed to register machine: Invalid unit name '/test'
If I run it without the --slice= option I see that the memory of a
process inside the container runs under /system.slice and is not
associated with a freezer controller.
OR in short I am not getting a clue on how to create cgroup slices
separately and use it in systemd-nspawn (without using unit files)
Please could someone help ?
Thanks
--
Bhasker C V
Secure Mails:
http://pgp.mit.edu/pks/lookup?op=get&search=0x4D05FEEC54E47413
Registered Linux User: #306349
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191030/cc5912a1/attachment.html>
More information about the systemd-devel
mailing list