vm_image_util: produce qcow2 images for Scaleway

For importing Scaleway images, extension needs to be '.qcow2'

See: https://www.scaleway.com/en/docs/compute/instances/how-to/snapshot-import-export-feature/
> Make sure that the QCOW / QCOW2 image file you want to import,
> uses the file extension .qcow or .qcow2 to avoid issues while importing the image.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2024-04-24 10:56:54 +02:00
parent 5c2a8cf8b9
commit 9f02c8d262
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
2 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,7 @@ compress_disk_images() {
# We want to compress images, but we also want to remove the uncompressed files # We want to compress images, but we also want to remove the uncompressed files
# from the list of uploadable files. # from the list of uploadable files.
for filename in "${local_files_to_evaluate[@]}"; do for filename in "${local_files_to_evaluate[@]}"; do
if [[ "${filename}" =~ \.(img|bin|vdi|vhd|vhdx|vmdk)$ ]]; then if [[ "${filename}" =~ \.(img|bin|vdi|vhd|vhdx|vmdk|qcow[2]?)$ ]]; then
# Parse the formats as an array. This will yield an extra empty # Parse the formats as an array. This will yield an extra empty
# array element at the end. # array element at the end.
readarray -td, FORMATS<<<"${FLAGS_image_compression_formats}," readarray -td, FORMATS<<<"${FLAGS_image_compression_formats},"

View File

@ -313,6 +313,7 @@ IMG_scaleway_DISK_LAYOUT=vm
IMG_scaleway_OEM_PACKAGE=common-oem-files IMG_scaleway_OEM_PACKAGE=common-oem-files
IMG_scaleway_OEM_USE=scaleway IMG_scaleway_OEM_USE=scaleway
IMG_scaleway_OEM_SYSEXT=oem-scaleway IMG_scaleway_OEM_SYSEXT=oem-scaleway
IMG_scaleway_DISK_EXTENSION=qcow2
########################################################### ###########################################################