You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash# Create a 10MB image file and initialize an ext4 filesystem on it
dd if=/dev/zero bs=1M count=10 > test.img
mkfs.ext4 -O uninit_bg test.img
# Mount the image file as a loop device, and then mount it at /mnt
LOOP_DEVICE="$(losetup --find --show test.img)"
mount "$LOOP_DEVICE" /mnt
I receive an error for the mount command saying
mount:/mnt: cannot mount /dev/loop0 read-only.
dmesg(1) may have more information after failed mount system call.
So I checked dmesg and found these errors:
...
[ 31.517064] loop0: detected capacity change from 0 to 4096
[ 31.519716] operation not supported error, dev loop0, sector 0 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0
[ 31.521012] operation not supported error, dev loop0, sector 0 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0
[ 31.522290] operation not supported error, dev loop0, sector 3968 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.523994] operation not supported error, dev loop0, sector 272 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.525954] operation not supported error, dev loop0, sector 152 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.615215] loop0: detected capacity change from 0 to 4104
[ 31.617421] operation not supported error, dev loop0, sector 0 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0
[ 31.618592] operation not supported error, dev loop0, sector 0 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 0
[ 31.619754] operation not supported error, dev loop0, sector 3968 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.623177] operation not supported error, dev loop0, sector 272 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.624677] operation not supported error, dev loop0, sector 152 op 0x9:(WRITE_ZEROES) flags 0x8000800 phys_seg 0 prio class 0
[ 31.716454] loop0: detected capacity change from 0 to 4096
...
It seems there is some issue with mounting loop devices in colima.
The same code works fine when using Docker Desktop.
Version
colima version 0.7.5
git commit: 1588c06
limactl version 0.23.2
qemu-img version 9.1.0
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
Operating System
macOS Intel <= 13 (Ventura)
macOS Intel >= 14 (Sonoma)
Apple Silicon <= 13 (Ventura)
Apple Silicon >= 14 (Sonoma)
Linux
Output of colima status
No response
Reproduction Steps
Start colima (colima start --memory 8, though the 8GB of RAM are not necessary for this test, just the setup I used)
Create the scripts/Dockerfile described above\
Run the run.sh script
Observe the output
Enter the colima vm (colima ssh)
Check dmesg (sudo dmesg) and look for all messages containing loop0
Expected behaviour
The mount should work fine, as it does on Docker Desktop
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
Given the following
Dockerfile
when running the following script (
run.sh
)with
test.sh
containingI receive an error for the
mount
command sayingSo I checked
dmesg
and found these errors:It seems there is some issue with mounting loop devices in colima.
The same code works fine when using Docker Desktop.
Version
colima version 0.7.5
git commit: 1588c06
limactl version 0.23.2
qemu-img version 9.1.0
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
Operating System
Output of
colima status
No response
Reproduction Steps
colima start --memory 8
, though the 8GB of RAM are not necessary for this test, just the setup I used)run.sh
scriptcolima ssh
)dmesg
(sudo dmesg
) and look for all messages containingloop0
Expected behaviour
The mount should work fine, as it does on Docker Desktop
Additional context
No response
The text was updated successfully, but these errors were encountered: