mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-12 18:46:35 +00:00
This commit introduces generic support for running the VMM in rootless mode in runtime-rs: 1.Detect whether the VMM is running in rootless mode. 2.Before starting the VMM process, create a non-root user and launch the VMM with that user’s UID and GID; also add the KVM user's group ID to the VMM process's supplementary groups so the VMM process can access /dev/kvm. 3.Add the setup of the rootless directory located in the dir /run/user/<uid> directory, and modify some path variables to be functions that return the path with the rootless directory prefix when running in rootless mode. Fixes: #11414 Signed-off-by: stevenfryto <sunzitai_1832@bupt.edu.cn>