Informative post about OL8 and OL9 image creation with latest packer-maas

Hi,

The following post denotes some issues I came across when creating OL8 and OL9 images:

Setup details:

maas@maas:~/packer-maas/ol8$ packer --version
Packer v1.10.0

maas@maas:~/packer-maas/ol8$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

maas@maas:~/packer-maas/ol8$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

The procedure followed (as per https://github.com/canonical/packer-maas/tree/main/ol8 https://github.com/canonical/packer-maas/tree/main/ol9 ):

maas@maas:~/packer-maas/ol8$ make

_current_deps := libnbd-bin nbdkit packer fuse2fs
make: _current_deps: No such file or directory
make: *** [Makefile:15: check-deps] Error 127

Couldn’t solve this one but i guess we are missing some file /function for dependency checks.

Trying with packer method:

packer init .
PACKER_LOG_PATH="packerlog.txt" PACKER_LOG=1 packer build .

First “error” the default .ks file in repo on the folder http is named ol8.ks.in and therefore it doesn’t find it, so it is just a matter of renaming the file to ol8.ks.

Next it doesn’t work because it doesn’t find the ${KS_PROXY} variable. In my case i didn’t need a proxy so i just removed it from the kickstart file but it should be handled more gracefully i think.

After this the image was created successfully for both OL8 and OL9.

As a final step the command to upload the image to MaaS should be changed from name=‘ol/8.8’ which to a custom distro like for instance name=‘custom/ol-8.8’ otherwise it will throw the error “{“name”: [“Unsupport operating system ol, supported operating systems: [‘ubuntu’, ‘ubuntu-core’, ‘bootloader’, ‘centos’, ‘rhel’, ‘custom’, ‘windows’, ‘suse’, ‘caringo’, ‘esxi’]”]}”:

maas $PROFILE boot-resources create \
    name='custom/ol-8.8' title='Oracle Linux 8.8' \
    architecture='amd64/generic' filetype='tgz' \
    content@=ol8.tar.gz

The deploy is another story which is failing but I shall open another topic for that.

Thanks !

BR

Hi @jonaspaulo ,

if you faced some issues with packer-maas could you please open a bug on GH?
If you want to send a PR with the fix it would be very much appreciated :slight_smile:

Sure i can also post it there as a bug.
This one was to help if anyone came across the same.
Thanks a lot

First of all thank you very much for reporting this back, much appreciated!

In general if the problems are fixed at the root (in this case packer-maas/README and similar) we would not need additional guides on discourse.

1 Like

Fixed with https://github.com/canonical/packer-maas/commit/42489ebc162d2f6d6d2f2218fb1179fd2df7a91a

Thanks @alexsander-souza

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.