amnezia-vpn/amnezia-client

Installation from client fails, docker containers do not build/run on OpenVZ VPS

pbtsrc opened this issue · 5 comments

Installation from client fails with
Error code: 202. Server error: Docker container missing

docker build --no-cache --pull -t amnezia-awg /opt/amnezia/amnezia-awg
fails. Probably the same as in #817

docker build --network=host --no-cache --pull -t amnezia-awg /opt/amnezia/amnezia-awg
builds ok, but

docker run -d --log-driver none --restart always --privileged --cap-add=NET_ADMIN --cap-add=SYS_MODULE -p 12345:12345/udp -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" --name amnezia-awg amnezia-awg
fails with
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: resulting devices cgroup doesn't match target mode: unknown.

I encountered the same problem.

I encountered the same problem. Ubuntu Server 22.04.4 LTS

how to solve the problem?

OpenVZ is not supported by Amnezia, the issue is in the --privileged --cap-add=NET_ADMIN args, which is not supported by Docker on OpenVZ virtualization, it requires full virtualization to enable these capabilities.

OpenVZ is not considered full virtualization because it uses container-based virtualization. This means it shares the host system's kernel with isolated containers, unlike full virtualization, which emulates an entire hardware system allowing multiple operating systems to run independently.

KVM (Kernel-based Virtual Machine) is a type of full virtualization, as it allows multiple operating systems to run unmodified on standard x86 hardware by using hardware virtualization extensions. Unlike OpenVZ, KVM provides each virtual machine with its own isolated kernel, making it suitable for running diverse operating systems and environments with greater flexibility and isolation.

I'm using vm.nuxt.cloud, on KVM. A week earlier everything was working fine. The payment ended and I re-registered. After which the installation fails with the specified error.