I've searched the forums here, on stackoverflow, and general google searches for a few hours without finding a solution that worked for my situation.
Recent changes:
* windows update
* virtualbox upgrade
* docker-machine upgrade
* vagrant upgrade
Environment:
* Windows 10 Version 10.0.19042 Build 19042
* VirtualBox Version 6.1.26 r145957 (Qt5.6.2)
* Vagrant 2.2.18 (I know this is 3rd party - including for completeness since one of the VMs was built with vagrant long ago)
* docker-machine 0.16.1
VMs:
1. buildbox - used by docker-machine
2. devenv - ubuntu guest that was built through vagrant long ago
The VM used by docker-machine was failing because the host-only adapter #2 didn't exist.
To troubleshoot this I:
* deleted the old buildbox vm
* uninstalled BitDefender in case it had interfered
* uninstalled VirtualBox
* rebooted
* installed VirtualBox as admin
* rebooted
The adapters still didn't exist.
Running `vboxmanage list hostonlyifs` created the interfaces, though their names were "Ethernet 4" and such, with the description set to "VirtualBox Host-Only Ethernet Adapter #2".
I created the new VM for docker with:
Code: Select all
docker-machine --debug create -d virtualbox --virtualbox-disk-size "150000" buildbox
Disabling and re-enabling the interface worked, so as a workaround I'll run:
Code: Select all
disable-netadapter -InterfaceDescription "VirtualBox*" -confirm:$false
enable-netadapter -InterfaceDescription "VirtualBox*" -confirm:$false
docker-machine restart buildbox
docker-machine env buildbox | Invoke-Expression
The other VM is still broken, regardless of whether I start it with vagrant (I know, 3rd party), or directly within the VirtualBox Manager.
The error when launching with vagrant (including in case others search by that error):
Code: Select all
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "7f996d6a-b179-43dc-902d-c9b159997196", "--type", "headless"]
Stderr: VBoxManage.exe: error: The VM session was closed before any attempt to power it on
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface ISession
Code: Select all
The VM session was closed before any attempt to power it on.
Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: ISession {c0447716-ff5a-4795-b57a-ecd5fffa18a4}