ci-automation/vms: provide Hyper-V images with .zip compression

On Windows, the .bz2 compression format is not supported by native
tooling and external tools like 7zip need to be installed.

Switching to .zip compression, there will be no need for the extra step
of having external tools.

See: https://github.com/flatcar/Flatcar/issues/1009

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
This commit is contained in:
Adrian Vladu 2024-04-11 13:54:18 +03:00
parent 144a0c417a
commit ab2cb0fff3
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1 @@
- Hyper-V images, both .vhd and .vhdx files are available as `zip` compressed, switching from `bzip2` to a built-in available Windows compression - `zip` ([scripts#1878](https://github.com/flatcar/scripts/pull/1878))

View File

@ -136,6 +136,8 @@ function _vm_build_impl() {
COMPRESSION_FORMAT="gz,bz2,none" COMPRESSION_FORMAT="gz,bz2,none"
elif [[ "${format}" =~ ^(qemu|qemu_uefi)$ ]];then elif [[ "${format}" =~ ^(qemu|qemu_uefi)$ ]];then
COMPRESSION_FORMAT="bz2,none" COMPRESSION_FORMAT="bz2,none"
elif [[ "${format}" =~ ^(hyperv|hyperv_vhdx)$ ]];then
COMPRESSION_FORMAT="zip"
fi fi
./run_sdk_container -n "${vms_container}" -C "${packages_image}" \ ./run_sdk_container -n "${vms_container}" -C "${packages_image}" \
-v "${vernum}" \ -v "${vernum}" \