chore: wget instead of curl for image download

Older XCP-ng versions might run curl version that does not co-operate
with newer ciphers. Use wget instead for same end result
This commit is contained in:
Roni Väyrynen
2026-10-06 14:56:05 +03:00
parent 3c2a24b50c
commit 7254ccea98

View File

@@ -152,9 +152,9 @@ function VMImport {
# Import image. We pipe through zcat because xe vm-import should transparently decompress gzipped image, but doesn't seem to understand when stream ends when piped through curl/wget whatnot. # Import image. We pipe through zcat because xe vm-import should transparently decompress gzipped image, but doesn't seem to understand when stream ends when piped through curl/wget whatnot.
# if SR was not defined, we leave that parameter out # if SR was not defined, we leave that parameter out
if [[ $sruuid == "default" ]]; then if [[ $sruuid == "default" ]]; then
uuid=$(curl "$IMAGE_URL" | zcat | xe vm-import filename=/dev/stdin) uuid=$(wget -O- "$IMAGE_URL" | zcat | xe vm-import filename=/dev/stdin)
else else
uuid=$(curl "$IMAGE_URL" | zcat | xe vm-import filename=/dev/stdin sr-uuid="$sruuid") uuid=$(wget -O- "$IMAGE_URL" | zcat | xe vm-import filename=/dev/stdin sr-uuid="$sruuid")
fi fi
# exit if import failed for any reason # exit if import failed for any reason