podman: Podman machine init fails on Windows (v4.0.3 & v4.1.0)
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman machine init fails to execute successfully and instead loops through infinite iterations of:
error: cannot open Packages index using sqlite - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): locking protocol
Just before the loop starts, the below logs appear:
Copr repo for podman4 owned by rhcontainerbot 11 kB/s | 1.0 kB 00:00
Importing GPG key 0x2F6C3CBA:
Userid : "rhcontainerbot_podman4 (None) <rhcontainerbot#podman4@copr.fedorahosted.org>"
Fingerprint: 79B5 022D 580F B1D6 B527 CB83 3BB2 485A 2F6C 3CBA
From : https://download.copr.fedorainfracloud.org/results/rhcontainerbot/podman4/pubkey.gpg
Key imported successfully
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): locking protocol
error: cannot open Packages index using sqlite - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
Import of key(s) didn't help, wrong key(s)?
Steps to reproduce the issue: Windows 10 19044.1682 + WSL2
- Run
podman machine init
Describe the results you received:
Infinite loop of error messages
Describe the results you expected:
Podman machine inits.
Additional information you deem important (e.g. issue happens only occasionally):
Tested across two versions of Podman v4.1.0 and v4.0.3
Output of podman version:
podman.exe version 4.0.3
Output of podman info --debug:
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: failed to parse identity "C:\\Users\\aled.lewis\\.ssh\\podman-machine-default": open C:\Users\aled.lewis\.ssh\podman-machine-default: The system cannot find the path specified.
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)
Yes
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (8 by maintainers)
It started to work after making WSL2 the default.
wsl --set-default-version 2
@sereneshikari cool that explains it then. Try the following:
You might have to run this after shutting down WSL: wsl --set-default-version 2