colima
colima copied to clipboard
Can't chroot from a vz container
Description
When trying to run chroot in a amd64 container it core dumps when trying to run the chroot commands. It seems like docker desktop was able to fix this here.
Version
┗╸❯❯❯ colima version && limactl --version && qemu-img --version
colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f
runtime: docker
arch: aarch64
client: v25.0.3
server: v24.0.9
limactl version 0.21.0
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Operating System
- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [X] Apple Silicon >= 14 (Sonoma)
- [ ] Linux
Output of colima status
┗╸❯❯❯ colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/jemershaw/.colima/default/docker.sock
Reproduction Steps
- colima start --activate -c 10 -d 100 -m 8 --ssh-agent --vm-type vz --vz-rosetta --mount-type virtiofs
- export DOCKER_DEFAULT_PLATFORM=linux/amd64
- DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -it --privileged ubuntu
- apt-get update && apt-get install -y debootstrap
- mkdir -p /rootfs
- export DEBIAN_FRONTEND=noninteractive
- debootstrap focal /rootfs ||
(cat /rootfs/debootstrap/debootstrap.log && false)
Expected behaviour
The output should show
rosetta error: Unable to open /proc/self/exe: 40
Trace/breakpoint trap (core dumped)
This is due to trying to run a chroot, but it seems like it was fixed in docker desktop here https://github.com/docker/for-mac/issues/6973
Additional context
No response
Still an issue in 2025 - I'm attempting to install additional packages on a Red Hat UBI image, like
dnf install curl --installroot /mnt/rootfs --releasever 9 --setopt install_weak_deps=false --nodocs -y && \
dnf --installroot /mnt/rootfs clean all && \
rpm --root /mnt/rootfs -e --nodeps setup
I get a similar error rosetta error: Unable to open /proc/self/exe: 2. This issue does not occur on Docker Desktop for Mac using VZ and Rosetta.