-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
after winget upgrade to 5.0.0, all podman machine commands fail with json error #22144
Comments
Looking through the source code, it seems that the problem is that it is trying to parse the JSON files in I see from the changelog that the VM format has changed, but if that is the case then I think the installer should either refuse to install if it encounters an existing VM, or it should rename the old ones so that at least podman will still work correctly after the upgrade and users can still manually get the data off their old machines using |
Had the same error... it is due to v4.x podman machine not being cleared out properly, sequence I used:
|
Maybe all you need to do is the following before upgrading PS C:\Users\sjfke> podman machine stop |
This is expected, see the release notes and https://blog.podman.io/2024/03/migration-of-podman-4-to-podman-5-machines/ |
The linked blog is not very helpful, because it says:
How long should we wait? Is there any kind of fix scheduled for this? If the only supported upgrade path is to delete all the virtual machines and start from scratch, then I think the installer should at least prompt the user to do that before silently "upgrading" the system to a broken state. It's still not clear how to fix this once the system has entered the broken state. Do we need to downgrade back to the old version, back up all the data from the various machines, then delete them (as per the blog) and upgrade again? |
Okay, in attempting to fix this without having to juggle different versions of Podman, I followed the following steps after a fresh reboot:
At this point you can at least run containers again. The next step will be recreating every machine you need and manually copying across any custom stuff from the tar backups. The VMs still don't have rpm-ostree so the process of reconfiguring stuff in /etc and updating with dnf seems unchanged from the pre-5.0 dance. If anyone is looking for the new VM source, I think it has moved over here now: https://github.com/containers/podman-machine-wsl-os (previously https://github.com/containers/podman-wsl-fedora). |
Hello to both of you...
It is understandable that given there is a large section name 'breaking changes' on https://github.com/containers/podman/releases you are most likely starting from scratch.
Emphasizing that this upgrade means deleting 'podman-machine-default' and starting afresh and rebuilding your environment from scratch would help.
I naively assumed the upgrade would do this for me rather than trying to run podman-5 on a podman-4 VM.
Technically this is a new fresh install not an upgrade.
IMHO: If you cannot restore your working environment from scratch then you have bigger problems.
BUT: warn them they will have to...
As I discovered you can roll-back by de-installing podman-v5 and re-installing the version of podman you are trying to upgrade from.
It is the references in your account that appear to be pointing at the old VM image, that cause of the errors.
From running 'podman machine rm' it appears to be the following folders
* C:\Users\sjfke\.config\containers...
*
C:\Users\sjfke\AppData\Local\Temp\podman...
There might also be some brokeness in the podman-desktop interfering with this upgrade... didn't try was just happy to have figured out how to get my podman-5 working. So maybe best to ask folks to de-install and re-install podman-desktop?
Confession: I only ever check the releases, but as I am now retired I am never doing anything critical, wasn't aware of the blog post.
Another big clue... was on a successful install it takes much longer and you see it download the new VM.
Sjfke (Geoff)
…________________________________
From: Alison Winters ***@***.***>
Sent: Sunday, March 24, 2024 4:24 PM
To: containers/podman ***@***.***>
Cc: Geoff Collis ***@***.***>; Comment ***@***.***>
Subject: Re: [containers/podman] after winget upgrade to 5.0.0, all podman machine commands fail with json error (Issue #22144)
The linked blog is not very helpful, because it says:
If you are working on a critical project where you rely on Podman machine for your development, you should consider waiting to upgrade to Podman 5.
How long should we wait? Is there any kind of fix scheduled for this?
If the only supported upgrade path is to delete all the virtual machines and start from scratch, then I think the installer should at least prompt the user to do that before silently "upgrading" the system to a broken state.
It's still not clear how to fix this once the system has entered the broken state. Do we need to downgrade back to the old version, back up all the data from the various machines, then delete them (as per the blog) and upgrade again?
—
Reply to this email directly, view it on GitHub<#22144 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIEGOY6BI7UWRTMPY6B4DWLYZ3V3ZAVCNFSM6AAAAABFEKVNGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHA2DGNZTG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Unfortunately the suggestion I posted above still does not clean out everything from the old Podman installation. ...and of course
What a mess. Update - only fix I have found is to completely uninstall Podman altogether (you can't downgrade, even with winget |
Hi Alison Essentially I was trying to do a v4.9.3 -to- v5.0.0 upgrade and concur this is a mess... Is 'podman-v5.0.0' considered stable enough to work with or should I uninstall and install 'podman-v4.9.4'? and wait... Sjfke |
Hi, |
Try this uninstall 5.0, reinstall 4.9.3 run from windows PowerShell or bash: $ podman system connection rm podman-machine-default Go to .ssh folder on winodws Delete podman ssh keys Uninstall 4.9.3 Install 5.0 C:\Users\burns.config\containers\podman\machine\wsl Go to this folder Delete all files Run these commands again $ podman system connection rm podman-machine-default Ready to Build a new podman machine $ podman machine init |
For me the easiest way was just going to Podman Desktop and following the suggested instructions!. Maybe that help another people |
This is missing a |
Issue Description
I just upgraded Podman to 5.0.0 using winget upgrade, and now I cannot access any of the machines or basic functionality.
The error when running any
podman machine
command is as follows:Steps to reproduce the issue
Steps to reproduce the issue:
--scope machine
)podman machine list
(or any otherpodman machine
command)Describe the results you received
Describe the results you expected
Podman should work normally, but it does not.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Windows 11 Version 23H2 (OS Build 22631.3371)
Additional information
Tested on a clean system with no other WSL machines installed.
Tested both as administrator and normal user, same error message.
The text was updated successfully, but these errors were encountered: