Allow customizable HTTP block size when reading from remote OVA #692
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using a remote OVA source,
urlopen's default is to read 8192 bytes at a time, which is very slow (a simple ~1GB OVA might take tens of hours). This proposal useshttp.clientdirectly to allow setting the block size (10 MB by default, but depending on the actual environment it can be even higher). In my tests, a 10 MB block size resulted in a 80x reduction of download times from a local LAN web server, and a 100 MB block size produced a 500x reduction. Differences might not be so dramatic depending on the actual conditions, but I think we're still much better off with the new default, and anyway it's tweakable if desired.As noted in "upload_ova.py" fails if there is an iso file inside the ova #392, for non-disk objects (like ISO, or NVRAM files)
PUTshould be used instead ofPOST. This proposal also applies the change suggested in that issue.