-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[macos] cannot start a VM created with podman machine init after a reboot #10824
Comments
@baude @ashley-cui PTAL |
@yvanarnaud, if you do a |
@ashley-cui, I tried that but the error still occur. |
A workaround is to create the missing podman directory:
Still, I don't know why and when this directory is removed. |
Hmm okay thanks for the info! |
That location is akin to a tmpdir iirc. I wonder if macos changes the tempdir after reboot? Should be easy enough to replicate and see. |
@baude, you are right:
It is the same folder after each reboot. |
@ashley-cui are you able to replicate this? or want me to run it down ? |
@baude haven't touched it, if you want to grab it feel free |
alright, whats going on here is that the tmpdir is being cleaned on each reboot (as it should) and |
If the tempdir for the OS does not have a podman/, machine start will fail. An example would be after a reboot. We now create the podman dir if it does not exist. Fixes containers#10824 [NO TESTS NEEDED] Signed-off-by: baude <[email protected]> Signed-off-by: Brent Baude <[email protected]>
in my case the temp dir is still exists but somehow the |
@Nilegfx please open a new issue ... provide as much information as possible and follow the template. |
After some time debugging, I found the cause of this problem. This problem is caused due to qemu 7.0.0 startup latency (3-5s) that occour in every first qemu execution after Mac Machine machine boots. Podman has some bug that doesn't expect that the creation of socks files, done by the qemu call, can be delayed some seconds, and when podman tries to access the socks files, the qemu is not created them yet, showing the error "Error: dial unix /podman/podman-machine-default_ready.sock: connect: connection refused". To avoid this problem, just execute qemu, even with invalid options (just to initialize), before call "podman machine start".
I hope help. |
i faced same kind of issue. Remove podman brew uninstall podman rm ~/.ssh/podman* related files |
@kspendli thank you so much. |
Apparently same problem is valid even with podman 4.0.3 on macos. All I did was to cache the container image with GHA in order to reduce its setup time, but apparently podman fails to start on a VM that was only few monutes old.
|
@carlosgorges It is not so simple as the code should be multi-arch compatible, I ended up using:
|
Thank you! That helped for me. 🚀 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
On MacOS, after rebooting, the VM created with
podman machine init
cannot start anymore.Steps to reproduce the issue:
create a VM with
podman machine init
: working as expectedstart it with
podman machine start
: working as expectedreboot
start VM again with
podman machine start
: VM does not startDescribe the results you received:
Waiting for VM ... qemu-system-x86_64: -qmp unix://var/folders/78/y7tgcc410y34zywtm83dgjt80000gn/T/podman/qmp_podman-machine-default.sock,server=on,wait=off: Failed to bind socket to //var/folders/78/y7tgcc410y34zywtm83dgjt80000gn/T/podman/qmp_podman-machine-default.sock: No such file or directory Error: dial unix /var/folders/78/y7tgcc410y34zywtm83dgjt80000gn/T/podman/podman-machine-default_ready.sock: connect: no such file or directory
Describe the results you expected:
VM should start
Additional information you deem important (e.g. issue happens only occasionally):
Same behaviour creating a VM with another name
Output of
podman version
:Without any VM started,
podman version
does not work, butpodman --version
doesAfter initialising a new VM:
Output of
podman info --debug
:It does not work without a started VM. After starting a new one:
Package info (e.g. output of
rpm -q podman
orapt list podman
):Installed on MacOS Big Sur with
brew
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
macOS Big Sur 11.4
Logging out an in again, I can start the VM as expected. So it seems to be related to the reboot.
I also tried to stop the VM before rebooting but it didn't help.
The text was updated successfully, but these errors were encountered: