Upload doesn't fail if qcow2 image exceeds 960MB limit
I'm experimenting with a custom bootc image that is getting a bit too big, and noticed this warning while uploading:
image must be smaller than 960 MB (rescue system root disk) for qcow2 run-id="<redacted>" maximum-size=960 actual-size=1018
The upload nevertheless continues, which I believe it shouldn't.
The 960 MB are a guesstimate from my side, there is no guarantee that the ramdisk has this size, it may be bigger or smaller in the future. Considering this, I did not want to make the validation fatal, and give the user the option to abort or continue.
I see, thanks. In my case the upload finishes successfully and the node boots fine.
Just to be sure, does this mean that the image was fully uploaded and not corrupted/truncated in any way?
I would expect an error to happen if the file could not be copied fully to the disk first.
Maybe I failed to do the conversion between bytes, megabytes, mebibytes and what not correctly.
I also had problems with size. Fedora CoreOS is ~10GB uncompressed.
For now I manually used the rescue system with following command:
wget -O - https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/42.20250803.3.0/x86_64/fedora-coreos-42.20250803.3.0-hetzner.x86_64.raw.xz | xz -d -c | dd of=/dev/sda bs=10M status=progress
This writes the image directly to disk without using the disk. Maybe it could be integrated in hcloud-upload-image?
.raw.xz are already streamed to the disk, pretty much in the same way that you suggested. See this test case here on the exact command: https://github.com/apricote/hcloud-upload-image/blob/b9af8855d5c0c1e40ddfaa670296731b2ed0c53e/hcloudimages/client_test.go#L44-L49
What error did you see?
There was no error. In the Hetzner Console was the state that the snapshot is being created, but the progress never reported more than 0%.
That is not related to hcloud-upload-image then, but a problem in the backend.