# Failed to run BalenaOS in Docker Container: Failed to start Resin acti… root partition mount service.

**URL:** <https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container-failed-to-start-resin-acti-root-partition-mount-service/367999>\
**Category:** Product support\
**Tags:** docker\
**Created:** [May 24, 2023, 7:20am UTC](https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container-failed-to-start-resin-acti-root-partition-mount-service/367999 "2023-05-24T07:20:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben.clerix](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@ben.clerix](https://forums.balena.io/u/ben.clerix)\
**Post date:** [May 24, 2023, 7:20am UTC](https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container-failed-to-start-resin-acti-root-partition-mount-service/367999/1 "2023-05-24T07:20:40Z")

</div>

Hi,

I’m used [GitHub - balena-os/balenaos-in-container: Run balenaOS as a docker container](https://github.com/balena-os/balenaos-in-container) in the past.  
Last time I know it worked without issues was April 2022. I might have used it in the meantime, but not 100% certain.  
Something changed in the meantime, but I’m unsure what.  
I created a similar post on the project’s Github repo: [[FAILED] Failed to start Resin acti… root partition mount service. · Issue #59 · balena-os/balenaos-in-container · GitHub](https://github.com/balena-os/balenaos-in-container/issues/59). I hope it’s ok to also post it here, if not please let me know.

I’m trying to use this fleet config (config.json):

```json
{
  "applicationId": 1390541,
  "deviceType": "intel-nuc",
  "userId": 125346,
  "appUpdatePollInterval": 60000,
  "listenPort": 48484,
  "vpnPort": 443,
  "apiEndpoint": "https://api.balena-cloud.com",
  "vpnEndpoint": "cloudlink.balena-cloud.com",
  "registryEndpoint": "registry2.balena-cloud.com",
  "deltaEndpoint": "https://delta.balena-cloud.com",
  "mixpanelToken": "some token, censored, unsure if sensitive",
  "apiKey": "some api key, censored, unsure if sensitive"
}

```

I’m using docker desktop with wsl2:

```auto
wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1555

```

```auto
docker -v
Docker version 20.10.21, build baeda1f

```

When investigating cgroups in the `docker-desktop` container:

```auto
mount | grep group
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)

```

So I think the kernel supports both cgroups v1 and v2?

docker-compose logs: [balenaos-in-container-master\>docker-compose up --build[+] Building 5.6s (11/11 - Pastebin.com](https://pastebin.com/9UAc0UT1)

docker exec -it balenaos-in-container-master-os-1 journalctl -u mnt-sysroot-active.service

```auto
> docker exec -it balenaos-in-container-master-os-1 journalctl -u mnt-sysroot-active.service
-- Logs begin at Mon 2023-05-15 08:08:42 UTC, end at Mon 2023-05-15 08:10:12 UT>
May 15 08:09:13 731cd9f59e60 resin-partition-mounter[19]: ERROR: Timeout while >
May 15 08:09:13 731cd9f59e60 systemd[1]: mnt-sysroot-active.service: Main proce>
May 15 08:09:13 731cd9f59e60 systemd[1]: mnt-sysroot-active.service: Failed wit>
May 15 08:09:13 731cd9f59e60 systemd[1]: Failed to start Resin active root part>
lines 1-5/5 (END)...skipping...
-- Logs begin at Mon 2023-05-15 08:08:42 UTC, end at Mon 2023-05-15 08:10:12 UTC. --
May 15 08:09:13 731cd9f59e60 resin-partition-mounter[19]: ERROR: Timeout while waiting for /dev/disk/by-state/active to come up.
May 15 08:09:13 731cd9f59e60 systemd[1]: mnt-sysroot-active.service: Main process exited, code=exited, status=1/FAILURE
May 15 08:09:13 731cd9f59e60 systemd[1]: mnt-sysroot-active.service: Failed with result 'exit-code'.
May 15 08:09:13 731cd9f59e60 systemd[1]: Failed to start Resin active root partition mount service.
~
~
~

```

I found a similar error which was seemingly not solved.

> [@BalenaOS as docker or VM](https://forums.balena.io/t/balenaos-as-docker-or-vm/113572):
>
> For demo and testing purposes I want to have a BalenaOS and the apps on top public available. Is BalenaOS as docker version available or is there a chance to host BalenaOS and the apps as VM in Azure?

If I can provide more information, please let me know.

---

<div class="post-metadata">

**Author:** ![ben.clerix](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@ben.clerix](https://forums.balena.io/u/ben.clerix)\
**Post date:** [May 26, 2023, 5:56am UTC](https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container-failed-to-start-resin-acti-root-partition-mount-service/367999/2 "2023-05-26T05:56:54Z")

</div>

Oops, the similar error I posted was wrong, I meant this one: [Failed to run BalenaOS in Docker Container](https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container/357460)

---

<div class="post-metadata">

**Author:** ![ben.clerix](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@ben.clerix](https://forums.balena.io/u/ben.clerix)\
**Post date:** [May 31, 2023, 2:42pm UTC](https://forums.balena.io/t/failed-to-run-balenaos-in-docker-container-failed-to-start-resin-acti-root-partition-mount-service/367999/3 "2023-05-31T14:42:06Z")

</div>

Balena support suggested to use [GitHub - balena-labs-research/balena-virt: Easy virtualization of balenaOS](https://github.com/balena-labs-research/balena-virt)  
Which works perfectly!
