Understanding the Root Cause
Code 37 indicates that Windows attempted to start a driver but failed because the operating system could not properly initialize the device. In the context of VirtualBox, this rarely means the VirtualBox software itself is broken. Instead, it points to a conflict between VirtualBox’s direct hardware access and Windows’ own hypervisor technologies. Modern versions of Windows 10 and 11 enable several virtualization-based security features by default, such as Core Isolation and Memory Integrity. These features reserve hardware resources that VirtualBox needs to pass through devices like USB controllers or network adapters to the guest OS.
When these security layers are active, they block VirtualBox from initializing certain emulated hardware devices, resulting in the "Operation Failed" message in Device Manager. Additionally, if you have previously migrated a virtual machine or changed its hardware profile, stale driver references can persist in the .vbox configuration file, causing initialization failures upon boot. It is important to distinguish this from general freezing issues; while Windows 10 VMs freezing on VirtualBox often relates to CPU scheduling, Code 37 is strictly a driver initialization failure.
Disable Hyper-V and Related Services
The most effective fix for Code 37 involves ensuring that no other hypervisor is competing for hardware control. Even if you do not use Hyper-V directly, many Windows features rely on it. You must disable these features completely to allow VirtualBox to take exclusive control of the virtualization extensions.
- Turn Off Windows Features: Open the Start menu, search for "Turn Windows features on or off," and open the control panel applet. Locate "Hyper-V," "Virtual Machine Platform," and "Windows Hypervisor Platform." Uncheck all of these boxes. If you see "Windows Sandbox," uncheck it as well.
- Restart Your Computer: A full restart is mandatory after changing these settings to ensure the services are actually stopped and the hardware locks are released.
- Verify Service Status: After rebooting, press
Win + R, typeservices.msc, and check that the "Hyper-V Virtualization Infrastructure" service is stopped. If it starts automatically, right-click it, select Properties, and change the Startup type to Disabled.
Adjust Core Isolation and Memory Integrity
If disabling Hyper-V does not resolve the error, the issue likely stems from Windows Security’s memory integrity features. These features enforce strict driver signing and isolation, which can prevent VirtualBox drivers from loading correctly.
- Navigate to Settings > Update & Security > Windows Security.
- Click on Device Security and then select Core isolation details.
- Toggle Memory integrity to Off. You may also need to disable Secure launch if available.
- Restart your computer again to apply these changes.
This step allows legacy or third-party drivers, including those used by VirtualBox for USB and audio passthrough, to initialize without being blocked by kernel-level protections. For users managing multiple environments, understanding how to enable WSL2 on Win11 in VirtualBox often requires balancing these same settings, so proceed with caution if you rely on WSL2 simultaneously.
Fix USB Controller Configuration in VirtualBox
Once host-level conflicts are resolved, you must ensure the virtual machine’s internal configuration is clean. Code 37 frequently appears on the USB Controller device in the VM’s Device Manager because the emulated controller is trying to load a driver that cannot communicate with the host.
- Shut down the affected virtual machine completely. Do not save the state.
- In the VirtualBox Manager, select the VM and click Settings.
- Navigate to the USB tab. Ensure that "Enable USB Controller" is checked.
- Change the USB Version dropdown. If it is set to USB 3.0 (xHCI), try switching it to USB 2.0 (EHCI). Conversely, if it is already 2.0, try 3.0. This forces VirtualBox to re-initialize the controller driver.
- Go to the System > Motherboard tab and ensure "Floppy" is removed if not needed, as old floppy drivers can sometimes cause similar initialization errors.
Reinstall Guest Additions and Drivers
If the error persists, the guest operating system inside the VM may have corrupted or outdated drivers. Reinstalling the VirtualBox Guest Additions ensures that the correct drivers for display, mouse, and networking are installed.
Boot the VM, go to the Devices menu in the top bar, and select Insert Guest Additions CD image. Run the installer inside the guest OS and follow the prompts. Restart the guest VM after installation. This process replaces any conflicting generic Windows drivers with VirtualBox-specific optimized drivers that are known to work with the host environment.
Frequently Asked Questions
Why does Code 37 appear only after a Windows update?
Windows updates often enable new security features like Core Isolation or update the Hyper-V platform by default. These changes can inadvertently block VirtualBox drivers. Always check your Windows Security settings after major updates to ensure memory integrity has not been re-enabled.
Can I use Hyper-V and VirtualBox together to avoid this error?
No, traditional VirtualBox versions cannot run alongside Hyper-V enabled guests due to hardware lock conflicts. While newer versions of VirtualBox support running on top of Hyper-V, this mode disables many advanced features like USB 3.0 and can still trigger Code 37 on specific devices. Disabling Hyper-V is the most stable solution.
Does reinstalling VirtualBox fix Code 37?
Reinstalling VirtualBox rarely fixes Code 37 because the issue lies in the host OS configuration, not the application files. However, performing a clean uninstall and reinstall can clear corrupted registry entries related to USB filters if previous troubleshooting steps failed.
How do I migrate my VM if I cannot fix the driver error?
If the driver conflict is irreparable, you can export the VM and import it into another platform like VMware Workstation, which handles driver initialization differently. See our guide on how to migrate VirtualBox Image to VMware Workstation Pro for detailed steps on transferring your data safely.
What should I do if the USB controller setting doesn't exist?
If the USB tab is missing or greyed out, your VM configuration file (.vbox) may be corrupted. You can manually edit this XML file using a text editor, but this is risky. Instead, create a new VM with the same specifications and attach the existing virtual hard disk file to it.