mirror of
https://github.com/apricote/hcloud-upload-image.git
synced 2026-01-13 21:31:03 +00:00
feat: upload qcow2 images
It is now possible to upload qcow2 images directly. These images will be converted to raw disk images directly on the cloud server. In the CLI you can use the new `--format=qcow2` flag to upload qcow2 images. In the library you can set `UploadOptions.ImageFormat` to `FormatQCOW2`. Because of the underlying process, qcow2 images need to be written to a file first. This limits their size to 960 MB at the moment. The CLI automatically checks the file size (if possible) and shows a warning if this limit would be triggered. The library accepts an input with the file size and logs a warning if the limit would be triggered.
This commit is contained in:
parent
021787a9c3
commit
064c91cdc3
5 changed files with 110 additions and 10 deletions
|
|
@ -4,8 +4,19 @@ Upload the specified disk image into your Hetzner Cloud project.
|
|||
|
||||
### Synopsis
|
||||
|
||||
This command implements a fake "upload", by going through a real server and snapshots.
|
||||
This does cost a bit of money for the server.
|
||||
This command implements a fake "upload", by going through a real server and
|
||||
snapshots. This does cost a bit of money for the server.
|
||||
|
||||
#### Image Size
|
||||
|
||||
The image size for raw disk images is only limited by the servers root disk.
|
||||
|
||||
The image size for qcow2 images is limited to the rescue systems root disk.
|
||||
This is currently a memory-backed file system with **960 MB** of space. A qcow2
|
||||
image not be larger than this size, or the process will error. There is a
|
||||
warning being logged if hcloud-upload-image can detect that your file is larger
|
||||
than this size.
|
||||
|
||||
|
||||
```
|
||||
hcloud-upload-image upload (--image-path=<local-path> | --image-url=<url>) --architecture=<x86|arm> [flags]
|
||||
|
|
@ -16,6 +27,7 @@ hcloud-upload-image upload (--image-path=<local-path> | --image-url=<url>) --arc
|
|||
```
|
||||
hcloud-upload-image upload --image-path /home/you/images/custom-linux-image-x86.bz2 --architecture x86 --compression bz2 --description "My super duper custom linux"
|
||||
hcloud-upload-image upload --image-url https://examples.com/image-arm.raw --architecture arm --labels foo=bar,version=latest
|
||||
hcloud-upload-image upload --image-url https://examples.com/image-x86.qcow2 --architecture x86 --format qcow2
|
||||
```
|
||||
|
||||
### Options
|
||||
|
|
@ -24,6 +36,7 @@ hcloud-upload-image upload (--image-path=<local-path> | --image-url=<url>) --arc
|
|||
--architecture string CPU architecture of the disk image [choices: x86, arm]
|
||||
--compression string Type of compression that was used on the disk image [choices: bz2, xz]
|
||||
--description string Description for the resulting image
|
||||
--format string Format of the image. [choices: qcow2]
|
||||
-h, --help help for upload
|
||||
--image-path string Local path to the disk image that should be uploaded
|
||||
--image-url string Remote URL of the disk image that should be uploaded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue