Reputation: 1047
Let me first tell that I am able to share a folder from windows host using VirtualBox UI. I am just trying to do the same through the command line so I do not have to open the UI every time. I am using the following command to create the shared folder:
"C:/Program Files/Oracle/VirtualBox/VBoxManage" sharedfolder add default -name myNewDockerVolume -hostpath C:/Users/kishore/Documents/myNewDockerVolume
And I get the following error for this:
$ "C:/Program Files/Oracle/VirtualBox/VBoxManage" sharedfolder add default -name myNewDockerVolume -hostpath C:/Users/kishore/Documents/myNewDockerVolume VBoxManage.exe: error: The machine 'default' is already locked for a session (or being unlocked) VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee IUnknown VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 1012 of file VBoxManageMisc.cpp
I can see only one docker machine right now:
$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default * virtualbox Running tcp://192.168.99.100:2376 v1.10.1
Am I doing something wrong here ?
Upvotes: 2
Views: 175
Reputation: 26
Since the docker-machine is running, it is not letting you run this command. You can stop the docker-machine using :
docker-machine stop default
Before stopping docker-machine itself, make sure that your containers are stopped. See if this works!!
Upvotes: 1