How to Fix “NtCreateFile(\Device\VBoxDrvStub) Failed” Error in VirtualBox 7.1.6 on Windows
Encountering the NtCreateFile(\Device\VBoxDrvStub) failed: 0xc0000034 error while creating a virtual machine in VirtualBox can be frustrating. This issue is commonly related to VirtualBox kernel driver problems, which prevent the application from functioning properly.

I recently faced this error while setting up an OracleLinux-R9-U5-x86_64-dvd virtual machine on VirtualBox-7.1.6-167084-Win. After extensive troubleshooting, I found a set of solutions that successfully resolved the issue. In this post, I’ll walk you through these steps to fix the problem and get your virtual machine running smoothly.
Steps to Fix the VirtualBox Kernel Driver Issue
1. Restart Your System
Before diving into advanced fixes, a simple restart might resolve the issue, as the VirtualBox driver could be temporarily stuck.
2. Run VirtualBox as Administrator
To ensure VirtualBox has the necessary permissions to access system resources:
- Right-click on the VirtualBox shortcut.
- Select Run as administrator.
3. Check VirtualBox Services (This Step Resolved My Issue)
VirtualBox relies on its service (vboxsup) to function correctly. Checking and starting this service resolved the issue in my case.
- Open Command Prompt as Administrator (search cmd, right-click, and select Run as administrator).
- Run the following command:
sc.exe query vboxsup
If the service is stopped, try starting it manually:
sc.exe start vboxsup
For your reference:

If you get an Access Denied (error 5), ensure you’re running Command Prompt as an administrator.
4. Reinstall VirtualBox
If the issue persists, reinstalling VirtualBox can help:
- Uninstall VirtualBox from Control Panel → Programs and Features.
- Restart your system.
- Reinstall VirtualBox from the official VirtualBox website.
- Run the installer as Administrator and make sure to check the option to install VirtualBox Network Adapter.
5. Disable Driver Signature Enforcement (If Needed)
If Windows is blocking VirtualBox drivers, you may need to disable Driver Signature Enforcement temporarily:
- Open Command Prompt as Administrator.
- Run the command:
bcdedit /set testsigning on
- Restart your system.
- Try running VirtualBox again.
- If the issue is resolved, you can disable test mode later using:
bcdedit /set testsigning off
6. Check for Conflicting Applications
Certain applications, such as Hyper-V, VMware, and some antivirus software, can interfere with VirtualBox. To disable Hyper-V:
- Open Command Prompt as Administrator.
- Run:
bcdedit /set hypervisorlaunchtype off
- Restart your system and check if VirtualBox is working.
7. Update Windows & Drivers
Keeping your system up to date is crucial:
- Ensure Windows Updates are installed.
- Update VirtualBox Guest Additions if installed.
- Check for driver updates, especially related to virtualization and network adapters.
Conclusion
By following these steps, I was able to successfully resolve the NtCreateFile(\Device\VBoxDrvStub) failed
error and create my Oracle Linux VM in VirtualBox 7.1.6.
In my case this, Step 3 (Checking and Starting VirtualBox Services) resolved the issue, so I recommend trying this first before proceeding with other fixes. If you’re experiencing the same error, these solutions should help you fix it and get your virtual machines running smoothly.
Have you faced this error? Let me know in the comments if these steps worked for you or if you found another solution!