-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Default podman machine list --all-providers to true #25253
base: main
Are you sure you want to change the base?
Conversation
Podman Desktop would like this to be the default, and I see little reason why it would not be the default. Signed-off-by: Daniel J Walsh <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@benoitf PTAL |
thanks 👍 it'll help people figuring out why Podman Desktop displays some machine while the rodman CLI doesn't ( without the flag ) |
I do not agree with this |
instead make libkrun the default apple provider |
I'm not a massive fan of this either, but I suppose I can see the appeal. Could I get some additional context as to why this change is wanted? Wouldn't always listing a mix of multiple providers be confusing for the user? |
the main problem is that if you create podman machines using different providers, you only see from the CLI only one machine while Podman Desktop will display them all. So it's becoming confusing The same also if podman CLI is using by default libkrun and user wants to create (to compare/ to test applehv machine) or the opposite, the user doesn't see anymore the machine. the same if user create a machine using CONTAINERS_MACHINE_PROVIDER prefix we (podman desktop)'re getting multiple reports that the cli is not listing the machines. |
To me, it makes sense to only list the current set of machines the user can successfully interact with in the CLI's current state. By "current state" I mean the provider specified in I would find it confusing to list machines, by default, that I can't interact with unless I prefixed my command with an environment variable or stopped my current machine and edited my I'm not going to die on that hill, though. |
there is this existing RFE as well: #20702 to be able to interact easily with the providers. |
This is a long standing problem caused by a difference in how the machine provider is determined between Podman Desktop and Podman. Podman uses containers.conf (if present, otherwise uses a default) to determine the machine provider. Podman Desktop does not interact with this config file for its machine provider. This leads to user experience problems with the Podman command line after Podman Desktop creates or runs a machine with the opposite provider. Here are some options for consideration on this problem. They are in no particular order, though I happen to favor the first.
|
I would say it's a false statement. Podman Desktop read that file and honor also that file to select the default behaviour. But in the UI you need to be able to select the type of the machine you want to select. So podman supports both Else probably nobody would be able to create machines using This is why on my end I would be in favor of the list command listing really what is on the system. The configuration file is stating https://github.com/containers/common/blob/main/docs/containers.conf.5.md
so it's telling me that it'll use that flag to run a machine, not when listing. and there was #20702 asking to be able to interact with machines and specifying the provider type argument so I could easily remove any machine on my system. so for example today you can't init a machine having the same name if used by another provider, so you're like in the middle. you're using a provider but the other provider is affecting you but if you list you don't see other machines. As user experience, I would expect a less painful experience if
and of course, you can only have a single machine running at the time. then switching the default provider from 'applehv' to 'libkrun' would be a seamless experience |
I think the fundamental bit here is that Given this I'm against this PR. The current behavior makes the most sense in our current world, where I don't see an easy short-term solution. The best option may be for Desktop to write containers.conf with a new provider when the active VM is switched, which does not fully address the problem but at least ensures that the in-use VM can be interacted with by |
The idea here is not to support two machines at the same time. If I want to remove one of the machines, I would like to be able to see them in the ls command. Hiding them behind a flag makes little sense to me. I Fully agree that running two machines at the same time would be difficult and would need a big justification. We hit this because RamaLama is trying to identify if the podman machine is running with libkrun, and the machine was not shown. Bottom line for me though, is I would want the default for podman machine to move to libkrun. This has better support for GPU Sharing which is a Huge importance right now. Docker is moving this way using krunkit. I also believe libkrun has better virtiofs support. Next year Apple might release a version of the OS with GPU sharing to VMs, so this decision could be rethought at that time. |
What you are describing does not work right now, because provider switching is required before any commands on a VM not using the current provider will function. When Changing to krun as the default should be a separate discussion. I'm amenable to this for new installs, though existing installs will have to keep the current default to keep using existing machines. But I would like to here what @baude thinks about it. |
I would like to add a caveat to this assertion.
then I can launch containers, pull images, get the version of my remote podman
$ podman ps -a
$ podman pod create --label myFirstPod
$ podman machine reset The following machine(s) will be deleted: NAME PROVIDER
|
I apologize for the misstatement; I meant machine commands. Full access to the API is available so long as it's being forwarded, so provider does not matter for these commands. This does not, however, alter my point. With the way the machine commands (and more specifically their backend) are structured, we cannot support multi-provider operation. We have hacked this into certain commands like In brief, this sounds like something you'll want to raise as a future priority. After evaluating difficulty and priority, we can see where it will slot in, but I continue to suspect this will be a breaking change and we have no immediate plans for a Podman 6. |
@rhatdan can you clarify on the ramalama point you made earlier? do you observe this because Podman Desktop is in play here or purely with the CLI? @rhatdan did you see the list of solutions I provided? Is it safe to say you would like us to deprecate vfkit in favor of libkrun or just swap defaults? |
For the record here, the only bullet proof solution to this is use the containers.conf so both podman and podman desktop can remain in sync. |
RamaLama has switched to checking --all-providers by default. So this argument from a RamaLama point of view is mute. From a Human point of view
If this can not be fixed until 6.0 I guess I have to live with that. As a user, I would expect if I switched from vfkit to libkrun and then could not remove the vfkit VM without switching back, I would think the tool is very broken. |
Switching between providers was not intended to be a common or routine thing, so we didn't architect things for convenience around it. I would say it was a missed opportunity in 5.0, but we already had a lot on our plate that release so I don't think we could have crammed this in as well. |
Podman Desktop would like this to be the default, and I see little reason why it would not be the default.
Does this PR introduce a user-facing change?