Podman 4.3 on Artix Linux: Fix initialization issues
- Infrastructure and operations
- Published
- 4 min read
- @nabbisen
Table of contents
Summary Summary
It is not so difficult to install Podman (opens in a new tab) on Artix Linux (opens in a new tab), based on Arch Linux (opens in a new tab) and systemd (opens in a new tab)-free.
It’s because pacman (opens in a new tab) brings key packages: podman and qemu-base of QEMU (opens in a new tab).
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 Environment
- OS: Artix Linux (based on Arch Linux) where I chose OpenRC (opens in a new tab) as init system (opens in a new tab)
- Virtualization: Podman 4.3.1 (opens in a new tab)
Issued and Solutions Issued and Solutions
* doas (opens in a new tab) (OpenDoas (opens in a new tab)) can be replaced with sudo (opens in a new tab).
system migrate warned due to lack of buildah system migrate warned due to lack of buildah
Issue description Issue description
buildah (opens in a new tab) is a “tool that facilitates building OCI images” of Containers (opens in a new tab).
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 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 gvproxy was missing so networking was limited
Issue description 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 Solution
gvproxy is published as gvisor-tap-vsock (opens in a new tab) by Containers in Github (opens in a new tab).
Download the latest version (0.5.0, in my case) from releases (opens in a new tab). 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 timedatectl was missing so .ign, ignition file for vm, was not created
Issue description Issue description
getLocalTimeZone in ignition_linux.go (opens in a new tab) of Podman executes timedatectl (opens in a new tab), 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 Solution
It will be fixed (opens in a new tab) in 4.4.
Let timedatectl executable placed in you $PATH… somehow now 😅
My way was to:
- Create a Cargo project named “timedatectl”.
- Write Rust code to just print my time zone (with input parameters ignored).
rust
fn main() { println!("Asia/Tokyo"); } - Built it and placed in
$PATH, actually/usr/local/bin.
Conclusion 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.
More on: Containers and virtual machines
-
This post shows how to install Docker and run vm on Devuan, a systemd-free fork of Debian.
-
With VirtualBox 7.0, installing OpenBSD 🐡 7.3 as guest on Artix Linux 🐧 as host failed.
-
The post is about how to create a OpenBSD vm with Oracle VM VirtualBox briefly with some screenshots.
Scqr [secureal]
Scqr [secureal]: the engineering practice of Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.