I’m having an issue deploying a machine with a custom image. The image is based on Ubuntu 22 and I’ve gone through the README in packer-maas to build the image with a particular kernel version. (I am specifically following the instructions to create a shell script to install the kernel and also writing the name of the kernel in /curtin/CUSTOM_KERNEL).
If I deploy the machine with OS set to Ubuntu and Release set to my image name, I get an error saying Error: Action failed for 1 machine. Alternatively if I set the OS to Custom, the OS fails to boot. There is an error message on the console saying Loading http://<maas.ip>:5248/images/custom/amd64/ga-22.04/ubuntu-custom/no-such-image/boot-kernel…failed: No such file or directory.
Nope. Could you extract the rackd logs when you try to deploy such image?
When you deploy the machine an ephemeral Ubuntu image should be loaded and then after a while it will fetch the image to deploy, but in your case it seems it already fails to load the ephemeral image for some reasons
I tried to boot the server with a custom kernel version again, and somehow without any changes it is able to. But the kernel version is not correct, it is using the latest version of the kernel and is not the one I want.
I’ve been reading the code for packer-maas, specifically ubuntu-cloudimg.pkr.hcl and install-custom-kernel.sh, and I found that perhaps my arguments to packer were wrong. So instead of