命令報錯:WARNING: Your kernel does not support swap limit capabilities, memory limited without swap.
這是因為宿主機內核的相關功能沒有打開。按照下面的設置就行:
step 1:編輯/etc/default/grub
文件,將GRUB_CMDLINE_LINUX
一行改為GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
step 2:更新 GRUB,即執行$ sudo update-grub(centOS-7使用如下命令:grub2-mkconfig -o /boot/grub2/grub.cfg 或 centos7啟動項丟失則使用grub2-install /dev/sdx來安裝grub2到磁盤啟動區)
step 3: 重啟系統。reboot
文章轉載至:https://www.cnblogs.com/zhuochong/p/9728383.html、https://blog.csdn.net/weixin_34279246/article/details/89773568