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
Colima has problems with using /tmp/colima or /tmp/colima-<profile> when used in a multi user context
Specifically when 2 users run colima start separately one users container will not be able to access /tmp/colima as that folder is owned by another user. When the vm-type is qemu this error is ignored and colima continues with the --very-verbose log containing this:
> [hostagent] The essential requirement 4 of 4 is satisfied
> [hostagent] Mounting "/Users/<userb>" on "/Users/<userb>"
> [hostagent] Mounting "/tmp/colima" on "/tmp/colima"
> [hostagent] chdir to "/tmp/colima" failed: Permission denied
> [hostagent] Waiting for the guest agent to be running
When the vm-type is vz this creates a full exception with an error line of:
This seems to only happen when the /tmp/colima dir is initially created by --vm-type=vz where the dir has rwxr-x--- (750) perms vs rwxr-xr-x (755) perms when created by --vm-type=qemu as --vm-type=vz in other logins can still use that dir.
Version
originally found on:
colima version 0.6.7
git commit: ba1be00
limactl version 0.19.0
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Also tested on:
colima version 0.6.8
git commit: 9b0809d
limactl version 0.19.1
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)
Apple Silicon >= 14 (Sonoma)
Linux
Output of colima status
colima doesn't start running on vz. All examples were run with --network-address
It appears to be a non-problem with qemu as I successfully ran the hello-world docker image with the permission denied.
Reproduction Steps
Start from clean state. Delete the /tmp/colima* dirs
the /tmp/colima folder will have permissions of userA wheel rwxr-x---
Start from clean state. Delete the /tmp/colima* dirs
run colima start --vm-type=qemu in userA
run colima stop in userA
log in to userB
run colima start --vm-type=vz in userB
outcome: colima runs correctly and can run the hello-world docker image
the /tmp/colima folder will have permissions of userA wheel rwxr-xr-x
Expected behaviour
Colima should handle the /tmp/colima* directories being owned by other users and be able to start up the container regardless.
Additional context
I have only tested this on Mac M1 Sonoma.
I have installed colima using nix flakes
exact flake urls for colima: github:NixOS/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932#colima v0.6.7 github:NixOS/nixpkgs/fcea2b6260dd566c28c894b4207a5f2b56c2cba3#colima v0.6.8
The text was updated successfully, but these errors were encountered:
zavierboyd
changed the title
Colima using global tmp without user name-spacing causes errors in multi user usage when using --vm-type=vz
Colima using global tmp preventing vm start-up in multi user usage when using --vm-type=vz
Feb 27, 2024
Description
Colima has problems with using
/tmp/colima
or/tmp/colima-<profile>
when used in a multi user contextSpecifically when 2 users run
colima start
separately one users container will not be able to access/tmp/colima
as that folder is owned by another user. When thevm-type
isqemu
this error is ignored and colima continues with the--very-verbose
log containing this:When the
vm-type
isvz
this creates a full exception with an error line of:and fails to start up
This seems to only happen when the
/tmp/colima
dir is initially created by--vm-type=vz
where the dir hasrwxr-x---
(750) perms vsrwxr-xr-x
(755) perms when created by--vm-type=qemu
as--vm-type=vz
in other logins can still use that dir.Version
originally found on:
colima version 0.6.7
git commit: ba1be00
limactl version 0.19.0
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Also tested on:
colima version 0.6.8
git commit: 9b0809d
limactl version 0.19.1
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Operating System
Output of
colima status
colima doesn't start running on vz. All examples were run with
--network-address
It appears to be a non-problem with qemu as I successfully ran the
hello-world
docker image with the permission denied.Reproduction Steps
Start from clean state. Delete the
/tmp/colima*
dirscolima start --vm-type=vz
in userAcolima stop
in userAcolima start --vm-type=vz
in userBoutcome: colima fails to run with an error of
in the ha_stderr.log
the /tmp/colima folder will have permissions of
userA wheel rwxr-x---
Start from clean state. Delete the
/tmp/colima*
dirscolima start --vm-type=qemu
in userAcolima stop
in userAcolima start --vm-type=vz
in userBoutcome: colima runs correctly and can run the hello-world docker image
the /tmp/colima folder will have permissions of
userA wheel rwxr-xr-x
Expected behaviour
Colima should handle the /tmp/colima* directories being owned by other users and be able to start up the container regardless.
Additional context
I have only tested this on Mac M1 Sonoma.
I have installed colima using nix flakes
exact flake urls for colima:
github:NixOS/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932#colima
v0.6.7github:NixOS/nixpkgs/fcea2b6260dd566c28c894b4207a5f2b56c2cba3#colima
v0.6.8The text was updated successfully, but these errors were encountered: