VirtualBox Ubuntu Disk Error (Input/output error) Due to Windows 10 Hyper V (WSL2)

I face occasional disk / file reading error on my VirtualBox (frequent apt-get and npm disk error) after I installed WSL2 on Windows 10. I didn't know the cause of the problem until I try to install a new OS on VirtualBox, then I bump into the following issues

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

Initally I thought I have a disk problem, but a full disk scan didn't show any anomalies.

Then I bump into this article, which indicate the problem is caused by Hyper-V (a.k.a Virtual Machine), which is enabled when WSL2 is installed.

Multiple articles indicate that Hyper-V is not compatible with VirtualBox and VMWare, that there is also indicatation that VirtualBox is supporting Hyper-V on version 6 onwards. My guess is that VirtualBox still works with Hyper-V enabled, but maybe the disk reading error is an unexpected bug at the moment.

How to disable WSL2

NOTE: By disabling Hyper-V / Virtual Machine, I can no longer use WSL2.

Run systeminfo.exe to check if Hyper-V is enabled. The text below indicate Hyper-V is enabled.

Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Type Turn Windows features on or off in the search bar (or find in Control Panel)

On Windows 10 (version 2004), it doesn't have an option named Hyper-V. On my machine, Virtual Machine Platform is ticked but Windows Hypervisor Platform is not ticked. To disable Hyper-V, both Virtual Machine Platform and Windows Hypervisor Platform should be unchecked.

Win10 turn off Hyper-v

Click OK and reboot the machine.

NOTE: Some indicate the need to run bcdedit /set hypervisorlaunchtype off, but it is not necessary for my case.

Run systeminfo.exe and you shall see the following.

Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

My VirtualBox Ubuntu disk problem is solved after I disable Hyper-V.

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.