Podman 4.3 on Artix Linux: Fix initialization issues

created
( modified )
@nabbisen

Summary

It is not so difficult to install Podman on Artix Linux, based on Arch Linux and systemd-free. It’s because pacman brings key 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

Issued and Solutions

* doas (OpenDoas) can be replaced with sudo.

system migrate warned 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-1

Total Download Size:   15.06 MiB
Total 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 file
Image 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

It will be fixed in 4.4.

Let timedatectl executable placed in you $PATH… somehow now 😅

My way was to:

  1. Create a Cargo project named “timedatectl”.
  2. Write Rust code to just print my time zone (with input parameters ignored).
    fn main() {
        println!("Asia/Tokyo");
    }
    
  3. Built it and placed in $PATH, actually /usr/local/bin.

Conclusion

podman machine init must be successful like below !!!

Extracting compressed file
Image resized.
Machine init complete
To 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 containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command: 

	podman machine set --rootful

API forwarding listening on: /home/(...)/.local/share/containers/podman/machine/podman-machine-default/podman.sock
You can connect Docker API clients by setting DOCKER_HOST using the
following 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.

Series

Podman containers
  1. Podman 4.3 on Windows 10: Install
  2. Podman 4.3 on Artix Linux: Install
  3. Podman 4.3 on Artix Linux: Fix initialization issues

Comments or feedbacks are welcomed and appreciated.