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

Unable to Create First Machine with New Download on Windows #22244

Closed
AllanHall opened this issue Apr 2, 2024 · 5 comments
Closed

Unable to Create First Machine with New Download on Windows #22244

AllanHall opened this issue Apr 2, 2024 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. machine windows issue/bug on Windows

Comments

@AllanHall
Copy link

AllanHall commented Apr 2, 2024

Issue Description

This is my first time working with Podman. I downloaded a fresh exe of the most recent version 5.0.1. Downloaded the newest version of WSL. As well as windows terminal per the documentation. After restarting everything I am unable to run podman machine init to create a machine with the following error:

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

I found a similar issue that was closed here #22144 but it focused more on trying to upgrade from a previous version of Podman so I created a new issue. As I am a brand new user, I am just trying to make my first machine. Any guidance on trying to find a fix for a new user or downloading a previous version to get started is appreciated.
Screenshot 2024-04-02 140921
Screenshot 2024-04-02 141144

Steps to reproduce the issue

Steps to reproduce the issue

  1. Download and Install Podman 5.0.1 exe for windows
  2. Install newest WSL version 2.1.5.0
  3. Install Windows Terminal
  4. Reboot
  5. Run podman machine init

Describe the results you received

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

Describe the results you expected

The init command will install a minimal installation of Fedora, customizing it to run podman. Able to create first machine.

podman info output

OS: windows/amd64
provider: wsl
version: 5.0.1

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@AllanHall AllanHall added the kind/bug Categorizes issue or PR as related to a bug. label Apr 2, 2024
@Luap99 Luap99 added machine windows issue/bug on Windows labels Apr 3, 2024
@baude
Copy link
Member

baude commented Apr 3, 2024

can you ls on C:\Users\Ahall\.config/containers/podman/machine/wsl ? if there is only one JSON file in there, can you paste its contents (preferably do not paste as a picture)

@FritzsHero
Copy link

FritzsHero commented Apr 3, 2024

Content of podman-machine-default.json

{
 "ConfigPath": "C:\\Users\\Username\\.config\\containers\\podman\\machine\\wsl\\podman-machine-default.json",
 "Created": "2023-12-12T08:29:41.9944601+01:00",
 "ImageStream": "testing",
 "ImagePath": "C:\\Users\\Username\\.local\\share\\containers\\podman\\machine\\wsl\\podman-machine-default_fedora-podman-amd64-v39.0.2.tar",
 "LastUp": "2024-03-28T23:43:50.3886254+01:00",
 "Name": "podman-machine-default",
 "Rootful": true,
 "IdentityPath": "C:\\Users\\Username\\.ssh\\podman-machine-default",
 "Port": 49961,
 "RemoteUsername": "user",
 "Version": 3,
 "UserModeNetworking": false
}

image

Getting the same error on Win10, Podman 5.0.1 and Podman Desktop 1.8.0

@lazka
Copy link
Contributor

lazka commented Apr 3, 2024

edit: Oh, I noticed this is specifically about new installations, which I don't have, so feel free to ignore my comment.

Same problem here, using a self built podman though:

$ podman --version
podman.exe version 5.0.1
$ podman machine reset
Error: unable to load machine config file: "json: cannot unmarshal string into Go struct field MachineConfig.ImagePath of type define.VMFile"
{
 "ConfigPath": "C:\\Users\\user\\.config\\containers\\podman\\machine\\wsl\\podman-machine-default.json",
 "Created": "2023-02-13T22:05:19.4946104+01:00",
 "ImageStream": "35",
 "ImagePath": "C:\\Users\\user\\.local\\share\\containers\\podman\\machine\\wsl\\podman-machine-default_fedora-podman-amd64-v36.0.124.tar",
 "LastUp": "2024-04-01T12:01:39.3473492+02:00",
 "Name": "podman-machine-default",
 "Rootful": false,
 "IdentityPath": "C:\\Users\\user\\.ssh\\podman-machine-default",
 "Port": 62950,
 "RemoteUsername": "user",
 "Version": 3,
 "UserModeNetworking": false
}

4.9.3 works fine though.

It would be nice if at least deleting and resetting the old machines would work.

@alisonatwork
Copy link

Yeah for upgrade flow it is the same problem described in #22144. A few people have posted workarounds, but it's pretty fiddly to fix.

@AllanHall
Copy link
Author

AllanHall commented Apr 4, 2024

I had installed Podman Desktop the day before and completely deleted it - thinking I removed everything related to start fresh on 5. However, it looks like the VM still remained and it was picking up those remnants when trying to init a new machine. I needed to run podman machine rm to finish cleaning up. I believe this can be closed as its the same issue alisonatwork described above.

@rhatdan rhatdan closed this as completed Apr 4, 2024
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jul 4, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. machine windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

7 participants