From 363fc77b870b77f8a42a439c2d852b7c75f509d3 Mon Sep 17 00:00:00 2001 From: Andrey K Date: Mon, 8 Jan 2024 21:55:22 +0300 Subject: [PATCH] Fixed docker stop/start 'sudo: unknown user: root' error --- cli/src/device/emulator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/src/device/emulator.py b/cli/src/device/emulator.py index b96529fe..39b9ee6e 100644 --- a/cli/src/device/emulator.py +++ b/cli/src/device/emulator.py @@ -134,6 +134,10 @@ def create(self) -> None: self.logger.info(f"{self.device_type} is created!") def change_permission(self) -> None: + not_first_run = self.is_initialized() + if not_first_run: + return + kvm_path = "/dev/kvm" if os.path.exists(kvm_path): cmds = (f"sudo chown 1300:1301 {kvm_path}",