docker on windows not working - virtualbox

I have tried installing docker on windows 7 (using boot2docker).
However the console just exists abruptly and I am unable to see the error, much less run any commands.
In the installation I have tried both installing and not installing the VirtualBox.
I have also tried un-installing and re-installing both docker and virtualbox. Nothing seems to work.
Here are the console errors I see when I run boot2docker -v up:
Boot2Docker-cli version: v1.3.0
Git commit: deafc19
2014/10/26 20:47:11 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/10/26 20:47:12 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountPrefix /
2014/10/26 20:47:12 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountDir /
2014/10/26 20:47:12 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe sharedfolder add boot2docker-vm --name c/Users --hostpath C:\Users --automount
VBoxManage.exe: error: Shared folder named 'c/Users' already exists
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "CreateSharedFolder(Bstr(name).raw(), Bstr(hostpath).raw(), fWritable, fAutoMount)" at line 1009 of file VBoxManageMisc.cpp
2014/10/26 20:47:12 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe setextradata boot2docker-vm VBoxInternal2/SharedFoldersEnableSymlinksCreate/c/Users 1
2014/10/26 20:47:12 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage.exe: error: VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Console, interface IConsole
2014/10/26 20:47:15 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
error in run: Failed to start machine "boot2docker-vm": exit status 1

Please check your BIOS for a VT-x setting. According to the log you provided, there is an error: VBoxManage.exe: error: VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)

As sangil said, the error was in your BIOS.This afternoon my laptop splash same error about VT-x dissabled on Bios

Related

VM in virtualbox is already locked for a session (or being unlocked)

My VM in virtualbox can not start due to this error, I don't want to destroy it and reinstall it again, anyway to recover it ?
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "319fcce3-e8ff-4b6f-a641-3aee1df6543f", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage: error: The machine 'centos64_c6402_1454036461345_59755' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
Running this on the command line unlocked the VM:
vboxmanage startvm <vm-uuid> --type emergencystop
Where <vm-uuid> is the number in the error message: Command: ["modifyvm", "<vm-uuid>" [...]. After that I was able to control the VM (start, halt, etc).
Using Virtualbox 4.1 on Ubuntu.
Having the same issue I found that there was a process running actually locking the vm:
501 79419 79323 0 2:18PM ?? 0:39.75 /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless --comment default --startvm 1d438a2e-68d7-4ba2-bef9-4ea162913c1b --vrde config
Make sure you don't have a process stuck trying to start the vm:
ps -ef | grep -i "vbox"
I found this answer from #Gonzalez very interesting.
vboxmanage startvm <vm-uuid> --type emergencystop
The only problem with that it shut down the current instance of my VM, so instead of using modifyvm you can use controlvm if the current vm is running.
For example:
VBoxManage modifyvm <vm_name> --natpf1 "guestssh,tcp,,22,,2222"
VBoxManage modifyvm <vm_name> --natpf1 delete "guestssh"
Become:
VBoxManage controlvm <vm_name> natpf1 "guestssh,tcp,,22,,2222"
VBoxManage controlvm <vm_name> natpf1 delete "guestssh"
Full documentation Here
https://www.virtualbox.org/manual/ch08.html#vboxmanage-controlvm
For me I had to kill the VboxHeadless.exe process in task manager. I also had to ensure CMD prompt was opened in Administrative mode.
sudo pkill -9 VBox kills everything running related to vbox
In Windows Task Manager, I ended any tasks related to Virtual Box (you can see they start with a V in Task Manager like Vbox Headless.exe, etc). Once I did that, I was able to get this error to go away (the above 'vboxmanage startvm ...etc...' solutions here did not work for me).
If you have a settings window open for that box in the VirtualBox GUI, you may run into this error. Just close the settings window and try again.
I've encounter the same error message today:
>me#myhost:~$ ps -ef | grep -i "vbox"
me 3064 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxXPCOMIPCD
me 3089 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
me 3126 3089 27 08:51 ? 00:00:39 /usr/lib/virtualbox/VBoxHeadless --comment RHEL5 64-bit desktop --startvm e5c598d8-1234-4003-a7c1-b9d8af15dfe7 --vrde config
me 3861 3415 0 08:53 pts/1 00:00:00 grep --color=auto -i vbox*
Gergely's answer solves it perfectly. It turned out that I've a crontab set at reboot to boot the virtual machine, which initiated the three VBox process shown above
me#myhost:~$ crontab -l
#reboot me /usr/bin/vboxmanage startvm "RHEL5 64-bit desktop" --type headless
The only option that worked for me was to kill all the processes matching ps axl|grep -i vbox.
In my case, the apparent cause was a USB ethernet adapter that had been removed after suspending the machine. In my case,
vboxmanage startvm <vm-uuid> --type emergencystop
did not help. Instead, I received the confusing message that
VBoxManage: error: The machine 'xyzzy' is not locked by a session
The true error was revealed by running
vboxmanage startvm <vm-uuid> --type gui
which returned
VBoxManage: error: Nonexistent host networking interface, name 'en9: USBPlug' (VERR_INTERNAL_ERROR)
Changing the network configuration to a different network adapter solved the issue.
This is because You reallocated the memory set for Virtual Box
What you have to do to fix is: Restart The PC

`gcloud compute copy-files`: network error when copying files

When I am trying to copy a file from my Windows local to google compute engine (Rhel 6), using gcloud command I am getting network error as given below:
Fatal: Network error: Connection timed out
ERROR: (gcloud.compute.copy-files) [C:\Program Files\Google\Cloud SDK\google-clo
ud-sdk\bin\sdk\scp.EXE] exited with return code [1].
Here is the command I used -
C:\Program Files\Google\Cloud SDK\java>gcloud compute copy-files --plain test.txt [userid#DEST_instance:~/directory_name] --zone us-central1-f
Could anyone point out what is causing this error?

VirtualBox VM doesn't restart after blackout

I can't make my VirtualBox VM manually restart after a blackout (it was running before the power went off).
This is the error I get:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxHeadless --startvm "DockerRegistry" -e "TCP/Ports=4444"
Oracle VM VirtualBox Headless Interface 4.0.4
(C) 2008-2011 Oracle Corporation
All rights reserved.
Error: failed to start machine. Error message: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
I already tried to search the error online and tried to follow different instructions but none worked.
You can find the output of VBoxManage showvminfo DockerRegistry --details here (I did not pasted it here because it is very long).
The output of VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi is:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi
UUID: 4c6a8bcb-3766-4581-9f45-0de031c65c95
Accessible: no
Access Error: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
Logical size: 0 MBytes
Current size on disk: 0 MBytes
Type: normal (base)
Storage format: VDI
Format variant: dynamic default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi
UPDATE
I don't know if it is of any use but here you are the output of VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry/Snapshots$ VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi
UUID: 4d495022-b596-47c0-8f38-f16c6c5d7f63
Accessible: yes
Logical size: 0 MBytes
Current size on disk: 564 MBytes
Type: normal (differencing)
Storage format: VDI
Format variant: differencing default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/Snapshots/{4d495022-b596-47c0-8f38-f16c6c5d7f63}.vdi
Auto-Reset: off
I just had this problem with my boot2docker VM after running low on power on my macbook.
$ boot2docker start -v
Using virtualbox driver
2014/09/04 18:00:42 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/09/04 18:00:42 executing: VBoxManage startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage: error: UUID {0caf9f04-5159-403a-828c-0dd9be68e1a0} of the medium '/Users/-/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vmdk' does not match the value {07ad4be9-d2d0-4ac5-bb8a-e992e816ed19} stored in the media registry ('/Users/-/Library/VirtualBox/VirtualBox.xml')
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium
What seemed to fix it for me was to "boot2docker stop", remove the .vmdk from VirtualBox Storage settings, run this command (mentioned in http://www.vleeuwen.net/2012/10/virtualbox-uuid-mismatch):
VBoxManage closemedium disk ~/VirtualBox\ VMs/boot2docker-vm/boot2docker-vm.vmdk
then reattach the disk and "boot2docker start".
Just leaving a reply for future (unlucky) people.
I couldn't find a solution and even on the VirtualBox forum anybody could help me. I reinstalled the machine.

Is it possible to use Boot2Docker without VT-x?

I want to use Docker on a machine that has VT-x disabled (and cannot be enabled). Is this possible?
I'm using Boot2Docker on Windows 7 x64, there's no mention of requirements there, or in the Docker instructions either.
I get this output from Boot2Docker start:
Welcome to Git (version 1.9.0-preview20140217)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
initialising...
2014/06/20 08:43:04 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:05 Virtual machine boot2docker-vm already exists
starting...
2014/06/20 08:43:05 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:05 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage.exe: error: VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Console, interface IConsole
2014/06/20 08:43:06 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machinereadable
2014/06/20 08:43:06 Failed to start machine "boot2docker-vm" (run again with -v for details)
connecting...
2014/06/20 08:43:06 Failed to get machine "boot2docker-vm": exit status 1
Is it possible, or is there a workaround with VirtualBox settings that can make it work?
You can fill a bug report on github: https://github.com/boot2docker/windows-installer. boot2docker should not require VT-x.
In the meantime, you can switch to any other os, like CoreOS (lightweight, docker already installed) or raw ubuntu then install docker.
You might as well want to take a look at Vagrant. CoreOS provides vagrantfiles and it is as easy as vagrant up to spawn a VM with docker enabled.
No it is not possible. I'm stuck with a similar situation with a Q8200 core 2 duo. Doesn't support VT-x which flat out means no 64 bit virtual machines. Doesn't matter which stack.

VBoxManage Error (VERR_NOT_SUPPORTED) while converting to RAW

I'm trying to convert VMDK obtained from AWS to RAW but VBoxManage fails and throws back to "VERR_NOT_SUPPORTED" error!
Is there any solution?
Environment:
CentOS 6.5
VBoxManage 4.3.8r92456
[root#dhcp-xxx-xx-xx-xx Disks]# **VBoxManage clonehd downloadedImage.vmdk foo.img --format RAW**
VBoxManage: error: Could not get the storage format of the medium '/home/swapniku/Documents/Disks/downloadedImage.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
Found the root cause. VBoxManage fails to identify latest versions of VMDK. So I used qemu-img to convert VMDK to RAW. I hope this helps!