apricote / hcloud-upload-image

Quickly upload any raw disk images into your Hetzner Cloud projects!
MIT License
21 stars 2 forks source link

feat: upload qcow2 images #44

Open johanneskastl opened 1 month ago

johanneskastl commented 1 month 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 1 month 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 1 month 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

apricote commented 2 weeks ago

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

That was only included in the --help output. I now added the help output directly to the repository to make it easier to learn about the options: https://github.com/apricote/hcloud-upload-image/blob/main/docs/cli/hcloud-upload-image_upload.md

I'll keep this issue open, to track its progress?

Sounds good. I will update the title :)