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

Cannot stop start a podman machine created with applehv #21092

Closed
fabricepipart1a opened this issue Dec 26, 2023 · 6 comments
Closed

Cannot stop start a podman machine created with applehv #21092

fabricepipart1a opened this issue Dec 26, 2023 · 6 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.

Comments

@fabricepipart1a
Copy link

fabricepipart1a commented Dec 26, 2023

Issue Description

When I create a podman machine using applehv, this machine cannot be restarted.

I switched from qemu to applehvby editing /Users//.config/containers/containers.conf:

...
[machine]
provider="applehv"
...

Steps to reproduce the issue

Steps to reproduce the issue

  1. Edit the containers.conf of your host machine (Mac M2 in my case)
  2. podman machine init --cpus 8 --memory 12000 --rootful --user-mode-networking --now
  3. podman ps works showing that the VM is up
  4. podman machine stop
  5. podman machine start

Describe the results you received

The start command hangs:

╰─ podman machine start
Starting machine "podman-machine-default"

It only exits if I kill the process called Virtual Machine Service for vfkit.
VM can only be started once.

Describe the results you expected

I expect the machine to be up again and usable

podman info output

╰─ podman info
OS: darwin/arm64
provider: applehv
version: 4.8.2

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:60801: connect: connection refused

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

For the record, the logs of machine creation:

╰─ podman machine init --cpus 8 --memory 12000 --rootful --user-mode-networking --now
Extracting compressed file: podman-machine-default_fedora-coreos-39.20231204.2.1-applehv.aarch64.raw: done
Machine init complete
Starting machine "podman-machine-default"
WARN[0037] API socket failed ping test
API forwarding listening on:

Another process was listening on the default Docker API socket address.
You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:

        export DOCKER_HOST='unix://'

Machine "podman-machine-default" started successfully

Note that after that command, the podman machine is perfectly usable.

@fabricepipart1a fabricepipart1a added the kind/bug Categorizes issue or PR as related to a bug. label Dec 26, 2023
@yangboroy
Copy link

yangboroy commented Dec 27, 2023

Have the same issue.
Screenshot 2023-12-27 at 09 40 09

@cfergeau
Copy link
Contributor

This is most likely fixed by crc-org/vfkit#76
The patch has been backported to github.com/cfergeau/homebrew-crc/vfkit.rb in case you are using vfkit from brew.

@cgwalters
Copy link
Contributor

Closing per above.

@gbraad
Copy link
Member

gbraad commented Jan 17, 2024

Another issue occurred and has been included as fix in containers/gvisor-tap-vsock#309

This is now merged, but not released yet; this is targeted for Podman 5.x AFAIK. @mheon, @baude and @cfergeau WDYT?

@gbraad

This comment was marked as off-topic.

@fabricepipart1a
Copy link
Author

fabricepipart1a commented Feb 1, 2024

I upgraded to podman desktop 1.7.0 and podman 4.9.0 and it now seems to work:

╰─ podman version
Client:       Podman Engine
Version:      4.9.0
API Version:  4.9.0
Go Version:   go1.21.6
Git Commit:   f7c7b0a7e437b6d4849a9fb48e0e779c3100e337
Built:        Tue Jan 23 02:43:59 2024
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      4.8.3
API Version:  4.8.3
Go Version:   go1.21.5
Built:        Wed Jan  3 15:10:40 2024

╰─ podman machine info
Host:
  Arch: arm64
  CurrentMachine: podman-machine-default
  DefaultMachine: ""
  EventsDir: /var/folder...podman-run--1/podman
  MachineConfigDir: /Users/xxx/.config/containers/podman/machine/applehv
  MachineImageDir: /Users/xxx/.local/share/containers/podman/machine/applehv
  MachineState: Running
  NumberOfMachines: 1
  OS: darwin
  VMType: applehv
Version:
  APIVersion: 4.9.0
  Built: 1705974239
  BuiltTime: Tue Jan 23 02:43:59 2024
  GitCommit: f7c7b0a7e437b6d4849a9fb48e0e779c3100e337
  GoVersion: go1.21.6
  Os: darwin
  OsArch: darwin/arm64
  Version: 4.9.0

I just created a machine with applehv, stopped it and restarted it

@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 May 2, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators May 2, 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.
Projects
None yet
Development

No branches or pull requests

5 participants