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 can’t never 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 blows 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.
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.
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
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
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.
- 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.
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.
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
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 enabled. In my case I am sure the new updates have enabled it back. You will, therefore, have to unset that again.
Disable Hyper using the below Command and reboot your system
PS C:\Users\brokedba> bcdedit /set hypervisorlaunchtype off
The operation completed successfully.
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.