Centos fails to boot

hi ,

Having issues in booting a customized centos7.8 LXD VM . Any help is most appreciated.

steps followed as follows -

LXD version 4.13
Distribution - Ubuntu 20.04.2

1.)installed distrobuilder 1.2
2.)distrobuilder build-lxd centos.yaml --vm -o image.architecture=x86_64 -o image.release=7.8.2003
3.) 2 files gets created ( disk.qcow2 and lxd.tar.xz )
4.) lxc image import lxd.tar.xz disk.qcow2 --alias centos7-8-2003
5.) lxc launch centos7-8-2003 testing1 -p profile1.

the lxc list shows the instance running as VM however it does not boot. Tried changing to boot from the QEMU disk as well via boot Manager.

Does our own image work?

lxc launch images:centos/7 centos -p profile1 --vm

What does lxc console testing1 show on startup?

Hi , Yes the centos/7 image works fine…

the issue is with the new image.

the EFI partition in disk.qcow2 seems empty.

Can you show a diff between our YAML and your YAML so we have some idea of what may be different?

Hi , i did check that … both yamls are exactly the same

Hmm, okay, that’s odd.
In our case, we build the images using Ubuntu 18.04 for the system running distrobuilder and you can see the full log here: https://jenkins.linuxcontainers.org/job/image-centos/architecture=amd64,release=7,variant=default/1106/consoleFull

Ok , as mentioned the EFI boot partition is empty, it does not have the efi directory , boot kernel files in it etc etc … the 2nd partion linux filesystem has the folder structure … mounted the qcow2 as raw f/s. it seems like distrobuilder command line ( as per the initial email ) does not create the boot partitions on it…any hint at what stage that gets created and how do i resolve it… i am comparing/mounted both qcow2 images but no clue to recover the issue image.jenkins is creating the default 7.9 however the one which fails is for 7.8

Normally distrobuilder would mount the EFI partition at /boot/EFI inside of the chroot and then when grub is installed and run, it’d create what’s needed.

I suspect your issue is that we have a bunch of sections in the YAML which are version specific and configured to trigger on release 7. As you’re passing 7.8.2003 as your version, none of those will trigger, which may include the one setting up grub.

Ok, will replacing release=7 with 7.8.2003 in YAML help ? how do we use this YAML for specific releases and not default.

Yeah, either replacing the 7 in the various conditions with 7.8.2003 or just add 7.8.2003 to those lists alongside 7.

getting the below issue for both 7 and 7.8 ( even tried only 7 with the fresh YAML download. ).: line 3: systemd-machine-id-setup: command not found
Error: Failed to run post-unpack: exit status 127

Sounds like you’re hitting an issue with the package list or something?
This error indicates missing systemd in the generated image.