podman: Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-x86_64: cannot create PID file: Cannot lock pid file: Resource temporarily unavailable
podman fails to start
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-x86_64: cannot create PID file: Cannot lock pid file: Resource temporarily unavailable
Steps to reproduce the issue:
-
Stop machine.
-
Start machine.
-
Machine starts or not starts very unpredictably.
Describe the results you received:
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-x86_64: cannot create PID file: Cannot lock pid file: Resource temporarily unavailable
Describe the results you expected: Stuff to work? More descriptive error messages?
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
podman version
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. failed to create sshClient: connection to bastion host (ssh://core@localhost:50422/run/user/502/podman/podman.sock) failed: dial tcp [::1]:50422: connect: connection refused
Output of podman info:
podman info
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. failed to create sshClient: connection to bastion host (ssh://core@localhost:50422/run/user/502/podman/podman.sock) failed: dial tcp [::1]:50422: connect: connection refused
Package info (e.g. output of rpm -q podman or apt list podman or brew info podman):
==> podman: stable 4.2.1 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/usr/local/Cellar/podman/4.2.1 (178 files, 48.5MB) *
Poured from bottle on 2022-09-15 at 22:39:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go-md2man ✘, go@1.18 ✘
Required: qemu ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Analytics
install: 24,813 (30 days), 64,356 (90 days), 211,186 (365 days)
install-on-request: 24,012 (30 days), 62,808 (90 days), 209,311 (365 days)
build-error: 1 (30 days)
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.): mac
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 28 (5 by maintainers)
Commits related to this issue
- machine: QEMU: recover from failed start After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID... — committed to vrothberg/libpod by vrothberg a year ago
- machine: QEMU: recover from failed start After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID... — committed to vrothberg/libpod by vrothberg a year ago
- machine: QEMU: recover from failed start After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID... — committed to vrothberg/libpod by vrothberg a year ago
- machine: QEMU: recover from failed start After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID... — committed to vrothberg/libpod by vrothberg a year ago
- machine: QEMU: recover from failed start After a failed start, we can run into (somehow inconsistent) states where the machine won't start because a previous QEMU process is still running and the PID... — committed to vrothberg/libpod by vrothberg a year ago
I had this same issue today, what I did to “solve” it is to kill the qemu process with a
kill -9 PIDcommand. Then, I run thepodman machine startcommand and it started successfully.if your qemu is upgraded, try remove podman machine and initialize again
Today I also got into this problem. I tried to start podman machine and it gave me exit status 255. Next try was unsuccessfully and the
podman machine startprocess just hanged and I killed it with ctrl-c. Third time I got the error mentioned in this issue (Error: qemu exited unexpectedly with exit code 1). After killing the/opt/homebrew/bin/qemu-system-aarch64process from my machine, I could once again start podman machine.The session with my shell:
I ran into this issue as well today with:
Here is a oneliner to solve the issue:
You may then run
podman machine startand keep rollingIt was a failed shutdown for me. Thanks @oherrala! More simply
It was solved when I restarted the computer. You can restart your computer. I have no idea about the problem.
Same problem M1
I have the same problem on latest macOS
Just also run into this issue on an M1 Macbook. Started with podman not being able to do anything. The virtual machine did not react. Stopping the machine with “podman machine stop” did hang forever. Afterwards i killed the qemu process and started the machine again. Not very user friendly.
Any chance podman can detect a non-responsive vm? This would help a lot. Happens every x days after resuming from suspend unfortunately.