Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Docker-machine cannot launch VboxManage without starting separate window #4548

Open
mrkbutty opened this issue Aug 3, 2018 · 12 comments
Open

Comments

@mrkbutty
Copy link

mrkbutty commented Aug 3, 2018

Using Win7 when trying to create a VM I receive error;

Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"\".

I've tried this use cmd, cmdr, ConEmu and Git bash prompts. This seems to be due to docker-machine or vboxmanage spawning new windows so stdout is not captured. However running the vboxmanage command manually from the same command line works everywhere except for Git-bash where a new window is always spawned;

C:\Windows\System32>docker-machine --debug create main
Docker Machine Version:  0.14.0, build 89b8332
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:58206
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:58210
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(main) Calling .GetMachineName
(main) Calling .DriverName
(main) Calling .GetCreateFlags
(main) Calling .SetConfigFromFlags
Reading certificate data from C:\Users\mbutterworth\.docker\machine\certs\ca.pem
Decoding PEM data...
Parsing certificate...
Reading certificate data from C:\Users\mbutterworth\.docker\machine\certs\cert.pem
Decoding PEM data...
Parsing certificate...
Running pre-create checks...
(main) Calling .PreCreateCheck
(main) DBG | COMMAND: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe --version
(main) DBG | STDOUT:
(main) DBG | {
(main) DBG | }
(main) DBG | STDERR:
(main) DBG | {
(main) DBG | }
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"\". Please upg
rade at https://www.virtualbox.org"
open C:\Users\mbutterworth\.docker\machine\machines\main\main\Logs\VBox.log: The system cannot find the path specified.
notifying bugsnag: [Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install
 is \"\". Please upgrade at https://www.virtualbox.org"]


C:\Windows\System32>
C:\Windows\System32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" --version
5.2.8r121009
@mrkbutty
Copy link
Author

mrkbutty commented Aug 6, 2018

I did some testing as per here;
https://stackoverflow.com/questions/51676072/vboxmange-command-spawns-new-window-tested-with-go-os-exec-run-why-how-do

  • Looks like the issue is with the vboxmanage command

@mrkbutty
Copy link
Author

mrkbutty commented Aug 7, 2018

I opened a ticket with Oracle but they say this is due to windows graphical and CLI commands not mixing and that VirtualBox should be invoked with the API rather than the CLI commands.

See ticket at https://www.virtualbox.org/ticket/17916

@jimalex3
Copy link

jimalex3 commented Aug 8, 2018

I have the same exact issue on Windows 7. Your analysis is very clear and big help. I wonder if there is any work around or a projection for a fix.

@drnybble
Copy link

drnybble commented Aug 14, 2018

Is this a new phenomenon? I have been using Docker Toolbox for a few years with no problem, now just recently 17.06.2 stops working for precisely this reason. Windows update?
I had a co-worker try the GO test program you wrote on his laptop, which is also Windows 7 and it works for him, fails for me. So must be something environmental.

@drnybble
Copy link

Tried rolling back some recent Windows updates which didn't help. Booted in safe mode -- your Go test program works. Current suspect is a new virus scanner installed on my work system in the past few days......

@mrkbutty
Copy link
Author

@drnybble - your comment on the Virus Checker is interesting as recently I had Carbon Black forced on me.
I had used VirtualBox successfully in the past but a long time ago so I cannot directly link it to the Carbon Black install but I do know lots of other weird errors occur due to that Virus of a Virus checker.

  • maybe it is related!

@drnybble
Copy link

Yup "Carbon Black" it is.....

@esseun
Copy link

esseun commented Aug 15, 2018

Where does this Carbon Black installation come from? Is it bundled with any of the Docker Toolbox or VirtualBox install? It was suspicious to me as well... Carbon Black was mysteriously installed 2 days ago and this docker-machine issue surface roughly around the same time. I've briefly looked at the Carbon Black logs (in Program Files/Confer) and they definitely seem to be monitoring any and all processes, including VBoxManage.

In any case, I cannot uninstall Carbon Black through the 'standard way' (through Windows' "Uninstall a program"). I've also located 2 services that are running under the names "Cb Defense" and "Cb Defense WSC", both of which cannot be stopped for some privilege related reasons.

@esseun
Copy link

esseun commented Aug 15, 2018

Carbon Black was indeed the problem.

I booted into safe mode, disabled the 2 services mentioned in my previous post (Cb Defense, Cb Defense WSC), then restarted my PC.

Ran the same problematic command and was successful in creating the docker machine:

$ docker-machine --debug create default
Docker Machine Version: 0.15.0, build b48dc28
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:49179
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:49181
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(default) Calling .GetMachineName
(default) Calling .DriverName
(default) Calling .GetCreateFlags
(default) Calling .SetConfigFromFlags
Reading certificate data from C:\Users\IBM_ADMIN.docker\machine\certs\ca.pem
Decoding PEM data...
Parsing certificate...
Reading certificate data from C:\Users\IBM_ADMIN.docker\machine\certs\cert.pem
Decoding PEM data...
Parsing certificate...
Running pre-create checks...
(default) Calling .PreCreateCheck
(default) DBG | COMMAND: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe --version
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | 5.2.16r123759
(default) DBG | }

(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | Hyper-V is not installed.
(default) DBG | %!(EXTRA *exec.Error=exec: "vmms.exe": executable file not found in %PATH%)COMMAND: wmic cpu get VirtualizationFirmwareEnabled
(default) DBG | Couldn't check that VT-X/AMD-v is enabled. Will check that the vm is properly created: exit status 2147749911
(default) DBG | local Boot2Docker ISO version: v18.06.0-ce

You can see that now the STDOUT correctly displays the VBoxManage version number.

@drnybble
Copy link

You don't happen to work for a certain three letter company do you?

@esseun
Copy link

esseun commented Aug 15, 2018

I do... it seems like a company-wide roll out that installed CB into my system.

@mrkbutty
Copy link
Author

mrkbutty commented Aug 17, 2018

My company used to be 3 letters ending in an S but recently changed name to 2 letters, ending in a V.

I found out it isn't Carbon Black causing the issue on my system!

The CB log files (confer.log) are very useful so I went looking through them.
When launching vboxmanage I noticed that both docker-machine and my vboxtest.exe were being intercepted and vboxmanage was being run by windows\system32\pmlauncher.exe a google search indicated this was AVG but it isn't if you inspect the file it is described as "BeyondTrust PowerBroker for Windows Launcher".

There is a BeyondTrust PowerBroker service so I stopped this and then both the vboxtest.exe and the docker-machine commands work...

<stopped beyond trust>

C:\temp>testvbox
StdOut: "5.2.16r123759\r\n"

<started beyond trust>

C:\temp>testvbox
StdOut: ""

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants