Adapt libvirtd to work with cgroupv2
This commit is contained in:
parent
ebd073a56c
commit
7375e560b4
3
Makefile
3
Makefile
@ -1,10 +1,11 @@
|
||||
.PHONY: imageLibvirtd test
|
||||
|
||||
REGISTRY_IP=docker.registry
|
||||
DOCKER_BUILDKIT=1
|
||||
|
||||
## build
|
||||
|
||||
shell_build_image = docker build -t $(REGISTRY_IP):5000/$(1) .; \
|
||||
shell_build_image = docker build --platform=linux/amd64 -t $(REGISTRY_IP):5000/$(1) .; \
|
||||
docker push $(REGISTRY_IP):5000/$(1);
|
||||
|
||||
imageLibvirtd:
|
||||
|
@ -36,6 +36,7 @@ modprobe kvm_intel nested=1 -d /host
|
||||
|
||||
# If no cpuacct,cpu is present, symlink it to cpu,cpuacct
|
||||
# Otherwise libvirt and our emulator get confused
|
||||
if [ ! -f "/host/sys/fs/cgroup/cgroup.controllers" ]; then
|
||||
if [ ! -d "/host/sys/fs/cgroup/cpuacct,cpu" ]; then
|
||||
echo "Creating cpuacct,cpu cgroup symlink"
|
||||
mount -o remount,rw /host/sys/fs/cgroup
|
||||
@ -43,6 +44,7 @@ if [ ! -d "/host/sys/fs/cgroup/cpuacct,cpu" ]; then
|
||||
ln -s cpu,cpuacct cpuacct,cpu
|
||||
mount -o remount,ro /host/sys/fs/cgroup
|
||||
fi
|
||||
fi
|
||||
|
||||
mount --rbind /host/sys/fs/cgroup /sys/fs/cgroup
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user