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

Podman v5.0 on MacOs gives an error when starting a podman machine #22174

Closed
tijder opened this issue Mar 26, 2024 · 9 comments
Closed

Podman v5.0 on MacOs gives an error when starting a podman machine #22174

tijder opened this issue Mar 26, 2024 · 9 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 macos MacOS (OSX) related

Comments

@tijder
Copy link

tijder commented Mar 26, 2024

Issue Description

After updating Podman to version 5.0 on a MacBook. I couldn't get the podman machine to start.

Steps to reproduce the issue

Steps to reproduce the issue

  1. brew uninstall podman
  2. rm -rf ~/.ssh/podman-machine-default
  3. rm -rf ~/.ssh/podman-machine-default.pub
  4. rm -rf ~/.local/share/containers
  5. rm -rf ~/.config/containers
  6. brew install podman
  7. podman machine init
  8. podman machine start

Describe the results you received

A podman machine running in the background.

Describe the results you expected

I got an error message in the terminal with:
Error: invalid character '<' looking for beginning of value

podman info output

OS: darwin/arm64
provider: applehv
version: 5.0.0

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:52272: connect: connection refused

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

I didn't delete the old Podman machine before upgrading. That's why I uninstalled Podman and deleted all the folders of Podman. The I installed it again.

@tijder tijder added the kind/bug Categorizes issue or PR as related to a bug. label Mar 26, 2024
@tijder tijder changed the title Podman v5 on MacOs gives an error when starting a podman machine Podman v5.0 on MacOs gives an error when starting a podman machine Mar 26, 2024
@jakecorrenti jakecorrenti added macos MacOS (OSX) related machine labels Mar 26, 2024
@baude
Copy link
Member

baude commented Mar 26, 2024

are you getting the error on step 8 or when you run a container ?

@tijder
Copy link
Author

tijder commented Mar 26, 2024

I get the error on step 8.

@baude
Copy link
Member

baude commented Mar 26, 2024

does podman machine ls work after init? i think i have seen this with invalid json files. how about other commands like podman machine rm ?

could you also post podman --log-level debug machine start ?

@tijder
Copy link
Author

tijder commented Mar 26, 2024

This is the output from those three commands:

tijder@LMXJF22XJ9 ~ % podman machine ls
Error: invalid character '<' looking for beginning of value
tijder@LMXJF22XJ9 ~ % podman machine rm
Error: invalid character '<' looking for beginning of value
tijder@LMXJF22XJ9 ~ % podman --log-level debug machine start
INFO[0000] podman filtering at log level debug
DEBU[0000] Using Podman machine with applehv virtualization provider
DEBU[0000] socket length for /Users/tijder/.config/containers/podman/machine/applehv is 57
DEBU[0000] socket length for /Users/tijder/.local/share/containers/podman/machine/applehv is 62
DEBU[0000] socket length for /Users/tijder/.local/share/containers/podman/machine/applehv/cache is 68
DEBU[0000] socket length for /var/folders/pm/kvb439n12c99ynn_fyw_65ww0000gq/T/podman is 55
DEBU[0000] socket length for /Users/tijder/.config/containers/podman/machine/applehv/podman-machine-default.json is 85
Starting machine "podman-machine-default"
DEBU[0000] socket length for /Users/tijder/.config/containers/podman/machine/applehv is 57
DEBU[0000] socket length for /Users/tijder/.local/share/containers/podman/machine/applehv is 62
DEBU[0000] socket length for /Users/tijder/.local/share/containers/podman/machine/applehv/cache is 68
DEBU[0000] socket length for /var/folders/pm/kvb439n12c99ynn_fyw_65ww0000gq/T/podman is 55
DEBU[0000] socket length for /Users/tijder/.config/containers/podman/machine/applehv/podman-machine-default.json is 85
Error: invalid character '<' looking for beginning of value
DEBU[0000] Shutting down engines

@tijder
Copy link
Author

tijder commented Mar 26, 2024

This the content of the /Users/tijder/.config/containers/podman/machine/applehv/podman-machine-default.json:

{"Created":"2024-03-26T13:32:19.78151+01:00","GvProxy":{"Debug":false,"MTU":0,"LogFile":"","PidFile":"","SSHPort":0},"HostUser":{"Rootful":false,"UID":503,"HostUserModified":false},"LastUp":"0001-01-01T00:00:00Z","Mounts":[{"OriginalInput":"","ReadOnly":false,"Source":"/Users/tijder","Tag":"Users-tijder","Target":"/Users/tijder","Type":"virtiofs","VSockNumber":null}],"Name":"podman-machine-default","Resources":{"CPUs":6,"DiskSize":100,"Memory":8000,"USBs":[]},"SSH":{"IdentityPath":"/Users/tijder/.local/share/containers/podman/machine/machine","Port":52272,"RemoteUsername":"core"},"Version":1,"ImagePath":{"Path":"/Users/tijder/.local/share/containers/podman/machine/applehv/podman-machine-default-arm64.raw"},"AppleHypervisor":{"Vfkit":{"LogLevel":"panic","Endpoint":"http://localhost:52846","VfkitBinaryPath":null,"VirtualMachine":{"vcpus":6,"memoryBytes":8000,"bootloader":{"kind":"efiBootloader","EFIVariableStorePath":"/Users/tijder/.local/share/containers/podman/machine/applehv/efi-bl-podman-machine-default","CreateVariableStore":true}}}},"Starting":false}

@baude
Copy link
Member

baude commented Mar 26, 2024

based on this, i think it is when we write the configuration file when trying to start the machine. it is def a json operation

@joshuapetryk
Copy link

Downgraded to Podman 4.9.2 and now the machine is able to start. (Running on M2 MacOS Sonoma 14.4.1)

@msgilligan
Copy link

msgilligan commented Apr 22, 2024

I was able to get Podman 5.0.2 (installed via Nixpkgs) running on darwin-aarch64 by installing vfkit with Homebrew. see: NixOS/nixpkgs#305868

Update: I opened a separate packaging request for vfkit: NixOS/nixpkgs#306179

@tijder
Copy link
Author

tijder commented May 14, 2024

After updating to Podman 5.0.3 with brew, Podman is working on my MacBook.

@tijder tijder closed this as completed May 14, 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 Aug 13, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Aug 13, 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 macos MacOS (OSX) related
Projects
None yet
Development

No branches or pull requests

5 participants