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

Support enabling Podman Machine detection on Linux #5823

Closed
cdrage opened this issue Feb 2, 2024 · 11 comments · Fixed by #5902
Closed

Support enabling Podman Machine detection on Linux #5823

cdrage opened this issue Feb 2, 2024 · 11 comments · Fixed by #5902
Assignees
Labels
area/extension/podman 🦭 kind/feature 💡 Issue for requesting a new feature

Comments

@cdrage
Copy link
Contributor

cdrage commented Feb 2, 2024

Is your feature request related to a problem? Please describe

See: #5762

There are cases where creating a podman machine on Linux would be beneficial, such as monitoring / viewing a "root" podman machine to be able to run root containers.

Describe the solution you'd like

Enabling podman machine for linux.

Describe alternatives you've considered

No response

Additional context

No response

@cdrage cdrage added the kind/feature 💡 Issue for requesting a new feature label Feb 2, 2024
@feloy
Copy link
Contributor

feloy commented Feb 2, 2024

We will need to be VERY careful that this possibility is understood to be useful for very specific use cases (and make the native experience at least as good as the machine one on Linux), or Linux users will all switch to a machine, and I'm not sure this is what we want

@cdrage
Copy link
Contributor Author

cdrage commented Feb 2, 2024

We will need to be VERY careful that this possibility is understood to be useful for very specific use cases (and make the native experience at least as good as the machine one on Linux), or Linux users will all switch to a machine, and I'm not sure this is what we want

1000% agree. This is not an ideal scenario and is only applicable for certain use cases as well (needing to run a root container).

We could even put a large disclaimer that this is not an ideal scenario / not recommended, but the user can go ahead and do it anyways..

The reasoning for this is being able to create a linux podman machine with root support so we can run containers that manipulates filesystems / needs the host in order to create partitions, etc.

For Linux, it would be difficult to implement native sudo / root support, so podman machine would be a better / more straight-forward way for implementation: #2861

@afbjorklund
Copy link
Contributor

The main reason was to not make Podman Desktop worse on Linux, compared to what it is on Mac and Windows.

Otherwise you read about some new feature in Podman, but then find that it is not supported in your old Podman?

https://podman-desktop.io/blog/wasm-workloads-on-macos-and-windows-with-podman

The whole reason for creating podman-machine was that I wanted to try it on ubuntu...

@afbjorklund
Copy link
Contributor

afbjorklund commented Feb 2, 2024

The reasoning for this is being able to create a linux podman machine with root support so we can run containers that manipulates filesystems / needs the host in order to create partitions, etc.

You don't need a VM for that, there is already a podman.sock for root

Using docker has the same issue, unless you are using the rootless socket.

As in: dial unix /var/run/docker.sock: connect: permission denied

@afbjorklund
Copy link
Contributor

The alternative is extending the support for Podman v3, while the other users are enjoying their Podman v5.

@cdrage
Copy link
Contributor Author

cdrage commented Feb 2, 2024

The reasoning for this is being able to create a linux podman machine with root support so we can run containers that manipulates filesystems / needs the host in order to create partitions, etc.

You don't need a VM for that, there is already a podman.sock for root

Unfortunately doing it that way would involve changing group permissions like you mentioned with regards to the root socket since it's read only. So it won't be straight forward from a "do it via an extension" perspective.

Since we are running PD as a flatpak on Linux, I believe it wouldn't be viable to modify the flatpak permissions and have podman desktop run as root in order to get access. We wouldn't be able to automate / do it through the UI and rather have to get the user to modify through CLI the permissions, etc.

Since podman actually supports running a podman machine under linux, adding this would actually be super beneficial for users who have a different podman installed on their machine, like your example on ubuntu.

@cdrage cdrage self-assigned this Feb 2, 2024
@afbjorklund

This comment was marked as off-topic.

@cdrage
Copy link
Contributor Author

cdrage commented Feb 6, 2024

Notes from async meeting:

  • Because of dependency issues across multiple platforms (example, Ubuntu does not package qemu-kvm with podman), we should not allow the creation of a podman machine WITHIN podman desktop, but instead have documentation that shows to create it depending on OS we support (example, this works well on fedora 39, but not on ubuntu).
  • Podman Desktop will still detect podman machine's running on Linux and add it / detect them automatically, as well as be able to start / stop them. But not create them.

We should also implement #5828

@cdrage
Copy link
Contributor Author

cdrage commented Feb 6, 2024

Currently you can start a "podman machine", with Podman Desktop, by using the Lima provider (through the CLI):

https://podman-desktop.io/docs/lima/creating-a-lima-instance - limactl start template://podman

It also allows using distributions other than Fedora CoreOS, for faster updates and (optionally) smaller footprint.

Thank you that's exactly it, there was a brief discussions with @benoitf that there is support for creating these podman machine's, etc with other extensions, but we should allow podman desktop to at least detect these machines.

cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 7, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@afbjorklund

This comment was marked as resolved.

@cdrage cdrage changed the title Support creating a Podman Machine on Linux Support enabling Podman Machine detectin on Linux Feb 8, 2024
@cdrage cdrage changed the title Support enabling Podman Machine detectin on Linux Support enabling Podman Machine detection on Linux Feb 8, 2024
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 15, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 15, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 15, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 15, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 20, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Feb 26, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit that referenced this issue Feb 26, 2024
### What does this PR do?

* Enables Podman Machine detection for Linux
* Allows the ability for PD to detect and deploy to Podman machine
* Does not allow creation (you can only do this via CLI).

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes #5823

### How to test this PR?

<!-- Please explain steps to reproduce -->

1. `podman machine init` or `podman machine init --rootful` on the CLI
2. Open up PD
3. See that the machine is detected on the Providers list
4. Pull an image / Build an image and select "Podman Machine", it'll be
   successful.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@afbjorklund
Copy link
Contributor

This feature seems to be missing documentation (it only links to podman.io, and that is about it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/extension/podman 🦭 kind/feature 💡 Issue for requesting a new feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants