16

I'm trying to set up Ubuntu 20.04 on Oracle VirtualBox 6.1.6. During the installation, I got the following error message:

The installer encountered an error copying files to the hard disk:

[Errno 5] Input/output error

This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk.  
It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed,   
to clean the CD/DVD drive lens (cleaning kits are often available from  
electronics suppliers), to check whether the hard disk is old and in   
need of replacement, or to move the system to a cooler environment.

I downloaded the file from the official Ubuntu website and multiple times, but none of the files works. I also verified the iso using echo "e5b72e9cfe20988991c9cd87bde43c0b691e3b67b01f76d23f8150615883ce11 *ubuntu-20.04-desktop-amd64.iso" | shasum -a 256 --check, but it doesn't do anything.

5
  • This is a problem with the installation media or your disk you are installing to. Most likely a hardware issue. Maybe not enough space on a virtual disk.
    – Pilot6
    May 14, 2020 at 9:22
  • @Pilot6 space can't be an issue. The disk is 80 GB big.
    – Simon
    May 14, 2020 at 14:27
  • Personally I think this is a bug in VirtualBox, I have Hyper-V enabled (since I need it), and in Hyper-V same iso image installs perfectly fine. Lubuntu 18/20 also works fine in VBox, but vanilla Ubuntu 18/20 do not install properly.
    – dev101
    Jul 24, 2020 at 9:16
  • I agree, bug in Virtualbox 6.1.12. Using VMWare 15.5.6, the Ubuntu 20.04 iso installs and then runs perfectly
    – jradxl
    Jul 25, 2020 at 17:29
  • I had exact same problem but on Ubuntu. I had Ubuntu 20 host machine with VirtulBox 6.1.32 and I wanted to install another Ubuntu 20 on my virtual machine (don't ask why - work issues). I had same '[Errno 5] Input/output error'. I could not solve the problem but I found a workaround satisfactory for me. I installed Linux Mint 20 instead of Ubuntu. Surprisingly I had no problems with Linux Mint ISO. Mint is basically same Ubuntu but with another UI interface (which is much prettier as well).
    – mc.dev
    Feb 4 at 8:12

5 Answers 5

24

I had this issue as well after I had enabed hyper-v on windows 10.

To fix it I, made sure I disabled hyper-v by doing the following.

  1. Open 'Turn Windows features on or off' (search for that in the start menu)
  2. Untick hyper-v, Windows hypervisior platform and virtual machine platform.
  3. Start the command prompt as an administrator. (type cmd in the start menu, right click 'command prompt' and select 'run as administrator')
  4. Run the following command bcdedit /set hypervisorlaunchtype off

After a restart it seemed to install and work.

Credit to u/SquareVehicle on r/virtualbox who suggested the bcdedit command

7
  • 1
    I had the same issue with Windows 10 2004 update and VirtualBox 6.1, and Docker Desktop.In my case, Hyper-V was not enabled in the Windows Features, probably because I had chosen WSL2 and not Hyper-V when installing Docker Desktop. The bcdedit /set hypervisorlaunchtype off followed by a reboot solved the issue, but at the cost of Docker Desktop not been able to start anymore. Thanks a lot.
    – Frant
    May 30, 2020 at 2:10
  • Thanks for this! I had the same issue but was able to proceed further with the installation , but everytime I did sudo apt update it kept giving me a Hash mismatch error and didn't allow me to install anything further. This fix solved it !
    – Abhilash
    Jun 16, 2020 at 18:05
  • 1
    This is the solution for a problem that seems to be related to the attempted dual use of Windows Subsystem for Linux2 and VirtualBox -- a common situation in summer 2020. K/Ubuntu error msgs are misleading & need repair. Until then, this will be a very common TOTAL failure mode for anyone trying to compare K/Ubuntu in VirtualBox and WSL2. The correct diagnosis & solution deserve top billing IN BOLD CAPS with every copy of the iso. The dozens of useless solutions on the web that follow the misdirection of the erroneous warning should be flagged through comments, one at a time, I guess. Jun 25, 2020 at 16:10
  • I have exactly the same issue as Frant. Jul 3, 2020 at 20:33
  • 1
    I need Hyper-V, so I can't just disable it. This is not a proper solution to the problem at all. I believe this is a bug in VirtualBox 6, since they introduced support to run under Hyper-V enabled environment.
    – dev101
    Jul 24, 2020 at 9:17
3

I faced the same issue. I used VirtualBox 6.1.14 and tried to install Ubuntu 20.04. The issue disappeared when I updated VirtualBox to the 6.1.16 version.

1
  • +1 for the tip to upgrade to 6.1.16. Strangely it asked for permission to use my microphone, to which I agreed. I can now get past the issue, and can get on with the install.
    – Nina Nolle
    Oct 27, 2020 at 2:14
0

The second line of your code reminds me of the follwing:

Ubuntu 20.04 install media (.iso) normally checks itself at boot, unless you type a command to abort this health-check behaviour.

If what you typed came up at this point (I never experienced it myself), my guess is that your .iso might be corrupted. You can hash-check it yourself against the web-stated unique number to see if it is healthy.

Good practice is to download .iso's with bittorrent, because that way the integrity gets automatically checked when ready; also little easier.

0

This might be unusual, however my problem was fixed by enabling Hyper-V. This was after hours of looking for solutions regarding Ubuntu 20 and Virtualbox 6.1. Tweaked many settings and finally decided to go against the most common advice and turn on Hyper-V (Win10).

-1

You can use VirtualBox 5.2 instead.

I installed VirtualBox 5.2 and then I was able to install Ubuntu 20.04 on my mac. I had the same issue with VirtualBox 6.1.

Not the answer you're looking for? Browse other questions tagged or ask your own question.