Comments (11)
Okay, in attempting to fix this without having to juggle different versions of Podman, I followed the following steps after a fresh reboot:
wsl --export podman-machine-default podman-machine-default.tar
wsl --unregister podman-machine-default
rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.json
rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.lock
- Repeat steps 1 through 4 for every other Podman machine on the system
podman machine init
podman machine start
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).
from podman.
Maybe all you need to do is the following before upgrading
PS C:\Users\sjfke> podman machine stop
PS C:\Users\sjfke> podman machine rm (y) # this removes all traces of the v4 podman from your account
from podman.
Looking through the source code, it seems that the problem is that it is trying to parse the JSON files in ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\
, but the schema has changed so it can't load the existing podman-machine-default.json
and thus nothing works. If I rename that file, then the podman machine
commands run, but they do not recognize the already-existing machine from 4.9.3.
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 wsl
. Right now I am not sure the best way to proceed without possibly losing data that is on the existing VM.
from podman.
This is expected, see the release notes and https://blog.podman.io/2024/03/migration-of-podman-4-to-podman-5-machines/
from podman.
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?
from podman.
Had the same error... it is due to v4.x podman machine not being cleared out properly, sequence I used:
- uninstall podman-desktop
PS C:\Users\sjfke> podman machine stop
PS C:\Users\sjfke> podman machine rm (y) - uninstall podman (v4.x)
- reboot
- install podman (v5.x)
- reboot
PS C:\Users\sjfke> podman machine info
PS C:\Users\sjfke> podman machine init
PS C:\Users\sjfke> podman machine start - install podman-desktop
from podman.
from podman.
Unfortunately the suggestion I posted above still does not clean out everything from the old Podman installation. podman system connection list
still shows all of the old virtual machines, sockets and SSH configurations. Even worse, podman system connection remove -a
does not remove these connections, even though the machines themselves might have been deleted via wsl --unregister
.
...and of course podman system connection remove -a
now makes it impossible to run podman machine reset
again, because:
Unregistering...
Error: 1 error occurred:
* unable to find connection named "podman-machine-default"
What a mess.
Update - only fix I have found is to completely uninstall Podman altogether (you can't downgrade, even with winget --force
flag), then reinstall 4.9.3, then remove all the machines, then upgrade to 5.0.0 again.
from podman.
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
from podman.
Hi,
I have a fresh installation and am running into this error. What does it cause it and how could I resolve it? I also tried removing postman 5.0.0 and installing postman 4.9.x but there I get the error, that a default machine already exists, but at podman machine rm
tells me there isn't a default machine yet.
from podman.
Try this uninstall 5.0, reinstall 4.9.3
run from windows PowerShell or bash:
$ podman system connection rm podman-machine-default
$ podman system connection rm podman-machine-default-root
$ wsl --list --all
$ wsl --unregister 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
$ podman system connection rm podman-machine-default-root
Ready to Build a new podman machine
$ podman machine init
from podman.
Related Issues (20)
- `docker login` with docker.io creds "successfully" logs-into `registry.fedoraproject.org` then fails to push to `registry-1.docker.io` HOT 2
- podman play kube stops containers immediately with SIGKILL regardless of container stop timeout or kill signal HOT 1
- DNS Options Flag is ineffective at replacing existing options HOT 1
- `docker login` with docker.io creds "successfully" logs-into `registry.fedoraproject.org` then fails to push to `registry-1.docker.io` HOT 2
- losetup fails for the loop device created by host after starting container HOT 13
- Dangling Network / aardvark-dns / Container host file causes DNS Resolution Failure Switching between Valid and Invalid IP Address
- Support system-wide configuration file on Windows too HOT 5
- Podman attemps to pull local images from localhost when pull_policy is set to always. HOT 3
- [packit] Propose downstream failed for release v5.0.2 HOT 2
- composefs helper not found HOT 26
- Incorrect upload speeds with podman push HOT 1
- Use --platform / --arch etc., podman will not lookup image shortname HOT 13
- mkcomposefs: Invalid Integer HOT 2
- podman machine: podman-connections.json may get out of sync and need repair HOT 1
- podman build concurrency: unable to cleanup run mounts error in copier subprocess
- quadlet does not generate service from .container files in `/etc/containers/systemd/` on boot HOT 6
- quadlet: error creating container storage: the container name is already in use after host reboot HOT 2
- Podman panic err, when trying to show the podman disk usage HOT 1
- Podman commands info, pull and others do not work with Podman 5.0.1 on windows using podman machine HOT 16
- After upgrading from 4.4.1 -> 4.6.1, cannot run rootless containers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman.