Building azure images with mkosi
nix w/ flakes support (https://nixos.org/nix/)
nix develop
mkosi genkey
mkosi -C ./initrd build
mkosi build
Use root for KVM acceleration
sudo $(which mkosi) qemu
openssl x509 -in mkosi.crt -out additionalsignature.der -outform DER
base64 -w0 additionalsignature.der
Populate the uplosi.conf
values according to the image gallery and image definition. Put the base64 encoded certificate string into the additionalSignatures
list.
Note: The image definition has to support trusted launch.
uplosi upload image.raw
cd launch-vm
go mod tidy
go build
./launch-vm -h