Issues creating Alma image on an Ubuntu


I apologize if I am a bit naive I am fairly new to Linux Server Administration and LXD containers. We have a Ubuntu 20.04 host with LXD version 5.20 where we installed distrobuilder using snap

      sudo snap install distrobuilder --classic

I obtained the Alma Linux yaml file from: lxc-ci/images/almalinux.yaml at main · lxc/lxc-ci · GitHub

When I run the following:

sudo distrobuilder build-lxd almalinux.yaml -o image.architecture=x86_64 -o image.release=8

It fails at systemctl enable network with the following:

    Failed to enable unit, unit network.service does not exist.
    Error:  Failed to run post-files: exit status 1

Am I missing an option or a package? Thanks for any help provided.


I tried the command and it worked for me.

$ sudo distrobuilder build-incus almalinux.yaml -o image.architecture=x86_64 -o image.release=8
+ systemctl enable network
network.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable network

The notable difference is that I used the action build-incus instead.
Can you try with build-incus to make sure that at least it works in that way on your specific system?

I know incus is an open source alternative to LXD. We have not tried incus yet and we will most likely try it next month.

The image will work with LXD? Another words incus framework isn’t that much different from LXD?

I have tried the image with Incus and it works.

$ incus image import incus.tar.xz rootfs.squashfs --alias AlmaLinux
Image imported with fingerprint: dd8124a1393ded17460d41a9d3fc68efc9998e5fa16469bc02cee70f94dfe1c1
$ incus launch AlmaLinux alma
Launching alma
$ incus shell alma
[root@alma ~]# cat /etc/redhat-release 
AlmaLinux release 8.9 (Midnight Oncilla)
[root@alma ~]# 

I do not know whether it will work outside of Incus. There are no significant differences between the two.