apricote / hcloud-upload-image

MIT License
17 stars 0 forks source link

How to upload images in other formats? #44

Open johanneskastl opened 1 day ago

johanneskastl commented 1 day ago

Hi,

I just found your very nice tool and successfully used it to upload a Flatcar image.

I wanted to try out the openSUSE MicroOS images, but those are only available in formats other than RAW.

https://get.opensuse.org/microos/ => Download => Alternative Downloads

Is there a way to upload e.g. a qcow2 image? Would it be possible to add a feature to support qcow2, maybe by piggy-backing as "compression"?

Or do I need to download the image, convert it manually and then use the local image file? (I guess this does not work, as the image is downloaded into the rescue system from $somewhere, where $somewhere needs to be reachable...)

Kind Regards, Johannes

apricote commented 23 hours ago

Hello,

you can download the image, convert it and then upload it from your local file with the --image-path= flag.

In general it makes sense to add support for other image types, but for simplicity the tools needed to convert the images should already be installed in the rescue environment, not sure if qemu-img is available there right now.

I would add it as a separate thing to compression though, but in the same way that compression is currently handled.

johanneskastl commented 16 hours ago

Hello,

you can download the image, convert it and then upload it from your local file with the --image-path= flag.

Ah, thanks, that's nice. Is this documented and I just missed it? Or is this just visible from the help output?

In general it makes sense to add support for other image types, but for simplicity the tools needed to convert the images should already be installed in the rescue environment, not sure if qemu-img is available there right now.

I would add it as a separate thing to compression though, but in the same way that compression is currently handled.

Yes, that sounds good. IMHO it would be a nice feature. I'll keep this issue open, to track its progress?

Kind Regards, Johannes