An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
Podman 4.3 on Artix Linux: Fix initialization issues
Summary
It is not so difficult to install Podman on Artix Linux, based on Arch Linux and systemd-free.
It's because pacman brings core packages: podman
and qemu-base
of QEMU.
You can prepare podman by installing them and configure some. }}">After completing them, you can start virtual machine and manage containers ... to a certain extent.
There are issues left, which occurs problems on process handling or networking.
This post shows how to fix them.
Environment
- OS: Artix Linux (based on Arch Linux) where I chose OpenRC as init system
- Virtualization: Podman 4.3.1
Issued and Solutions
* doas
(OpenDoas) can be replaced with sudo
.
system migrate
failed due to lack of buildah
Issue description
buildah is a "tool that facilitates building OCI images" of Containers.
If it is not installed, podman system migrate
will print out the warning:
WARN[0000] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers
In addition, some of the following podman
operations will also print the same warning.
Solution
Install buildah. It's easy to install thanks to pacman:
$ doas pacman -Sy buildah
The output and the interaction were:
:: Synchronizing package databases...(...)resolving dependencies...looking for conflicting packages...Packages (2) skopeo-1.11.0-1 buildah-1.28.2-1Total Download Size: 15.06 MiBTotal Installed Size: 52.21 MiB:: Proceed with installation? [Y/n] y:: Retrieving packages...(...):: Processing package changes...(...)
Run podman system migrate
again. It will not surely print any error or warning.
gvproxy
was missing so networking was limited
Issue description
When starting a virtual machine, it printed gvproxy
was missing and therefore "unable to start host networking".
$ podman machine start
The output was:
Starting machine "podman-machine-default"Error: unable to start host networking: "could not find \"gvproxy\" in one of [/usr/local/libexec/podman /usr/local/lib/podman /usr/libexec/podman /usr/lib/podman]. To resolve this error, set the helper_binaries_dir key in the `[engine]` section of containers.conf to the directory containing your helper binaries."
Solution
gvproxy
is published as gvisor-tap-vsock by Containers in Github.
Download the latest version (0.5.0, in my case) from releases. One for Linux is called gvproxy-linux
.
In your local, rename it to gvproxy
and place it as Podman helper binaries. Where ? The error messages above mentioned the candidates. Also, remember to modify the permissions.
$ doas mv gvproxy-linux /usr/lib/podman/gvproxy$ doas chown root:root /usr/lib/podman/gvproxy$ doas chmod a+x /usr/lib/podman/gvproxy
Besides, you may be able to find the package in pacman repositories or AUR.
timedatectl
was missing so .ign
, ignition file for vm, was not created
Issue description
getLocalTimeZone
in ignition_linux.go
of Podman executes timedatectl
, which is a part of systemd. Therefore, podman machine init
failed with the error:
Extracting compressed fileImage resized.Error: exec: "timedatectl": executable file not found in $PATH
and .ign
, ignition conf, for the default machine was not created.
As a result, podman machine start
failed due to the error:
Starting machine "podman-machine-default"Waiting for VM ...Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-x86_64: -fw_cfg name=opt/com.coreos/config,file=/home/(...)/.config/containers/podman/machine/qemu/podman-machine-default.ign: can't load /home/(...)/.config/containers/podman/machine/qemu/podman-machine-default.ign: Failed to open file /home/(...)/.config/containers/podman/machine/qemu/podman-machine-default.ign: No such file or directory
Solution
Let timedatectl
executable placed in you $PATH... somehow
My way was to:
- Create a Cargo project named "timedatectl".
Write Rust code to just print my time zone (with the options ignored).
fn main() { println!("Asia/Tokyo");}
Built it and placed in
$PATH
, actually/usr/local/bin
.
Conclusion
podman machine init
must be successful like below !!!
Extracting compressed fileImage resized.Machine init completeTo start your machine run: podman machine start
Then run podman machine start
. It will start in rootless mode like a charm
Starting machine "podman-machine-default"Waiting for VM ...Mounting volume... /home/(...):/home/(...)This machine is currently configured in rootless mode. If your containersrequire root permissions (e.g. ports < 1024), or if you run into compatibilityissues with non-podman clients, you can switch using the following command: podman machine set --rootfulAPI forwarding listening on: /home/(...)/.local/share/containers/podman/machine/podman-machine-default/podman.sockYou can connect Docker API clients by setting DOCKER_HOST using thefollowing command in your terminal session: export DOCKER_HOST='unix:///home/(...)/.local/share/containers/podman/machine/podman-machine-default/podman.sock'Machine "podman-machine-default" started successfully
Hope that some of the solutions above might help you enjoy Podman containers and pods.
Original Link: https://dev.to/nabbisen/podman-43-on-artix-linux-fix-initialization-issues-54la
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To