Skip to content

Ubuntu 22.04 fails to boot with read-only filesystem (Docker Desktop for macOS) #2

@quinncomendant

Description

@quinncomendant

Hi Jeff,

I'm getting started with ansible and molecule, and am happy to find your pre-built images (thanks!). I'm having some trouble with the new Ubuntu 22.04 image. I'm using Docker Desktop 4.7.1 with default settings (no experimental features) on macOS 12.3.1 on a 2021 MBP w/M1 Pro.

When running docker as per the steps in README.md (except with -it instead of --detach so I can see the output), it fails to boot:

❯ docker run -it --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro geerlingguy/docker-ubuntu2204-ansible
Failed to look up module alias 'autofs4': Function not implemented
systemd 249.11-0ubuntu3 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP -LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
Detected virtualization docker.
Detected architecture arm64.

Welcome to Ubuntu 22.04 LTS!

Failed to create /init.scope control group: Read-only file system
Failed to allocate manager object: Read-only file system
[!!!!!!] Failed to allocate manager object.
Exiting PID 1...

If I change the volume to read-write mode (by changing --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro to --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw) it boots successfully:

❯ docker run -it --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw geerlingguy/docker-ubuntu2204-ansible
Failed to look up module alias 'autofs4': Function not implemented
systemd 249.11-0ubuntu3 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP -LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
Detected virtualization docker.
Detected architecture arm64.

Welcome to Ubuntu 22.04 LTS!

Couldn't move remaining userspace processes, ignoring: Input/output error
Queued start job for default target Graphical Interface.
Unnecessary job was removed for /dev/vda1.
[  OK  ] Created slice Slice /system/modprobe.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
etc…

Is there a reason this image should be run in read-only mode, or is it safe to use in read-write mode?


Just for comparison, I also tried to boot your Ubuntu 18.04 and 20.04 images. They boot successfully in read-only mode – except for the Failed to allocate manager object, freezing error, do you know what is causing that?

Here's geerlingguy/docker-ubuntu1804-ansible:

❯ docker run -it --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro geerlingguy/docker-ubuntu1804-ansible

Welcome to Ubuntu 18.04.6 LTS!

[!!!!!!] Failed to allocate manager object, freezing.

Here's geerlingguy/docker-ubuntu2004-ansible:

❯ docker run -it --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro geerlingguy/docker-ubuntu2004-ansible

Welcome to Ubuntu 20.04.4 LTS!

[!!!!!!] Failed to allocate manager object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions