Skip to content

support MacOS #21

Open
Open

Description

@cgwalters

This is a key thing for us to finish replacing podman-bootc. I think a key thing here is we should act as close as possible to the Linux implementation. Ideally bcvk ephemeral works.

We can easily scrape out the kernel+initramfs from the target container image back to the host and launch krun (or via macadam) from there. The trickier bit here will be replicating the "mount target container image's root" when the files live inside the rootfs of the podman-machine VM. I am not sure if we can easily do the virtiofs thing. Maybe we could try using e.g. NFS (eww?).

Activity

  1. cfergeau commented on Sep 24, 2025

    @cfergeau

    9p might also be an option for the file sharing.

    With newer macs (M3+) nested virtualization is supported in linux guests, I don’t know if running a nested VM inside the podman machine VM could achieve what you are after?

  2. cgwalters commented on Sep 24, 2025

    @cgwalters
    MemberAuthor

    Also explicitly cross-referencing crc-org/macadam#140

    With newer macs (M3+) nested virtualization is supported in linux guests, I don’t know if running a nested VM inside the podman machine VM could achieve what you are after?

    It's a bit tricky; I think sometimes folks would want that, other times not. The biggest thing here is it scopes resource usage of the L2 VMs to the max resources of the L1 (podman machine) VM.

  3. gbraad commented on Sep 24, 2025

    @gbraad

    For macadam SELinux is enabled, while for bcvk this is disabled. This is one of those things that people want to test with

  4. cgwalters commented on Sep 24, 2025

    @cgwalters
    MemberAuthor

    For macadam SELinux is enabled, while for bcvk this is disabled.

    We only emit selinux=0 for bcvk ephemeral right now, we definitely don't do that (i.e. selinux is enforcing) for the bcvk to-disk and bcvk libvirt flows.

  5. cgwalters commented on Sep 24, 2025

    @cgwalters
    MemberAuthor

    We only emit selinux=0 for bcvk ephemeral right now,

    Split that issue out to #22

  6. cfergeau commented on Sep 25, 2025

    @cfergeau

    The trickier bit here will be replicating the "mount target container image's root" when the files live inside the rootfs of the podman-machine VM. I am not sure if we can easily do the virtiofs thing. Maybe we could try using e.g. NFS (eww?).

    Does this need to be writable? or read-only is fine? https://manpages.ubuntu.com/manpages/questing/en/man1/nbdkit-linuxdisk-plugin.1.html might work for that. vfkit can use a disk image served over nbd.

  7. cgwalters commented on Sep 25, 2025

    @cgwalters
    MemberAuthor

    Does this need to be writable? or read-only is fine?

    bcvk ephemeral always injects systemd.volatile=overlay today, so we don't depend on writes to the backing store.

    https://manpages.ubuntu.com/manpages/questing/en/man1/nbdkit-linuxdisk-plugin.1.html might work for that. vfkit can use a disk image served over nbd.

    To me a big goal of bcvk ephemeral is that it's O(1) to launch (i.e. it doesn't get slower as your image gets bigger). This is how podman run works because of overlayfs and general dynamic access.

    It would not be O(1) to run e.g. mke2fs on a loop blockdev and serve that via nbd (and of course more generally doing so requires duplicating storage!). Now...could we somehow have a nbd server that was dynamic? In theory, maybe? I guess in particular with erofs it seems theoretically possible...

    But really serving via virtiofsd or some other filesystem-based mechanism just meshes much more directly/natively with container images.

  8. cfergeau commented on Sep 26, 2025

    @cfergeau

    It would not be O(1) to run e.g. mke2fs on a loop blockdev and serve that via nbd

    hadn’t looked at the linuxdisk plugin source code, I assumed/hoped this was dynamically generated, but now I see the mke2fs call in there :(

    But really serving via virtiofsd or some other filesystem-based mechanism just meshes much more directly/natively with container images.

    We don’t have that level of control over apple’s virtiofs implementation (ie vfkit), but maybe something could be done with the krunkit stack? I’m not familiar enough with it.

  9. cgwalters commented on Sep 26, 2025

    @cgwalters
    MemberAuthor

    Did coreos/cap-std-ext#80 to help with this

  10. cgwalters commented on Sep 26, 2025

    @cgwalters
    MemberAuthor

    We don’t have that level of control over apple’s virtiofs implementation (ie vfkit), but maybe something could be done with the krunkit stack? I’m not familiar enough with it.

    cc @germag

  11. jtligon commented on Oct 24, 2025

    @jtligon

    would be bcvk be an executable on the mac like bcvk run, or would it be podman machine ssh -> bcvk run?

    if its the latter, then we need to rethink this concept. The solution to supporting another OS shouldn't be "lets just get them to a Linux shell so they can do linux-y things"

  12. cgwalters commented on Oct 24, 2025

    @cgwalters
    MemberAuthor

    No the plan is the former; doing anything bcvk-like from inside a VM would add a whole massive level of complexity.

  13. cgwalters commented on Feb 25, 2026

    @cgwalters
    MemberAuthor

    OK on this topic I did #211 - in a nutshell, supporting apple/container would probably be quite a bit easier than supporting podman machine.

  14. jtligon commented on Feb 25, 2026

    @jtligon

    Need a review of some swift code? Let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions