r/virtualbox • • Apr 24 '20

Help How do I fix error when installing Ubuntu on virtualbox?

I am running Virtualbox 6.16 on windows 10. I have been trying to install Ubuntu for a couple of weeks from several isos. I can boot into the install program, but it always fails at some point. I get an error which doesn't make sense.

The error Ubuntu gave was:

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 ...

Specifics:

Win10(2004, build 19041.208)

Ubuntu Versions (20.04, 19.10, 18.04)

The isos works on live machines.

18 Upvotes

31 comments sorted by

3

u/SquareVehicle Apr 26 '20

FWIW I'm getting the exact same error. Using VirtualBox 6.1.6 and Ubuntu 20.04. Verified the checksum is correct for the ISO.

I notice during the initial install disk check it does say "errors found in 1 files", which doesn't make sense since the SHA256 checksum is correct and I'm reading the .iso directly from the harddrive since it's a virtual machine. Tried downloading the ISO several different times with the same result.

My theory is maybe there's a bug in VirtualBox? I should see if I can find an older version to install.

3

u/SquareVehicle Apr 26 '20 edited Sep 22 '20

LOL I knew writing out a comment would mean I would figure it out 5 minutes later. I fixed the "errors found in 1 files" Ubuntu Linux installer error in VirtualBox by turning off Hyper-V in Windows, which is needed by Docker, which I also have installed.

You need to run a command prompt in Administrator mode (go to Start->Run, type 'cmd', and then hit CTRL+SHIFT+Enter to launch it) and after changing the setting below, reboot your computer:

You can see the status by typing 'bcdedit' and then you can turn it off by:

bcdedit /set hypervisorlaunchtype off

Edit: May also need to go to "Turn Windows features on or off" and make sure everything under Hyper-V is disabled as well. I couldn't change the default Ubuntu 800x600 screen resolution in Virtualbox without getting a black screen until doing that.

1

u/normandantzig Apr 26 '20

Ok. Thank you.

I use wsl2. Do you think this will affect it? Can I switch it on off easily?

1

u/SquareVehicle Apr 26 '20

You'll have to switch back and forth each time. I have to do it with Docker and yes, it's a gigantic pain.

https://forums.virtualbox.org/viewtopic.php?f=6&t=95426

1

u/normandantzig Apr 26 '20

THank you.

Thought virtual box/ hyper V was solved...

The post you linked confirms it is not solved:

It seems that Microsoft believes/believed that WSL 2 and VirtualBox have been compatible since the release of VirtualBox 6.0 in Dec 2018. See the third FAQ on this list (dated 30 May 2019): https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq

They were probably; and still are, (partially) correct, but only for people who have the age expectation and the time to fill of the top ten in this list: https://en.wikipedia.org/wiki/Longevity_myths#Extreme_longevity_claims_in_religion 📷 If you can currently get VirtualBox to the stage of launching a VM you probably won't realise it's working because you'll think VirtualBox has frozen/crashed, when in reality it may just be running extremely slowly (watch for the Green Turtle in the VirtualBox Task Bar which indicates the 'fall back' use of Hyper-V). Hopefully, Microsoft's statement that they "are investigating ways to help resolve this issue" is still good, or:

1

u/Revalize May 06 '20

Ahhh I've been having the same error and this fixed it for me! Thanks so much!

1

u/[deleted] May 25 '20 edited May 25 '20

If I had any Reddit Coins I would give you Platinum. Gonna test this right away... I was about to kill myself over this!

EDIT: I bought the Reddit coins just to thank you!!

1

u/SquareVehicle May 25 '20

LOL thanks, it was driving my crazy too and as a programmer I would never do a "oh I figured it out now, nevermind" but provide no details type response on this so glad I could help other people too!

1

u/qiuqiutrains Jun 03 '20

THANK YOU so so much for this !! i had no idea what i was doing wrong omg

1

u/Sigmatics Jun 05 '20

Thanks, this command is very helpful.

1

u/qStigma Jul 03 '20 edited Jul 03 '20

bcdedit /set hypervisorlaunchtype off

Running in HYPER-V mode on VirtualBox did fix the errors found for me tho, unsure whether it will fuck up somewhere else now. I only installed WSL (not 2) and the Hyper-V features are all disabled by default

Edit: Nevermind - After Ubuntu filecheck it simply did nothing forever. Time to restart :D

1

u/DarkoA7 Jul 24 '20

Unfortunately, if you also need Hyper-V, then this is not a viable solution. I installed Lubuntu and so far it works fine.

1

u/Atrius Sep 21 '20

This worked for me! I have Windows 10 home and there was no option for Hyper-V but bcdedit still worked and notified me that it turned it off. I had to restart my computer and then it worked. It took at least six hours and many attempts of troubleshooting but I finally got it thanks to you!

1

u/vatsal_13 Oct 04 '20

Thanks a lot!! It worked for me.

1

u/cr_y Oct 06 '20

You saved the day, my hero.

1

u/ErnestoGrimes Apr 24 '20

Are you sure your virtual disk is large enough, store you storing the images on an external disk or network drive?

1

u/normandantzig Apr 24 '20

I have 25 Gb for the virtual disk.

1

u/ErnestoGrimes Apr 24 '20

25gb is the minimum suggested for 20.04 you may want to try something larger. When I get a chance ill try it myself with 25 gb and see if it works.

Also check how much free space you have on the drive where the vm is stored, just because it let you create a 25gb disk does not mean there is enough space to hold a full disk, the file will grow as the space is used.

1

u/normandantzig Apr 24 '20 edited Apr 24 '20

150 gb free. Will try bigger. eddit: No luck with larger drive. Do the hdd/ cd controllers need to be changed? I am using defaults.

1

u/Hiiek May 10 '20 edited May 10 '20

I resolved this error by setting the drive to fixed rather than dynamically allocated. It took a few minutes for VirtualBox to complete the process of creating the fixed drive, then the installation was able to proceed without error.

EDIT*

It may have also been disabling the installation of 3rd party software that fixed this.

1

u/normandantzig May 10 '20

Thats interesting. I disabled hyper-V

1

u/Hiiek May 14 '20

Okay so I ran into some additional errors and disabling Hyper-V resolved those.

1

u/wint_rmute Jul 04 '20 edited Jul 04 '20

I too was running into this exact issue -- super confusing, as the Ubuntu ISOs verified fine.

Curiously, I don't even have Hyper-V installed -- but do have the Windows Features enabled for the hypervisor platform and virtual machines..

Turning them off fixed the problem.

1

u/normandantzig Jul 04 '20

Curiously, I don't even have Hyper-V installed -- but do have the Windows Features enabled for the hypervisor platform and virtual machines..

Thanks for sharing. I have completely given up on virtualbox / win10 / WSL2 combo. I am waiting for WSL GPU Win 10 to get stable and more features.
I do hope at somepoint virtualbox is able to work with Hyper-V.

1

u/wint_rmute Jul 05 '20

It is disappointing -- especially since on Windows 10 Home, one can't actually run Hyper-V fully, so there's no other way to really run virtual machines

1

u/normandantzig Jul 05 '20

I keep checking on Virtual Box's monthly release. "Maybe it will work this time... Damn. Still no" I will say, it needs to fail more gracefully. It needs to stright up break instead of the weird partial working BS it does.

1

u/wint_rmute Jul 04 '20

But then even after installing, the VM ran unreliably -- weird checksum failures when downloading packages

1

u/tcallred Jun 22 '20

Hello good people. I have been having this exact same problem and it won't help if I increase the disk size or set it to fixed size. Also, my machine isn't running hyper-v. I've been having a lot of strange issues with vbox since updating. Is there maybe a bug in the current version?

1

u/DarkoA7 Jul 24 '20 edited Jul 28 '20

I think this is most likely a bug in VirtualBox 6, in my case Hyper-V is also enabled and runs Ubuntu 20.04 just fine, but VirtualBox does not.

Edit #1: it is also happening under Hyper-V, but the bug manifests differently. While installations goes fine, later software updater crashes and reports strange error to logout (later I cannot login back, unless I hard reset machine). So, it could be related to all three or just Ubuntu.

Edit #2: It seems that Hyper-V Ubuntu 20.04 version has issues only when isntalled via Quick tool, e.g. when I install it manually in gen2 container from official .iso file, then it works pretty stable.

1

u/zukeen Nov 17 '24

I have fixed this by checking "preallocate disk space" option in VM disk settings when creating a new VM, rather than letting virtualbox dynamically size it as needed.