qcow2 Images
This is implemented by using "qemu-img dd" to convert the image from qcow2 format to a raw disk image and directly writing it to the root disk.
Unfortunately qemu-img requires a seekable source file for this. Raw images are piped directly to the disk, so they can have an arbitrary size, but this requirement for qcow2 images means, that we need to save them on the server first before writing to disk.
The rescue system only has a ramdisk with 960Mi available, so that is the maximum size of qcow2 images that can be uploaded at the moment. The library and CLI tries to validate and give a warning to the user if the image exceeds this size.
It would be feasible to increase the size of the ramdisk or mount a Volume, but I think most users wanted to upload OpenSUSE MicroOS images which easily fit in the 960Mi.
- https://github.com/apricote/hcloud-upload-image/pull/69
- https://apricote.github.io/hcloud-upload-image/reference/cli/hcloud-upload-image_upload.html#image-size