Fixes for Vagrant/Virtualbox errors due to latest Windows 10 updates
"Failed to create the host-only adapter" and "VT-x not available"
It is always hard to keep up with Operating systems upgrades and patches for software companies, not only vagrant or Virtualbox. But if there was an OS that could make it even worse for us — end-users — that would definitely be Windows 10. Microsoft never ceases to amaze us, so much their updates side effects can be dumbfounding.
Ok, let’s cut the Vendetta and show the workarounds for these unfortunate UX Sucker punches instead.
1- Failed to create the host-Only adapter
A Host-Only adapter can usually be created from virtualbox GUI (see below) or from VboxManage.exe call as admin (manually or from an external app).
Note: I could still do it from vagrant before.
Create a Host Only adaptor from the vbox GUI
Symptoms
In my case I just recall applying windows 10 (v1909) updates few days ago. But when I started running my vagrant build yesterday, I then bumped into this unsavory (yet so insightful 😛) error from the get go.
Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: **error:** **Failed to create the host-only adapter**
VBoxManage.exe: error: Operation canceled by the user
VBoxManage.exe: error: Details: **code E\_FAIL (0x80004005)**, component VirtualBoxWrap, interface IVirtualBox
VBoxManageHostonly.cpp
ENVIRONMENT
OS: Windows 10 Home
Update: July 14, 2020 — KB4565483 (1903 OS Builds 18362.959 and 1909 18363.959)
Vagrant version : Vagrant 2.2.7
Vagrant provider : VirtualBox
VirtualBox version : 6.1
Workaround
You will have to temporarily change the user account Control setting. That way the vagrant background task won’t hang then crash as windows won’t show the confirmation pop up.
**Actions
-
Type UAC in the search field on your taskbar and click Change User Account Control settings.
- Turn UAC off by dragging the slider down to Never notify and click ** OK.
Disable notification when apps make changes to the system
Note: ** Please remember to Re-Enable the notification once your vagrant build is provisioned.**
2- VT-x is not available
After solving the earlier issue, I tried to run the vagrant up
again but here comes another error message in my output.
Symptoms
error seems to indicate that the virtualization capabilities were not detected
... The command and stderr is shown below.
Command: [" **startvm**", "6cef1e57-d4d3-4633-a122-1be55e990eec", "--type", " **headless**"]
Stderr: VBoxManage.exe: **error: VMMR0\_DO\_NEM\_INIT\_VM failed** : **VERR\_NEM\_MISSING\_KERNEL\_API\_2**.
VBoxManage.exe: error: **VT-x is not available (VERR\_VMX\_NO\_VMX)**
VBoxManage.exe: error: Details: **code E\_FAIL (0x80004005)**, component ConsoleWrap, interface IConsole
Workaround
ThereforeVT-x is a set of intel CPU instructions that include hardware virtualization features which accelerate virtual machines. This must be enabled at BIOS level. Coincidentally, I also had to update my laptop BIOS the same week, but it’s not what caused the error.
Windows is known to automatically disable VT-x if Hyper-V is active. In my case I am sure the new updates have enabled it back. You will, therefore, have to unset that again.
Actions
Disable Hyper-V using the below Command and reboot your system
PS C:\Users\brokedba> **bcdedit** /set hypervisorlaunchtype **off**
The operation completed successfully.
Conclusion
We just confirmed through these small yet annoying issues that windows updates aren’t that harmless. Therefore, It’s wise to test your favorite applications functionalities after each major patch. Hopping this will help those who’ll face the same errors with vagrant on windows 10.
Top comments (0)