Support BitTorrent as an ISO download method
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
#### Description
When building images from ISO files, Packer currently supports downloading via HTTP/HTTPS. For large ISO images, this can be slow and unreliable, especially when mirrors are under heavy load or geographically distant.
Adding BitTorrent as a supported download method would bring several benefits: faster downloads by pulling from multiple peers simultaneously, built-in integrity verification through piece hashing, reduced load on ISO mirror infrastructure, and automatic resilience to individual seed failures.
#### Use Cases
1. Large ISO images can be slow to download over HTTP, especially from distant or bandwidth-limited mirrors. BitTorrent would reduce download times by pulling from multiple peers simultaneously.
2. Mirror servers often become unreliable under heavy load, such as shortly after a new distribution release, causing downloads to stall or fail. BitTorrent is inherently resilient to this, as it does not depend on a single source.
3. Many Linux distribution maintainers actively encourage downloading via BitTorrent and provide torrent files or magnet links alongside HTTP mirrors. Supporting this in Packer would let users follow the recommended distribution method while reducing pressure on volunteer-run mirror infrastructure.
#### Potential configuration
Packer could support ".torrent" URIs:
```hcl
source "qemu" "example" {
iso_url = "https://releases.ubuntu.com/24.04/ubuntu-24.04.4-desktop-amd64.iso.torrent"
iso_checksum = "sha256:123456..."
}
```
And maybe magnet URIs directly:
```hcl
source "qemu" "example" {
iso_url = "magnet:?xt=urn:btih:abc123..."
iso_checksum = "sha256:123456..."
}
```
Contributor guide
Assessment
This issue has not been assessed yet.