Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Native Mac/Windows support #8452

Closed
TomSweeneyRedHat opened this issue Nov 23, 2020 · 33 comments
Closed

RFE: Native Mac/Windows support #8452

TomSweeneyRedHat opened this issue Nov 23, 2020 · 33 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. macos MacOS (OSX) related

Comments

@TomSweeneyRedHat
Copy link
Member

It would be ideal to have native mac and windows support to further the adoption of podman in the community. Users do not want to have a Linux VM just to use podman on these platforms. Furthermore, users won't read the entire README to find out that you really only support Linux and not Mac/Windows without a Linux VM.

First posted against podman.io https://github.com/containers/podman.io/issues/315 by @peters95

@TomSweeneyRedHat TomSweeneyRedHat added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 23, 2020
@mheon
Copy link
Member

mheon commented Nov 23, 2020 via email

@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2020

Containers==Linux, Linux==containers. When users want to run containers they are almost always talking about Linux containers. In order to run a Linux Container, you need a Linux Kernel. Thus you need a VM (Or a hidden VM line WSL2).

In my opinion until the fact that Container are Linux changes, running Native, is just people not understanding containers or being fooled by Docker.

Could we or the community make it easier to get Podman on a Mac or Windows box? YES.
Could we make it easier to get access to a VM running Podman in server mode? YES (This should be a high priority)
Should we make Podman run windows containers? NO, Most users don't have this need. If community wants to add this feature, then we should work with them, but I don't see this as a core requirement.

@afbjorklund
Copy link
Contributor

Some users are looking for a slightly smaller version of CodeReady Containers, but with Podman instead of OpenShift...
There was some talk about adding podman-remote support to the default CRC install, but it is currently broken I think.

This would be similar to using Docker Machine or Podman Machine, instead of Minikube (which includes Kubernetes)
If you want to use minikube to set up your VM (with CRI-O container runtime), you can access the podman service on it:

$ minikube start --container-runtime=cri-o
$ eval $(minikube podman-env)

These are not really "native" installs of podman though. They even bring more baggage with the VM, an orchestrator...

But they are integrated with the "native" hypervisor on each, and they exist as products for Linux, macOS and Windows:

  • Minishift

  • Minikube

@afbjorklund
Copy link
Contributor

afbjorklund commented Nov 27, 2020

It would be ideal to have native mac and windows support to further the adoption of podman in the community. Users do not want to have a Linux VM just to use podman on these platforms. Furthermore, users won't read the entire README to find out that you really only support Linux and not Mac/Windows without a Linux VM.

@TomSweeneyRedHat : This should probably be a separate project (from the main podman "engine"), that would bundle the current podman (for linux) and podman-remote (host) binaries with the VM image and runner and the VM control commands. And the Mac version and the Win version are probably also two completely separate projects, when it comes to the implementation...

Previously we had the boot2podman.iso image with Virtualbox or QEMU runner and the podman-machine controller. But user would rather have something that was integrated and supported, so that you had a supported OS (Linux distribution) and integrated support for talking to the hypervisor (hypervisor.framework/hyper-v) directly instead of using a separate product to do it.

Currently I am using vagrant and bash for experimentation, since it is easier than the custom OS and the custom Go binary...

Another approach would be to supply a Fedora platform for Mac and Win computers, like https://multipass.run/ does for Ubuntu.

@catap
Copy link

catap commented Nov 30, 2020

@afbjorklund docker for mac use the same trick: it started a linux via OS' virtulization library and runs all containers inside.

@afbjorklund
Copy link
Contributor

afbjorklund commented Dec 21, 2020

docker for mac use the same trick: it started a linux via OS' virtulization library and runs all containers inside.

Yes, this is what is sometimes requested but it is not offered by "podman engine", but an imaginary "podman desktop".

Most likely, "podman for mac" and "podman for windows" are separate projects from this "podman" (for linux) ?
And like it says above, maybe running the regular podman from WSL2 is good enough for Windows 10 support

Currently we have "podman remote", which is only the client - and then you have to supply the Linux server yourself.

@afbjorklund
Copy link
Contributor

afbjorklund commented Dec 21, 2020

@TomSweeneyRedHat : you should clarify this issue, if you want a way to do Linux syscalls on Windows and Macintosh operating systems like with (WSL1) Windows Subsystem for Linux or the (BSD) Linuxulator projects. Or if you you just want a slick packaging of Podman + Hypervisor + Image, the way that Docker Desktop is doing it with their remote client and their bundled LinuxKit VM...

Currently you also get all the fun of doing one version for x86, and one version for ARM to support the new "M1" CPU Macs.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jan 21, 2021

@baude is going to start a small project to investigate how we can do better with this, at least on MACs.

@sify21
Copy link

sify21 commented Jan 26, 2021

Hi, there are windows container images. I don't know how it's implemented, maybe there is a group of microsoft engineers supporting this. docker desktop on windows can run them with hyperv when you "switch to windows containers". It uses vms when you "switch to linux containers".

Containers==Linux, Linux==containers. When users want to run containers they are almost always talking about Linux containers. In order to run a Linux Container, you need a Linux Kernel. Thus you need a VM (Or a hidden VM line WSL2).

In my opinion until the fact that Container are Linux changes, running Native, is just people not understanding containers or being fooled by Docker.

Could we or the community make it easier to get Podman on a Mac or Windows box? YES.
Could we make it easier to get access to a VM running Podman in server mode? YES (This should be a high priority)
Should we make Podman run windows containers? NO, Most users don't have this need. If community wants to add this feature, then we should work with them, but I don't see this as a core requirement.

@afbjorklund
Copy link
Contributor

afbjorklund commented Jan 26, 2021

Should we make Podman run windows containers? NO, Most users don't have this need.

docker desktop on windows can run them with hyperv

Note that you can run both real containers (process-isolated) and virtual machine containers (hyperv-isolated):
https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container

The same is true for Linux containers too, by using something like Kata containers* or runV or similar (KVM).
This uses one VM per container (or per pod), traditionally DD used one shared VM for running all containers in.

* https://github.com/kata-containers/documentation/blob/master/design/architecture.md

Theoretically there could also be Mac containers, by using something like the BSD jails.

@afbjorklund
Copy link
Contributor

afbjorklund commented Jan 26, 2021

There is a talk at FOSDEM, about running hypervisor-isolated containers (i.e. VMs) also on macOS:

https://fosdem.org/2021/schedule/event/containers_darwin_containerd/

But I don't know if anyone is working on running darwin containers on darwin, it sounds a bit niche ?

It does have chroot 😛

Hmm, apparently newer versions (10.10) also has something similar to namespaces...

https://www.karltarvas.com/2020/10/25/macos-app-sandboxing-via-sandbox-exec.html

@imperialguy
Copy link

@baude is going to start a small project to investigate how we can do better with this, at least on MACs.

Is there a link to this project?

@rhatdan
Copy link
Member

rhatdan commented Jan 27, 2021

Not yet, we start after BugFix/Stabilization of Podman 3.0. Sometime next month.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@dominic-p
Copy link

Just to throw my 2 cents in, I originally hoped that WSL2 would be the solution to this on Windows, but, unfortunately, the performance is unusably slow. This is a known issue, but it's a hard problem and I don't see a solution coming any time soon. If you want to play around with podman on Windows, sure WSL2 works fine. But, if you want to use it for development, it's not really a solution, in my opinion.

For true Windows support there are a few options I see:

  1. Investigate how to improve WSL2 performance. Outside of /mnt, the performance shouldn't be that bad, so maybe there are some optimizations that can be done. My experience may also be atypical here. I wasn't able to find much on other people running podman on WSL2 beyond just proof of concept.
  2. Develop an easy to use Podman + Hyper V package for Windows that auto-binds working directories, etc. that has decent performance.
  3. Figure out how to do native process-isolation type containers on Windows. I understand from the link above that it does exist, but I don't know if the underlying mechanism supports running Linux containers on Windows. For that, I'm pretty sure you still need some kind of VM.

@afbjorklund
Copy link
Contributor

To be clear, you are talking about filesystem performance when sharing files with Windows rather than process performance ?
The situation is similar on macOS (i.e. slow filesystem), where Docker have developed their own shared filesystem called osxfs.

The previous Podman Machine used sshfs to keep all the files on the Linux VM and share them with the host while editing...
I'm not sure yet what the new Podman Machine (podman machine) will use, since it is very early. But it is using QEMU* for VM.

* https://www.qemu.org/2017/11/22/haxm-usage-windows/

Most likely is using nfs on Mac and Linux, and smb on Windows.

@dominic-p
Copy link

Yes, @afbjorklund, I'm mostly seeing issues with filesystem performance, but there are other issues with WSL2 as well. I discussed some of the problems I ran into on this mailing list thread a while back. Maybe the situation has improved since then though. I haven't really played with it since.

@afbjorklund
Copy link
Contributor

Right, using fuse-overlayfs is slow enough without trying to make it run with vfs...
Also it is mostly a problem for rootless podman running on older Linux kernels.

But if you want filesystem performance, you need to use a local volume mount.

@cdbattags
Copy link

cdbattags commented May 28, 2021

Some users are looking for a slightly smaller version of CodeReady Containers, but with Podman instead of OpenShift...
There was some talk about adding podman-remote support to the default CRC install, but it is currently broken I think.

This would be similar to using Docker Machine or Podman Machine, instead of Minikube (which includes Kubernetes)
If you want to use minikube to set up your VM (with CRI-O container runtime), you can access the podman service on it:

$ minikube start --container-runtime=cri-o
$ eval $(minikube podman-env)

These are not really "native" installs of podman though. They even bring more baggage with the VM, an orchestrator...

But they are integrated with the "native" hypervisor on each, and they exist as products for Linux, macOS and Windows:

  • Minishift
  • Minikube

I just wrote on kubernetes/minikube#8003 about doing such. I'd be curious if it would make better sense to add an optional dependency on macOS podman install for vagrant and virtualbox for doing something like:

This would at least automate the VM provision process and the users can even bring their own base image to match their cloud configuration one day.

@afbjorklund
Copy link
Contributor

afbjorklund commented May 29, 2021

I just wrote on kubernetes/minikube#8003 about doing such. I'd be curious if it would make better sense to add an optional dependency on macOS podman install for vagrant and virtualbox for doing something like:

This would at least automate the VM provision process and the users can even bring their own base image to match their cloud configuration one day.

Both vagrant-machine and podman-machine are deprecated, in favor of using the new podman machine with CoreOS...

There is of course nothing stopping you to use Vagrant and Virtualbox, but it is not an integrated "Podman Machine" either.

I don't think there is any blog entry for this new QEMU offering, but maybe there will be - once it has been released (3.2.0) ?

$ podman --version
podman version 3.2.0-rc3
$ podman machine --help
Manage a virtual machine

Description:
  Manage a virtual machine. Virtual machines are used to run Podman.

Usage:
  podman machine [command]

Available Commands:
  init        Initialize a virtual machine
  list        List machines
  rm          Remove an existing machine
  ssh         SSH into an existing machine
  start       Start an existing machine
  stop        Stop an existing machine

@cdbattags : see https://podman.io/community/meeting/notes/2021-04-06/#podman-on-mac-preview for a demo

It will install the Fedora CoreOS image from https://getfedora.org/en/coreos?stream=next, running in a QEMU VM.

Then it sets up two podman system connections to this machine, one for the "core" user and one for the "root" user.

@baude
Copy link
Member

baude commented Jun 1, 2021

As Anders has already said, stay tuned. Good things coming!

@cdbattags
Copy link

@cdbattags : see https://podman.io/community/meeting/notes/2021-04-06/#podman-on-mac-preview for a demo

It will install the Fedora CoreOS image from https://getfedora.org/en/coreos?stream=next, running in a QEMU VM.

Any way to get access to that recording? And this works on Podman latest or would I have to build a specific branch?

@afbjorklund
Copy link
Contributor

Any way to get access to that recording?

The link is hidden at the top of the page: https://podman.io/community/meeting/notes/2021-04-06/#bluejeans-recording

And this works on Podman latest

As shown it is available in v3.2.0-rc3, there is no special branch. I have not tried it on Mac, I think you want latest QEMU ?

It should work on any qemu version, but if you want hardware support (HVF, similar to KVM on Linux) you want the latest...
Doubly so on the new Apple M1 CPU architecture (arm64). Both architectures are working on Linux out of the box though.

Hopefully there will soon be some documentation for this new version, I only have the old version at boot2podman.github.io

@github-actions
Copy link

github-actions bot commented Jul 5, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jul 5, 2021

@baude What should we do with this issue at this point?

@baude
Copy link
Member

baude commented Jul 6, 2021

technically speaking, we have something people can use ... but it does not do the port mapping yet. That will come in 3.3. I would be fine with closing or keeping open.

@AnthonyPoschen
Copy link

If it is getting closed, having something linked that can be followed for email alerts to know when it's released would be great.

@baude
Copy link
Member

baude commented Jul 6, 2021

lets keep it open until 3.3!

@baude baude added the macos MacOS (OSX) related label Jul 6, 2021
@PRNDA
Copy link

PRNDA commented Jul 14, 2021

nice to hear. can't wait.....

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Aug 16, 2021

Since podman 3.3 rc2 has been cut, I am closing this issue.

@rhatdan rhatdan closed this as completed Aug 16, 2021
@vietvudanh
Copy link

I will be replaced my 6 years old Mac then. Too many things do not work at this point.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. macos MacOS (OSX) related
Projects
None yet
Development

No branches or pull requests