Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
703 views
in Technique[技术] by (71.8m points)

windows - boot2docker vm forgets changes when restarted

Basically any changes I make while SSHed into the VM are lost at restart of the VM. I am assuming the problem is associated with the error when I stop the VM.

C:UsersTom>boot2docker stop
error in run: Failed to stop machine "boot2docker-vm": exit status 1

But, I may just be doing something dumb.

The sequence I followed is below (docker logo elided), you can see it losing the sample directory across the restart.

C:UsersTom>boot2docker up

Waiting for VM and Docker daemon to start.......................ooo
Started.
Writing C:UsersTom.boot2dockercertsoot2docker-vmca.pem
Writing C:UsersTom.boot2dockercertsoot2docker-vmcert.pem
Writing C:UsersTom.boot2dockercertsoot2docker-vmkey.pem
Docker client does not run on Windows for now. Please use
    "boot2docker" ssh
to SSH into the VM instead.


C:UsersTom>boot2docker ssh
Boot2Docker version 1.5.0, build master : a66bce5 - Tue Feb 10 23:31:27 UTC 2015
Docker version 1.5.0, build a8a31ef
docker@boot2docker:~$ ls
boot2docker, please format-me
docker@boot2docker:~$ mkdir testdir
docker@boot2docker:~$ ls
boot2docker, please format-me  testdir/
docker@boot2docker:~$ exit

C:UsersTom>boot2docker stop
error in run: Failed to stop machine "boot2docker-vm": exit status 1

C:UsersTom>boot2docker status
poweroff

C:UsersTom>boot2docker start
Waiting for VM and Docker daemon to start...
....................ooo
Started.
Writing C:UsersTom.boot2dockercertsoot2docker-vmca.pem
Writing C:UsersTom.boot2dockercertsoot2docker-vmcert.pem
Writing C:UsersTom.boot2dockercertsoot2docker-vmkey.pem
Docker client does not run on Windows for now. Please use
    "boot2docker" ssh
to SSH into the VM instead.


C:UsersTom>boot2docker ssh
Boot2Docker version 1.5.0, build master : a66bce5 - Tue Feb 10 23:31:27 UTC 2015
Docker version 1.5.0, build a8a31ef
docker@boot2docker:~$ ls
boot2docker, please format-me
docker@boot2docker:~$

Running

  • Windows: 8.1
  • VirtualBox: 4.3.12 r93733
  • Boot2Docker version 1.5.0, build master : a66bce5 - Tue Feb 10 23:31:27 UTC 2015
  • Docker version 1.5.0, build a8a31ef
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

That is what I explained in "Windows Boot2Docker behind corporate proxy": there is no persistence in the Tiny Core used by boot2docker as a Linux VM.

You need to make sure the VirtualBox has the Oracle_VM_VirtualBox_Extension_Pack downloaded and added in the Virtual Box / File / Settings / Extension / add the Oracle_VM_VirtualBox_Extension_Pack-4.x.yy-zzzzz.vbox-extpack file).

As documented in boot2docker, you will have access (from your Tiny Core ssh session) to /c/Users/<yourLogin> (ie the %USERPROFILE% is shared by Virtual Box)

What I do in my b2d.bat start script is copy the files I want to be restored (mainly docker profile or .ashrc, for http_proxy settings and favorite aliases), and keep all my other modifications in /c/Users/<yourLogin>.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...