How to create custom WSL2 images: KIWI ? mkosi?

Hi
I would like to create custom Fedora WSL2 images. (I know I could get them from Docker, Cloud images or what not.)
I tried mkosi, then Kiwi without success. I am wondering what you are using.
Thanks

I wonder if you could use buildah to create an image for this?

I succeeded using mkosi and it was super simple (once you use the right packages).
Example here: bve-PC / mkosi-tests · GitLab

@gundersanne @obudai is the on-prem image builder in Fedora able to generate WSL images as well? It’s listed as a type, but I’ve not tried it myself with Fedora, only RHEL.

$ composer-cli compose types 
ami
container
image-installer
iot-commit
iot-container
iot-installer
iot-qcow2-image
iot-raw-image
iot-simplified-installer
live-installer
minimal-raw
oci
openstack
ova
qcow2
vhd
vmdk
wsl

This is all you need on Fedora to build an up-to-date WSL image:

sudo dnf install -y image-builder
sudo image-builder build wsl

Alternatively, you can use the new image-builder container image:

mkdir output
sudo podman run --rm --pull=newer --privileged -v ./output:/output ghcr.io/osbuild/image-builder-cli build --distro fedora-41 wsl

How can I customize this WSL image?
I guess documentation for image-builder is here GitHub - osbuild/image-builder-cli: Building operating system artifacts (disk images, ISOs, etc.)
But it is not mentioned in Introduction to image builder - Fedora Magazine or https://osbuild.org/
And I had issues with osbuilder (compared to mkosi) .