Giter Club home page Giter Club logo

Comments (11)

alisonatwork avatar alisonatwork commented on May 28, 2024 9

Okay, in attempting to fix this without having to juggle different versions of Podman, I followed the following steps after a fresh reboot:

  1. wsl --export podman-machine-default podman-machine-default.tar
  2. wsl --unregister podman-machine-default
  3. rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.json
  4. rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.lock
  5. Repeat steps 1 through 4 for every other Podman machine on the system
  6. podman machine init
  7. 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.

sjfke avatar sjfke commented on May 28, 2024 2

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.

alisonatwork avatar alisonatwork commented on May 28, 2024 1

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.

Luap99 avatar Luap99 commented on May 28, 2024 1

This is expected, see the release notes and https://blog.podman.io/2024/03/migration-of-podman-4-to-podman-5-machines/

from podman.

alisonatwork avatar alisonatwork commented on May 28, 2024 1

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.

sjfke avatar sjfke commented on May 28, 2024

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.

sjfke avatar sjfke commented on May 28, 2024

from podman.

alisonatwork avatar alisonatwork commented on May 28, 2024

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.

sjfke avatar sjfke commented on May 28, 2024

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.

NeffIsBack avatar NeffIsBack commented on May 28, 2024

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.

dealer426 avatar dealer426 commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.