Sharing directories, or "folders", from Mac OS Sequoia to Debian Linux Trixie (testing)

When trying this command;

incus config device add Trixie macmini disk source=/Users/foobar path=/home/foo/macmini shift=true

I received this error;

Error: Failed to start device "macmini": Required idmapping abilities not available

I’ve installed incus 6.7 and colima with homebrew.

/User/XYZ in Colima uses FUSE. FUSE in Ubuntu 24.04’s kernel doesn’t support idmap shifting so that’s why you’re getting that error.

Upgrading the colima VM to a more recent kernel should take care of this:

sudo apt remove --purge libzfs4linux zfs-zed zfsutils-linux
curl https://pkgs.zabbly.com/get/kernel-stable | sudo sh
curl https://pkgs.zabbly.com/get/zfs-stable | sudo sh

Doing that through colima ssh and then rebooting with sudo reboot.

That effectively pulls in a Linux 6.12 kernel and the matching ZFS for it.

3 Likes

So, can we share those get URLs now?

Thanks Stéphane! I will try that.

They’re not secret but it’s usually just bad practice to encourage folks to pipe random scripts into a root shell. I’m fine with suggesting it here as Colima is already a VM environment that already pulls a bunch of external stuff (including Incus) without the user’s review, so doing more of that for the kernel and ZFS isn’t really a concern here.

1 Like

Seemed to work like a charm:
Linux colima 6.12.5-zabbly+ #ubuntu24.04 SMP PREEMPT_DYNAMIC Tue Dec 17 00:43:22 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

2 Likes

I think it makes sense to make this the default experience for the Incus runtime on Colima.

1 Like

I will give this a try.

Once I upgraded to the updated kernel, I encountered this error;
incus start Trixie Error: Failed to setup device mount "macmini": idmapping abilities are required but aren't supported on system Try 'incus info --show-log Trixie' for more info

The kernel version I’m running in Colima;
Linux colima 6.12.5-zabbly+ #ubuntu24.04 SMP PREEMPT_DYNAMIC Tue Dec 17 00:43:22 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

I’ll test with updated Colima kernel.

Running this command gave a strange output;

$ sudo apt remove --purge libzfs4linux zfs-zed zfsutils-linux
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'libzfs4linux' is not installed, so not removed
Package 'zfs-zed' is not installed, so not removed
Package 'zfsutils-linux' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  linux-image-6.8.0-47-generic linux-modules-6.8.0-47-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.

I ignored the fact that the packages weren’t installed and went ahead and added them via curl anyway. It appears they’re named ‘openzfs-zfsutils openzfs-zfs-zed openzfs-libzfs4’ at least on my system.

Running zfs version now produces;

$ zfs version
zfs-2.2.7-1
zfs-kmod-2.2.7-1

and the kernel is;

Linux colima 6.12.8-zabbly+ #ubuntu24.04 SMP PREEMPT_DYNAMIC Fri Jan  3 18:24:32 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

After this change and a reboot of the VM running on OS X, I was able to have Colima restart Incus this way;

 colima start --runtime incus

and once I logged into my Debian Trixie instance with the OS X home directory attached to the container, I was able to view files from the host OS in my container. They are owned by nobody but I can read and execute files.

@jeremiah if you do not mind disposing your current setup. I think it is better to get Colima to utilise virtualization framework instead of Qemu.

Virtualization framework uses virtiofs for shared directories which should provide a better experience compared to sshfs used by Qemu.

“Dispose” my current setup? Hmm, I have a lot of stuff I’ve been working on in those containers. I wonder if I can preserve that? I have snapshots and such but would Colima require that I replace those snapshots and other Incus configuration?

In that case, I would not recommend disposing it. It is not worth it.

1 Like