Reputation: 81
UPDATE: I managed to fix this by enabling wsl2 with this command
wsl --set-default-version 2
After running podman-v4.1.0.msi and running the podman machine init command in power shell i get this:
Copr repo for podman4 owned by rhcontainerbot 12 kB/s | 1.0 kB 00:00
Importing GPG key 0x2F6C3CBA:
Userid : "rhcontainerbot_podman4 (None) <rhcontainerbot#[email protected]>"
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)?
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): locking protocol
After running for a while I finally get this:
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-35-x86_64
Public key for systemd-pam-249.12-3.fc35.x86_64.rpm is not installed. Failing package is: systemd-pam-249.12-3.fc35.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-35-x86_64
Public key for systemd-resolved-249.12-3.fc35.x86_64.rpm is not installed. Failing package is: systemd-resolved-249.12-3.fc35.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-35-x86_64
Public key for util-linux-2.37.4-1.fc35.x86_64.rpm is not installed. Failing package is: util-linux-2.37.4-1.fc35.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-35-x86_64
Public key for util-linux-core-2.37.4-1.fc35.x86_64.rpm is not installed. Failing package is: util-linux-core-2.37.4-1.fc35.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-35-x86_64
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED
Error: package installation on guest OS failed: exit status 1
Trying to start podman I get this:
bin/bash: line 1: /root/bootstrap: No such file or directory
Error: WSL bootstrap script failed: exit status 127
It installs the other stuff before this but seems to have trouble towards the end.
podman machine list gives this output:
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default* wsl 38 minutes ago 38 minutes ago 12 17.13GB 0B
Podman Version 4.1.0
Windows Build 21H2 19044.1706
Upvotes: 8
Views: 15487
Reputation: 86
podman machine init
fails and further attempts get broken even more in case you have your C:\Users\<username>\.ssh
directory linked to a different location (like cygwin ~/.ssh
).
The fix:
wsl --unregister podman-machine-default
podman machine init
.ssh
symlinksWindows Event Viewer may have information about why your podman is not working as expected.
Upvotes: 2
Reputation: 3819
At the 1st time please run the podman desktop as the administrator mode.
Upvotes: 1
Reputation: 31
Maybe Hyper-V is not enabled yet.
Open run dialog: Press "Window + R". Type "appwiz.cpl" and enter. Click "Turn Window features on or off". Looking to "Hyper-V" and turn it on.
Then run these command to try again:
"podman machine rm"
"podman machine init".
Good luck.
Upvotes: 3
Reputation: 313
It started to work after making WSL2 the default.
wsl --set-default-version 2
Upvotes: 5