osbuild / bootc-image-builder

A container for deploying bootable container images.
https://osbuild.org
Apache License 2.0
115 stars 50 forks source link

ability to create raw images for vfkit #99

Closed cdrage closed 7 months ago

cdrage commented 8 months ago

I'd like to be able to create a raw image for me to use with vfkit.

Right now I have to do the following:

#!/bin/sh

set -exu

BOOTC_IMG_PATH=$1
qemu-img convert -f qcow2 -O raw ${BOOTC_IMG_PATH} bootc-overlay.img

#cp -c bootc-overlay.img snapshopt.img

./out/vfkit --cpus 2 --memory 2048 \
    --bootloader efi,variable-store=./efi-variable-store,create \
    --device virtio-blk,path=bootc-overlay.img \
    --device virtio-serial,stdio \
    --device virtio-net,nat,mac=72:20:43:d4:38:62 \
    --device virtio-rng \
    --device virtio-input,keyboard \
    --device virtio-input,pointing \
    --device virtio-gpu,width=1920,height=1080 \
    --gui

It would be nice to be able to run the raw image directly rather than having to convert the qcow2 after.

cdrage commented 8 months ago

Thanks to @cfergeau for the script by the way!

mvo5 commented 8 months ago

I opened https://github.com/osbuild/bootc-image-builder/pull/100 - let's see.

cdrage commented 7 months ago

Closed via https://github.com/osbuild/bootc-image-builder/pull/100