Download with 16 aria2c connections by default
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1476b4a3de
commit
4eb26e3a96
1 file changed
+7
-6
+7
-6
@@ -139,8 +139,8 @@ Download one or more shared VM images. With no arguments, all targets are
|
||||
processed. The Debian/AlmaLinux/Fedora/Ubuntu image architecture (arm64 or amd64)
|
||||
is auto-detected from the host; override it with VM_IMAGE_ARCH.
|
||||
|
||||
When aria2c is installed and an image has several mirrors, the image is
|
||||
downloaded from all of them at once, with one connection per mirror.
|
||||
When aria2c is installed, an image is downloaded with 16 connections in total
|
||||
(DOWNLOAD_CONNECTIONS, up to 16), spread across all its mirrors if it has several.
|
||||
Otherwise curl or wget downloads from the mirrors in order.
|
||||
|
||||
The windows11 target is not part of "all". It downloads the Windows 11 ISO for
|
||||
@@ -305,16 +305,17 @@ download_single_source() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Download to $partial with aria2c, splitting the file across all URLs with a
|
||||
# single connection to each server.
|
||||
# Download to $partial with aria2c, splitting the file across all URLs with up
|
||||
# to DOWNLOAD_CONNECTIONS (default 16) connections in total and to each server.
|
||||
download_multi_source() {
|
||||
local partial="$1"
|
||||
shift
|
||||
local connections="${DOWNLOAD_CONNECTIONS:-16}"
|
||||
|
||||
aria2c \
|
||||
--continue=true \
|
||||
--split="$#" \
|
||||
--max-connection-per-server=1 \
|
||||
--split="$connections" \
|
||||
--max-connection-per-server="$connections" \
|
||||
--file-allocation=none \
|
||||
--auto-file-renaming=false \
|
||||
--max-tries=5 \
|
||||
|
||||
Reference in new issue
Block a user