openvz docker相关的一些配置

kevin.Zhu 发布于:2022-4-14 21:37 分类:文摘  有 15 人浏览,获得评论 0 条  

https://wiki.openvz.org/Docker_inside_CT


  • Configure custom cgroups in systemd:
systemd reads /proc/cgroups and mounts all cgroups enabled there, though it doesn't know there's a restriction that only freezer,devices and cpuacct,cpu,cpuset can be mounted in container, but not freezer, cpu etc. separately
vzctl mount $veid
echo "JoinControllers=cpu,cpuacct,cpuset freezer,devices" >> /vz/root/$veid/etc/systemd/system.conf


这个文件可以直接vim修改 。