Opened 4 years ago
Closed 4 years ago
#19636 closed defect (duplicate)
VirtualBox 6.1.6 with Hyper-V/Vagrant corrupts downloads
Reported by: | oramirez | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.6 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
Setup:
VirtualBox 6.1.6, Vagrant 2.2.9, Windows 10 with Hyper-V enabled.
Steps to reproduce:
- vagrant init bento/ubuntu-18.04
- vagrant up; vagrant ssh
Inside VM:
- wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb (REPEAT 3 TIMES)
- sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb; sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1; sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2
Every time you get a different hash! This does not happen if VM is run directly in Hyper-V, without VirtualBox (vagrant up --provider=hyperv)
Example:
vagrant@vagrant:~$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb --2020-06-02 11:14:27-- https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb Resolving download.docker.com (download.docker.com)... 143.204.89.33, 143.204.89.126, 143.204.89.23, ... Connecting to download.docker.com (download.docker.com)|143.204.89.33|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 22527110 (21M) [binary/octet-stream] Saving to: ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb’
docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb 100%[=================================================================================================================================================>] 21.48M 21.3MB/s in 1.0s
2020-06-02 11:14:28 (21.3 MB/s) - ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb’ saved [22527110/22527110]
vagrant@vagrant:~$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb --2020-06-02 11:14:29-- https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb Resolving download.docker.com (download.docker.com)... 143.204.89.33, 143.204.89.126, 143.204.89.23, ... Connecting to download.docker.com (download.docker.com)|143.204.89.33|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 22527110 (21M) [binary/octet-stream] Saving to: ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1’
docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1 100%[=================================================================================================================================================>] 21.48M 15.8MB/s in 1.4s
2020-06-02 11:14:31 (15.8 MB/s) - ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1’ saved [22527110/22527110]
vagrant@vagrant:~$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb --2020-06-02 11:14:32-- https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb Resolving download.docker.com (download.docker.com)... 143.204.89.33, 143.204.89.126, 143.204.89.23, ... Connecting to download.docker.com (download.docker.com)|143.204.89.33|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 22527110 (21M) [binary/octet-stream] Saving to: ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2’
docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2 100%[=================================================================================================================================================>] 21.48M 31.7MB/s in 0.7s
2020-06-02 11:14:33 (31.7 MB/s) - ‘docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2’ saved [22527110/22527110]
vagrant@vagrant:~$ sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb e06fcfa124ea5837e3158a5e7306f5a54fe1d9e7ec29ad3452ad30c09db12ce2 docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb
vagrant@vagrant:~$ sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1 49b6f9c8635c97495c188773e6fbbd8f95975d0b2fde2e9553c0e01dd5f41d38 docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.1
vagrant@vagrant:~$ sha256sum docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2 2c2fc494701ce0f530bfd1c2eb87eb27800606400936589e8202854161f2bb3c docker-ce_19.03.11~3-0~ubuntu-bionic_amd64.deb.2
Change History (4)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
FYI: I try to install Linux Mint on VirtualBox but get CD-ROM I/O error everytime. After fixing this, I can install it successfully. Maybe they are related?
comment:3 by , 4 years ago
I am encountering the same issue with the same Hyper-V/Vagrant setup. Same symptoms looks like the same as those kbridge is encountering: when the files are downloaded, they're all the same size as the correct file, but tar can't open them up. (The files in question on my machine are not zips, they are tarballs.)
Interestingly, tar is not random-access like zip, and so tar can open them up *part* of the way, until it encounters the erroneous bytes. This agrees with kbridge's diagnosis as well.
One interesting thing is that no matter how many times i download the file, it can only unpack the same files, the first few documentation files in my case. However, that doesn't mean that the corrupt files are all the same, as every time I download the file, the sha256sum of each file download is different, and all of them different from the sha256sum of the original file.
Version informatoin:
Windows 10 build 2004, OS build 19041.450
Vagrant version 2.2.9
VirtualBox Version 6.1.12 r139181 (Qt5.6.2)
I encounter the same problem today.
This bug won't show if you download via HTTP, not HTTPS.
(Related: https://www.virtualbox.org/ticket/19532)
I write a small tool to compare the corrupted file with the correct one byte by byte, and find that every time there is 2 to 3 bytes differ while theirs sizes are all the same.
Note that not turning off Hyper-V completely can cause this problem too. (my case)
VMware Workstation Player can detect this but VirtualBox(at least v6.1.8) can't.
To turn off it completely:
bcdedit /set hypervisorlaunchtype off