Hello everyone,
I’m using MaaS 3.5.2 and facing issues deploying custom images.
This setup worked fine a few weeks ago, but now it no longer does.
I’m generating a QEMU image using this repository: kubernetes-sigs/image-builder.
After generating the image, I convert it using the following process:
QEMU_IMAGE_FILE=images/capi/output/ubuntu-2204-efi-kube-$K8S_VERSION/ubuntu-2204-efi-kube-$K8S_VERSION
TMP_DIR=$(mktemp -d /tmp/packer-maas-XXXX)
echo 'Binding Packer qcow2 image output to NBD...'
modprobe nbd
qemu-nbd -d /dev/nbd4
qemu-nbd -c /dev/nbd4 -n $QEMU_IMAGE_FILE
echo 'Waiting for partitions to be created...'
tries=0
while [ ! -e /dev/nbd4p2 -a $tries -lt 60 ]; do
sleep 1
let tries++
done
if [[ $tries -gt 60 ]]; then
echo "Partition /dev/nbd4p1 cannot be mounted. Stopping here!"
exit 2
fi
echo "Mounting image..."
mount /dev/nbd4p2 $TMP_DIR
mount "/dev/nbd4p1" "$TMP_DIR/boot/efi"
echo 'Creating a tar archive of the image...'
tar -Sczpf $IMAGE_NAME.tar.gz --acls --selinux --xattrs -C $TMP_DIR .
echo 'Unmounting image...'
umount "$TMP_DIR/boot/efi"
umount $TMP_DIR
qemu-nbd -d /dev/nbd4
rmdir $TMP_DIR
However, when I attempt to deploy the image, I encounter a GRUB error
The install log are available here: Logs
Default MaaS images work fine, including custom images built using canonical/packer-maas.
Does anyone have any ideas on what might be causing this issue?
Thanks in advance!