boot2docker vm重新启动时会忘记更改

基本上,我在SSH进入虚拟机时所做的任何更改都将在虚拟机重新启动时丢失。 我假设当我停止虚拟机时,问题与错误有关。

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

但是,我可能只是在做一些愚蠢的事情。

我遵循的顺序如下(docker logo elided),你可以看到它在整个重启过程中丢失了示例目录。

 C:\Users\Tom>boot2docker up Waiting for VM and Docker daemon to start.......................ooo Started. Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\ca.pem Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\cert.pem Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\key.pem Docker client does not run on Windows for now. Please use "boot2docker" ssh to SSH into the VM instead. C:\Users\Tom>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:\Users\Tom>boot2docker stop error in run: Failed to stop machine "boot2docker-vm": exit status 1 C:\Users\Tom>boot2docker status poweroff C:\Users\Tom>boot2docker start Waiting for VM and Docker daemon to start... ....................ooo Started. Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\ca.pem Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\cert.pem Writing C:\Users\Tom\.boot2docker\certs\boot2docker-vm\key.pem Docker client does not run on Windows for now. Please use "boot2docker" ssh to SSH into the VM instead. C:\Users\Tom>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:~$ 

运行

  • Windows:8.1
  • VirtualBox:4.3.12 r93733
  • Boot2Docker版本1.5.0,构build主站:a66bce5 – Tue Feb 10 23:31:27 UTC 2015
  • Docker版本1.5.0,构builda8a31ef

Solutions Collecting From Web of "boot2docker vm重新启动时会忘记更改"

这就是我在“ Windows代理公司代理之后的Windows Boot2Docker ”中解释的:Boot2docker使用的Tiny Core没有作为Linux VM的持久性。

您需要确保VirtualBox具有下载的Oracle_VM_VirtualBox_Extension_Pack并添加到Virtual Box / File / Settings / Extension /添加了Oracle_VM_VirtualBox_Extension_Pack-4.x.yy-zzzzz.vbox-extpack文件。

正如boot2docker中所记录的,您将可以访问(从您的Tiny Core ssh会话)到/c/Users/<yourLogin> (即%USERPROFILE%由Virtual Box共享)

我在b2d.bat启动脚本中做的是复制我想要恢复的文件(主要是.ashrc profile.ashrc ,用于http_proxy设置和最喜爱的别名),并将所有其他修改保存在/c/Users/<yourLogin>