I need to use a debian based distro with firecracker, and I attempt to do something similar to what firecracker docs gave: here.
I attempted to run this distroless image gcr.io/distroless/base-debian10
and install systemd and copy over the files to the mounted rootfs like so:
for d in bin etc lib root sbin usr; do tar c "/$d" | tar x -C /my-rootfs; done
for dir in dev proc run sys var; do mkdir /my-rootfs/${dir}; done
Then changed the API call to add the boot arg init=/bin/systemd
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/boot-source' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d "{
\"kernel_image_path\": \"hello-vmlinux.bin\",
\"boot_args\": \"init=/bin/systemd reboot=k panic=1 pci=off\"
}"
But I get no output when I start the vm and it just closes immediately.
How do I create bootable ext4 images using the minimal debian distroless images?