<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p> I have been googl-ing for a few days now but could not stumble
upon a solution I am looking for. <br>
</p>
<p>Apologies if this is a noob question.<br>
</p>
<p>Is there a way to use custom slices with my systemd-nspawn
container ? <br>
</p>
<p>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)</p>
<address><tt>$ sudo cgcreate -g freezer,memory:/test</tt></address>
<address><tt>$ sudo systemd-nspawn -jbD ./a --slice=/test </tt></address>
<address><tt>Spawning container a on /tmp/a.</tt></address>
<address><tt>Press ^] three times within 1s to kill container.</tt></address>
<address><tt>Failed to register machine: Invalid unit name '/test'</tt></address>
<p><br>
</p>
<p>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. <br>
</p>
<p>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)</p>
<p>Please could someone help ?</p>
<p>Thanks<br>
</p>
<pre class="moz-signature" cols="72">--
Bhasker C V
Secure Mails:
<a class="moz-txt-link-freetext" href="http://pgp.mit.edu/pks/lookup?op=get&search=0x4D05FEEC54E47413">http://pgp.mit.edu/pks/lookup?op=get&search=0x4D05FEEC54E47413</a>
Registered Linux User: #306349
</pre>
</body>
</html>