DockerToolbox and VirtualBox on Windows 7

I’ve been using Docker on windows 7 for a while now, only to find out one day that Docker Quick Start Terminal, and Kitematic could no longer connect to my VirtualBox host.

I spent a day thinking my ssh connection was the issue. Having spent some time creating the containers I decided the first thing I needed to do was back them up.

Steps that I took are as follows:

From VirtualBox logged in as root I was able to make backups of my containers.

1.) create a snapshot

# docker ps –a

note the CONTAINER ID column value for statement below.

# docker commit –p containerid  containername

repeat this for all the containers you want to snapshot (note: if they are large you may have to do all the steps below to SFTP for each one at a time, since the bootdocker image has limited hard disk space allocated.)

2.)  save snapshot image to tar file

#docker save –o ~/containername.tar containername

repeat this for all the containers you want to backup

move the containername.tar files the docker home directory as follows

#mv ~/containername.tar /home/docker/.

repeat for all the containers you want to retrieve from host

# cd /home/docker

change owner to docker so that we can use that unix account to retrieve

# chown docker : docker *.tar

3.) connect to through sftp. I use WinSCP but any SFTP client should work

sftp : username: docker password: tcuser

usually the ip= 192.168.99.100

transfer the tar files to your local machine somewhere safe

After having these backups off  VirtualBox we can feel safe blowing away our boot2docker image if need be.

After a day of troubleshooting ssh and trying to get kitematic or the QuickStart terminal to create the bootdocker image and successfully ssh in I almost gave up on Windows 7 and using docker. But then I looked at the VirtualBox log file that each attempt was creating and saw the following error:

supR3HardenedErrorV: supR3HardenedScreenImage/LdrLoadDll: rc=VERR_LDRVI_NOT_SIGNED fImage=1 fProtect=0x0 fAccess=0x0 \Device\HarddiskVolume3\Windows\System32\LavasoftTcpService64.dll: Not signed.

another thread discussing the issue with VirtualBox!

https://forums.virtualbox.org/viewtopic.php?f=6&t=69675&start=15

So sure enough NAT was not working on my VirtualBox because of this unsigned LavasoftTcpService64.dll in the tcp path. Well it took me another complete day to get that dll uninstalled. As it was constantly open. But once I removed the LavasoftTcpService64.dll completely from my machine, I allowed Kitematic to create a machine in non elevated privilege mode with success.

But of course it is empty of containers so I had to restore my containers as follows:

connect using SFTP under the docker account again

sftp : username docker password:tcuser

once connected transfer over the container.tar files

then from Virtualbox as root do the following:

# cd /home/docker

# docker load  -i < container.tar

list your images by using

#docker images

Then from Kitematic you can go to the image tab and hit create on each image you want to run.

That’s it. I had my custom containers back. How that one LavasofttcpService64.dll got installed I don’t know. I never installed Ad-Ware Web Companion. But that one dll set me back for three days.

Hope this saves you time if suddenly your docker ssh stops working with a similar issue. If nothing else it has taught me to backup my containers often.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s