mirror of https://gitee.com/openkylin/libvirt.git
virt-login-shell: add ability to join the container cgroups
Prior to joining the namespaces of the container, move the process into the containers' cgroups, so that the shell that is subsequently launched is under the container resource constraints. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
18a10ddc16
commit
f9d4280145
|
@ -355,6 +355,8 @@ main(int argc, char **argv)
|
|||
goto cleanup;
|
||||
if (virDomainLxcEnterSecurityLabel(secmodel, seclabel, NULL, 0) < 0)
|
||||
goto cleanup;
|
||||
if (virDomainLxcEnterCGroup(dom, 0) < 0)
|
||||
goto cleanup;
|
||||
if (nfdlist > 0 &&
|
||||
virDomainLxcEnterNamespace(dom, nfdlist, fdlist, NULL, NULL, 0) < 0)
|
||||
goto cleanup;
|
||||
|
|
Loading…
Reference in New Issue