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

Update Podman on Windows - unable to load machine config file - MachineConfig.ImagePath #24503

Open
userid0x0 opened this issue Nov 8, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows

Comments

@userid0x0
Copy link

Issue Description

Hi,
I noticed it's not possible to update between Podman Version 4.x -> 5.x on Windows. Specifically 4.7.2/4.3 -> 5.2.5 .
On all machines nearly every podman command results in the following message:

> podman machine info
Error: failed to get machines unable to load machine config file: "json: cannot unmarshal string into Go struct field MachineConfig.ImagePath of type define.VMFile"

The problem can be solved by deleting the .config/containers/podman/machine/wsl/podman-machine-default.json. A podman machine reset does not resolve the problem.

Interestingly the JSON file has a Version key which is with 5.x lower than with 4.x .

Steps to reproduce the issue

Steps to reproduce the issue

  1. Install Podman 4.3
  2. podman machine init
  3. Install Podman 5.2.5
  4. podman machine info

Workaround

  1. delete .config/containers/podman/machine/wsl/podman-machine-default.json
  2. wsl --unregister podman-machine-default
  3. podman machine init

Describe the results you received

It looks like the format of the json file changed. The Version key is not incremented but decremented.

Describe the results you expected

Either a proper error message or the option to migrate e.g. using podman machine reset or similar.

podman info output

Windows 10

OS: windows/amd64
provider: wsl
version: 5.2.5

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

podman-machine-default.json with 4.x

{
 "ConfigPath": "C:\\Users\\<...>\\.config\\containers\\podman\\machine\\wsl\\podman-machine-default.json",
 "Created": "2022-11-03T10:18:29.784405+01:00",
 "ImageStream": "35",
 "ImagePath": "C:\\Users\\<...>\\.local\\share\\containers\\podman\\machine\\wsl\\podman-machine-default_fedora-podman-v36.0.68.tar",
 "LastUp": "2024-09-16T13:45:50.6695852+02:00",
 "Name": "podman-machine-default",
 "Rootful": true,
 "IdentityPath": "C:\\Users\\<...>\\.ssh\\podman-machine-default",
 "Port": 53443,
 "RemoteUsername": "user",
 "Version": 2
}

podman-machine-default.json with 5.2.5

{
  "Created": "2024-11-08T07:20:24.2386165+01:00",
  "GvProxy": {
    "Debug": false,
    "MTU": 0,
    "LogFile": "",
    "PidFile": "",
    "SSHPort": 0
  },
  "HostUser": {
    "Rootful": true,
    "UID": 1000,
    "HostUserModified": false
  },
  "LastUp": "2024-11-08T07:21:42.7029531+01:00",
  "Mounts": null,
  "Name": "podman-machine-default",
  "Resources": {
    "CPUs": 4,
    "DiskSize": 100,
    "Memory": 2048,
    "USBs": []
  },
  "SSH": {
    "IdentityPath": "C:\\Users\\<...>\\.local\\share\\containers\\podman\\machine\\machine",
    "Port": 63157,
    "RemoteUsername": "user"
  },
  "Version": 1,
  "ImagePath": {
    "Path": "C:\\Users\\<...>\\.local\\share\\containers\\podman\\machine\\wsl\\podman-machine-default-amd64"
  },
  "WSLHypervisor": {
    "UserModeNetworking": false
  },
  "Starting": false,
  "Rosetta": false
}

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@userid0x0 userid0x0 added the kind/bug Categorizes issue or PR as related to a bug. label Nov 8, 2024
@userid0x0 userid0x0 changed the title Podman windows Update - unable to load machine config file - MachineConfig.ImagePath Update Podman on Windows - unable to load machine config file - MachineConfig.ImagePath Nov 8, 2024
@arixmkii
Copy link
Contributor

arixmkii commented Nov 8, 2024

This is expected. 5.0.0 was a big rewrite of the Podman machine https://github.com/containers/podman/blob/main/RELEASE_NOTES.md#breaking-changes the first bullet point says

The backend for the podman machine commands has seen extensive rewrites. Configuration files have changed format and VMs from Podman 4.x and earlier are no longer usable. podman machine VMs must be recreated with Podman 5.

@Luap99 Luap99 added machine windows issue/bug on Windows labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

3 participants