docker-archive / toolbox

The Docker Toolbox
https://docker.com/toolbox
3.22k stars 1.23k forks source link

VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp #360

Open yugou opened 8 years ago

yugou commented 8 years ago

Donwloaded DockerToolbox-1.9.1f.exe and kicked off Docker Quickstart Terminal on Windows 10. Did not go well.

So switched to CLI as following and always ends up with the error.

VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

PS C:\Program Files\git\bin> docker-machine rm -f default
Successfully removed default

PS C:\Program Files\git\bin> docker-machine --debug create -d virtualbox default
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:52239
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetCreateFlags
Making call to close connection to plugin binary
Making call to close driver server
(flag-lookup) Calling .Close
Successfully made call to close driver server
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:52243
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(default) Calling .GetMachineName
(default) Calling .DriverName
(default) Calling .GetCreateFlags
(default) Calling .SetConfigFromFlags
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.0.12r104815
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | COMMAND: wmic cpu get VirtualizationFirmwareEnabled
(default) DBG | STDOUT:
(default) DBG | {
(default) Calling .GetConfigRaw
(default) DBG | VirtualizationFirmwareEnabled
(default) DBG | TRUE
(default) DBG |
Creating machine...
(default) DBG | }
(default) Calling .Create
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) DBG | Creating disk image...
(default) DBG | Creating 20000 MB hard disk image...
(default) DBG | COMMAND: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe createvm --basefolder C:\Users\norio\.docker\
machine\machines\default --name default --register
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | Virtual machine 'default' is created and registered.
(default) DBG | UUID: 5bddafef-3398-42c2-a13e-da517f3c7699
(default) DBG | Settings file: 'C:\Users\norio\.docker\machine\machines\default\default\default.vbox'
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | VM CPUS: 1
(default) DBG | VM Memory: 1024
(default) DBG | COMMAND: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --firmware bios --bioslogofa
dein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 102
4 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off --cpuhotplug off --pae on --hpet on
--hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
(default) DBG | VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManage
ModifyVM.cpp
(default) DBG | }
notifying bugsnag: [Error in driver during machine creation: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm
default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ost
ype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off
--cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --bo
ot1 dvd failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
]
Error creating machine: Error in driver during machine creation: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modif
yvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled -
-ostype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1
off --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off
--boot1 dvd failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
FrenchBen commented 8 years ago

Sounds like you're having some path issues.

  1. Right click on "This PC" / "My Computer" on windows desktop
  2. Select "Properties"
  3. Go to "Advanced" tab
  4. Click "Environment Variables..." at the bottom
  5. Under System Variables click "New..."
  6. Set "Variable name" to "VBOX_INSTALL_PATH"
  7. Set "Variable value" to "C:\Program Files\Oracle\VirtualBox\" (or where your vbox is installed)
  8. Select "OK" and close all the other settings windows
yugou commented 8 years ago

Arigatou, FrenchBen

It has been set and conducted my operations under the env var set.

C:\Windows\System32>env | grep VBOX VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\ VBOX_USER_HOME=C:\Users\norio.VirtualBox

C:\Windows\System32>cd %VBOX_INSTALL_PATH% C:\Program Files\Oracle\VirtualBox>ls DbgPlugInDiggers.dll VBoxEFI32.fd VBoxSVC.exe ...

FrenchBen commented 8 years ago

Doitamashite @yugou - Is it working now? or still having the same issue?

yugou commented 8 years ago

The reported glitch was under VBOX_INSTALL_PATH var set.

FrenchBen commented 8 years ago

Good to hear it's working

yugou commented 8 years ago

No, it's NOT working.

FrenchBen commented 8 years ago

I thought from above, you said the glitch was in the VBOX_INSTALL_PATH ? Can you try to uninstall Virtualbox and re-install it?

yugou commented 8 years ago

Sorry for the confusion. Irrespective of VBOX_INSTALL_PATH is set or not, I face the VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

I tried re-installation a couple of times, but no luck.

FrenchBen commented 8 years ago

Can you open Virtualbox and confirm that the 'default' machine has been created and that you can manually start/stop it?

What anti-virus are you running?

yugou commented 8 years ago

Although the error, yes, a half cooked default is created and able to start/stop. Why I say "a half cooked" because

  1. Starting it on VirtulBox Manager, but I do not get the console so cannot operate in the default OS.
  2. My Windows is x64, but the default OS was created as 32bit Linux.

What anti-virus are you running?

No anti-virus running on my Windows, but only Defender. In case, I turned off the Defender and tried the same, but resulted in the same error.

vmdefaulterror

FrenchBen commented 8 years ago

It's very difficult for me to help when this isn't something happening on my OS and also very specific to VirtualBox - Can you provide a screenshot of the interface that exist for this VM? Adapters + Host-Only Adapters

yugou commented 8 years ago

Is this enough, FrenchBen?

ipconfig

FrenchBen commented 8 years ago

Could you give me the screenshots from the Virtualbox App? I'm more familiar with those.

Thanks!

yugou commented 8 years ago

Ok, sure.

host-only networks

Arigatou

FrenchBen commented 8 years ago

I think that's your issue - You should have 1 Host-Only network interface setup to use 192.168.99.100. Yours isn't setup like that. You can delete it, delete the VM and then re-open kitematic to get a fresh VM created.

There's some info in the wiki: https://github.com/docker/kitematic/wiki/Common-Issues-and-Fixes#kitematic-vm-stuck-at-99-or-cannot-pull-images

yugou commented 8 years ago

You can delete it, delete the VM and then re-open kitematic to get a fresh VM created.

The same error occurred.

Then referenced to https://github.com/docker/kitematic/wiki/Common-Issues-and-Fixes#kitematic-vm-stuck-at-99-or-cannot-pull-images. Added 2 adapters: one of which with 192.168.99.100.

host-only networks_2

defaultCreateError.txt

The same error. No luck.

FrenchBen commented 8 years ago

don't add the adapters manually - remove them all and let Kitematic add them. You should see a pop-up asking for permission to add them, click on 'allow' when that happens

yugou commented 8 years ago

FrenchBen san

don't add the adapters manually - remove them all and let Kitematic add them.

I did what you indicated many times before posting to this #360 issue.

Under fresh env.(No VM, No Host-only Networks), kicked off Kitematic. I get the same error once again.

errro kitematic

kitematicError.txt

FrenchBen commented 8 years ago

Gomennasai @yugou ( ̄(エ) ̄)

I am not sure why the virtualbox cannot be created. I'll see if I can re-create in one of my Windows VM

rmobis commented 8 years ago

I have the exact same issue.

Error log from Kitematic:

Encountered an error: Error: Command failed: D:\Program Files\Docker Toolbox\docker-machine.exe -D create -d virtualbox --virtualbox-memory 2048 default
Docker Machine Version: 0.5.6
 build 61388e9
 Found binary path at D:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:51756
() 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 D:\Program Files\Docker Toolbox\docker-machine.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:51760
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(default) Calling .GetMachineName
(default) Calling .DriverName
(default) Calling .GetCreateFlags
(default) Calling .SetConfigFromFlags
(default) Calling .PreCreateCheck
(default) DBG | COMMAND: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe --version
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | 5.0.14r105127
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | COMMAND: wmic cpu get VirtualizationFirmwareEnabled
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | VirtualizationFirmwareEnabled 
(default) DBG | TRUE 
(default) DBG | 
(default) DBG | }
(default) DBG | local Boot2Docker ISO version: v1.9.1
(default) DBG | COMMAND: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe list hostonlyifs
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | Name: VirtualBox Host-Only Ethernet Adapter #2
(default) DBG | GUID: babb3887-6511-424f-b293-e4d697b81f6f
(default) DBG | DHCP: Enabled
(default) DBG | IPAddress: 169.254.253.231
(default) DBG | NetworkMask: 255.255.0.0
(default) DBG | IPV6Address: fe80:0000:0000:0000:e444:5aef:ded5:fde7
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType: Ethernet
(default) DBG | Status: Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
(default) DBG | 
(default) DBG | Name: VirtualBox Host-Only Ethernet Adapter #4
(default) DBG | GUID: 06b589dc-b141-447a-8f63-22d83c5b6049
(default) DBG | DHCP: Disabled
(default) DBG | IPAddress: 192.168.10.1
(default) DBG | NetworkMask: 255.255.255.0
(default) DBG | IPV6Address: fe80:0000:0000:0000:c82b:d8a8:eb0e:ef6a
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType: Ethernet
(default) DBG | Status: Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #4
(default) DBG | 
(default) DBG | Name: VirtualBox Host-Only Ethernet Adapter #5
(default) DBG | GUID: 5ff690a3-9832-41fe-a66c-5134e1d2b3ea
(default) DBG | DHCP: Disabled
(default) DBG | IPAddress: 192.168.99.1
(default) DBG | NetworkMask: 255.255.255.0
(default) DBG | IPV6Address: fe80:0000:0000:0000:7120:0a12:a4c2:4b0d
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType: Ethernet
(default) DBG | Status: Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #5
(default) DBG | 
(default) DBG | Name: VirtualBox Host-Only Ethernet Adapter #3
(default) DBG | GUID: 84dfb189-bc20-43ae-b752-60ca4f0b24f5
(default) DBG | DHCP: Enabled
(default) DBG | IPAddress: 169.254.144.213
(default) DBG | NetworkMask: 255.255.0.0
(default) DBG | IPV6Address: fe80:0000:0000:0000:ad02:4937:ed59:90d5
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType: Ethernet
(default) DBG | Status: Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3
(default) DBG | 
(default) DBG | Name: VirtualBox Host-Only Ethernet Adapter
(default) DBG | GUID: f8abc7ad-d041-4ef4-aff9-0df3bb151599
(default) DBG | DHCP: Enabled
(default) DBG | IPAddress: 169.254.248.236
(default) DBG | NetworkMask: 255.255.0.0
(default) DBG | IPV6Address: fe80:0000:0000:0000:c8b0:46dc:2e7f:f8ec
(default) DBG | IPV6NetworkMaskPrefixLength: 64
(default) DBG | HardwareAddress: 0a:00:27:00:00:00
(default) DBG | MediumType: Ethernet
(default) DBG | Status: Up
(default) DBG | VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
(default) DBG | 
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) Calling .GetConfigRaw
(default) Calling .Create
(default) DBG | local Boot2Docker ISO version: v1.9.1
(default) DBG | Creating disk image...
(default) DBG | Creating 20000 MB hard disk image...
(default) DBG | Writing magic tar header
(default) DBG | Writing SSH key tar header
(default) DBG | Calling inner createDiskImage
(default) DBG | &{D:\Program Files\Oracle\VirtualBox\VBoxManage.exe [D:\Program Files\Oracle\VirtualBox\VBoxManage.exe convertfromraw stdin C:\Users\Raphael\.docker\machine\machines\default\disk.vmdk 20971520000 --format VMDK] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
(default) DBG | Starting command
(default) DBG | Copying to stdin
(default) DBG | Filling zeroes
(default) DBG | Closing STDIN
(default) DBG | Waiting on cmd
(default) DBG | Converting from raw image file="stdin" to file="C:\Users\Raphael\.docker\machine\machines\default\disk.vmdk"...
(default) DBG | Creating dynamic image with size 20971520000 bytes (20000MB)...
(default) DBG | COMMAND: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe createvm --basefolder C:\Users\Raphael\.docker\machine\machines\default --name default --register
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | Virtual machine 'default' is created and registered.
(default) DBG | UUID: a24ec4ac-f54d-49b9-bd22-9426325c6c79
(default) DBG | Settings file: 'C:\Users\Raphael\.docker\machine\machines\default\default\default.vbox'
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | VM CPUS: 1
(default) DBG | VM Memory: 2048
(default) DBG | COMMAND: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 2048 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd
(default) DBG | STDOUT:
(default) DBG | {
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
(default) DBG | VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
(default) DBG | }
Error creating machine: Error in driver during machine creation: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 2048 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available) 
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp 

Error log from Docker Quickstart Terminal:

Welcome to Portable Git (version 1.9.5-preview20150319)

Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Raphael\.docker\machine\cache\boot2docker.iso to C:\Users\Raphael\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
Error creating machine: Error in driver during machine creation: D:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 off --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

Looks like something went wrong... Press any key to continue...

Environment Variables:

λ env | grep VBOX
VBOX_INSTALL_PATH=D:\Program Files\Oracle\VirtualBox\
VBOX_MSI_INSTALL_PATH=D:\Program Files\Oracle\VirtualBox\

Network Adapters (Before Clean) (I believe there were from my Vagrant/Homestead installation) Network Adapters

Network Adapters (After Clean & Retry) Network Adapters

Other Info:

It is also worth noting that I already had msysGit installed an opted not to install the version that comes with Toolbox.

If there's anything else that I can provide to help, please let me know.

FrenchBen commented 8 years ago

Ping @nathanleclaire any idea what's going on here?

yugou commented 8 years ago

I have tried what you guys suggested wipe out default VM and clean up Host-only Networks # of times. Always run into the same error, even now.

vmdefaulterror2

rmobis commented 8 years ago

I tried installing it on another machine of mine and it worked perfectly. The only difference between both machines that I think could matter is that i think I had already tried to install Docker on the first machine with Boot2Docker, a long time ago, without success.

FrenchBen commented 8 years ago

@rmobis I have seen 'older' Virtualbox versions creating havoc when trying to create a new version. Good to hear it works well on a vanilla machine. Unfortunately vbox upgrades aren't as smooth as one would hope - Hence the repeated advice to wipe the install clean then try again.

yugou commented 8 years ago

Hence the repeated advice to wipe the install clean then try again.

Would you kindly telling me other than uninstalling of VBox, what needs to be done? I mean which directories need to be removed, that created by VBox?

FrenchBen commented 8 years ago

@yugou I am probably not the best on vbox knowledge of 'clean' uninstall - I did however find this thread, which may help: https://forums.virtualbox.org/viewtopic.php?f=8&t=68820

FrenchBen commented 8 years ago

@yugou Can you check and see if perhaps you have Hyper-V enabled/running? See: https://github.com/docker/kitematic/issues/1399#issuecomment-180060648

yugou commented 8 years ago

@FrenchBen san Hyper-V has not been enabled/installed on my Windows 10 system.

In case, disabled Intel HT and tried.

dsc_0311

No luck, the same error.

nathanleclaire commented 8 years ago

@yugou Enabling hardware virtualization in the BIOS is different than checking if Hyper-V is configured. You can see the Hyper-V setting in Windows menus (e.g. in Windows features http://windows.microsoft.com/en-us/windows-8/hyper-v-run-virtual-machines).

If your machine does not support Hyper-V it will simply be missing from the menu.

yugou commented 8 years ago

@nathanleclaire Windows10 Hypuer-V has not been enabled. BIOS Hypuer-V you are talking about is shown as Intel Visualization Tech on my BIOS setting and that has been enabled since years ago.

rmobis commented 8 years ago

No Hyper-V here either:

image

yugou commented 8 years ago

@mobis san Arigatou. I know Hyper-V menu on Windows Features and it has never been clicked, thus never installed.

rmobis commented 8 years ago

As per https://github.com/docker/kitematic/issues/1399#issuecomment-180530234, updating my Windows (even if that was quite troublesome) solved the issue.

yugou commented 8 years ago

My Windows 10 has been always updated and has been facing this issue under the latest Windows' update.

conan commented 8 years ago

I have the same problem, I fire up Kitematic and it creates a default Docker container, then I run docker-machine start default and get this:

$ docker-machine start default
Starting "default"...
(default) Check network to re-create if needed...
Error setting up host only network on machine start: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM --nicpromisc2 deny --hostonlyadapter2 VirtualBox Host-Only Ethernet Adapter #2 --cableconnected2 on failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

I've tried reinstalling VirtualBox, running version 5.0.16-10. I have two Host-only networks after installing VirtualBox, one at 192.168.99.1 and one at 192.168.56.1. My Windows 10 is up to date, and I'm only running Windows Defender, no other antivirus. My virtualisation is enabled. I also use VirtualBox with Vagrant with no problems, and when I start that it adds another Host-only network on the IP address specified in my Vagrantfile.

UPDATE: I got it running. The reason I was running docker-machine start default was because I'd fired up Kitematic, it had created the default container, but when I ran docker-machine status it said it was stopped. I think the problem was a mismatch between what was being reported by docker-machine and what was actually happening. I'd recommend deleting the relevant host-only network, shutting down the VM in the VirtualBox interface, and starting it again with docker-machine start default.

nathanleclaire commented 8 years ago

I think the problem was a mismatch between what was being reported by docker-machine and what was actually happening

Out of curiosity, when you saw this behavior, was the VM displaying "Saved" state in the VirtualBox GUI?

knandula commented 8 years ago

I had the same issue recently , for me the virtualBox GUI ("default") showing state was running . I simply powered it off and then started my docker and everything works well.

aniruddh02 commented 8 years ago

It worked for me by simply powering off the virtual machine (default) and restarting docker.

andreikun commented 8 years ago

Hello,

Please try to vagrant up or homestead or whatever vagrant or homestead command you need from a command line run as administrator. I fixed my own issue while trying to vagrant up and ssh my machine by hitting this commands from a command prompt as administrator.

Hope this will fix your issue.

This is especially for Windows users.

rjfisher123 commented 8 years ago

Hello All, I ran into this issue on a windows machine, here was my resolution path:

  1. Start
  2. Control Panel
  3. Network and Internet
  4. Network and Sharing Center
  5. Change adapter settings (Left hand menu)
  6. Right click "Virtual Host-Only Network" adapter (or all applicable adapters for "Virtual"
  7. Select Properties (click through admin control)
  8. Select Configure button
  9. Select Driver tab
  10. Select Update Driver button
  11. Select "Browse my computer for driver software"
  12. Select "Let me pick from a list of device drivers on my computer"
  13. Select "VirtualBox Host-only Ethernet Adapter" (select Next and Ok all prior windows)
  14. run docker-machine start [your vm] :-)
shainad commented 8 years ago

@rjfisher123 I went through the resolution path you posted above; however, I am still receiving an error when trying to vagrant up... vagrant up error ssh

Windows 10 OS; Vagrant 1.8.6

any ideas?

Creased commented 7 years ago

The LockMachine(a->session, LockType_Write) issue is due to a lack of administrator access token request by the command prompt or VirtualBox API client (i.e., Kitematic). Ideed, without administrator access token, client will not be able to override the machine's lock defined by VBoxHeadless elevated process and will return such this error.

Here is a way to solve this issue:

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\System32\cmd.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\SysWOW64\cmd.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\Docker Toolbox\kitematic\Kitematic.exe" /t REG_SZ /d "~ RUNASADMIN" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\System32\cmd.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\SysWOW64\cmd.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" /t REG_SZ /d "~ RUNASADMIN" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\Docker Toolbox\kitematic\Kitematic.exe" /t REG_SZ /d "~ RUNASADMIN" /f

or using registry import file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\System32\\cmd.exe"="~ RUNASADMIN"
"C:\\Windows\\SysWOW64\\cmd.exe"="~ RUNASADMIN"
"C:\\Program Files\\Oracle\\VirtualBox\\VirtualBox.exe"="~ RUNASADMIN"
"C:\\Program Files\\Docker Toolbox\\kitematic\\Kitematic.exe"="~ RUNASADMIN"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\System32\\cmd.exe"="~ RUNASADMIN"
"C:\\Windows\\SysWOW64\\cmd.exe"="~ RUNASADMIN"
"C:\\Program Files\\Oracle\\VirtualBox\\VirtualBox.exe"="~ RUNASADMIN"
"C:\\Program Files\\Docker Toolbox\\kitematic\\Kitematic.exe"="~ RUNASADMIN"
tgatev commented 7 years ago

I has the same issue. The key point is "Run as Administrator", run your VirtualBox or Terminal as administrator, in other case you have no write permissions.

daramir commented 6 years ago

I ran Creased's regedits to no avail :(

cihanbas commented 6 years ago

@tgatev thanks bro " Run as Administraton" it is working

lloan commented 6 years ago

Running command line as administrator definitely worked. Thanks @tgatev!