Win7,docker安装后,创建虚拟机分配不了ip错误 err: exit status 255

背景

项目 参数
操作系统 win7 64位
ToolBox来源 国内镜像
TookBox版本 DockerToolbox-18.03.0-ce.exe

错误信息

Error getting IP address: ssh command error:
command : ip addr show
err     : exit status 255

卸载

  • Deleted all docker VMs
    先在 Oracle VM VirtualBox 管理器中关闭正在使用的虚拟机

    关闭之后,右击 default->【删除...】

    选择【删除所有文件】

  • Removed all "Host-only Networks" from VirtualBox -> Preferences -> Network
    这一步,在 Oracle VM VirtualBox 管理器中【管理】->【主机网络管理器...】,

  • Uninstalled VirtualBox
    打开【控制面板】->【卸载程序】,找到 Oracle VM VirtualBox 5.2.8 并卸载,找到 Docker Toolbox version 18.03.0-ce 并卸载

检查虚拟化

原本让我重装 VirtualBox,我尝试过但是失败了,所以我又去读了一下文档:https://docs.docker.com/toolbox/overview/,切换到 Install ToolBox on Windows

Step 1: Check your version
      1. // ....(balabala~省略)
      2. Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled.
            For Windows 7 Run a tool like the Microsoft® Hardware-Assisted Virtualization Detection Tool or Speccy, and follow the on-screen instructions.

大概意思就是检查一下你的 Win7 电脑是否开启虚拟化了,我下载的检测工具是 Microsoft® Hardware-Assisted Virtualization Detection Tool
后来双击 _havdetectiontool.exe _ 发现我是真的没开启。

解决方案:如何在win7的BIOS中开启虚拟化

重新安装

  • 这一步我没有选择安装 Git For Windows
  • 我选择勾选 Install VirtualBox with NDIS5 driver(default NDIS6),默认是没有勾选上的

为什么这么选择呢?

我在写这篇文章之前,参考的是 https://www.cnblogs.com/ydymz/p/10058648.html 这篇博客的做法:

Deleted all docker VMs (default, my-default etc.)
    
Removed all "Host-only Networks" from VirtualBox -> Preferences -> Network
    
Uninstalled VirtualBox
   
Downloaded the latest VirtualBox installation file i.e. "VirtualBox-5.0.20-106931-Win.exe"
    
Installed VirtualBox by running following command from Windows terminal:
C:\Users\Home\Downloads>VirtualBox-5.0.20-106931-Win.exe -msiparams NETWORKTYPE=NDIS5
    
Completed the VirtualBox installation by following the prompts
    
Ran Docker Quickstart Terminal which finally created and started the "default" VM successfully.


所以我这边安装时选择了 Install VirtualBox with NDIS5 driver(default NDIS6)

成功

留张图证明自己确实解决过这个问题!(PS:因为最上面出现问题的图是从别人那边Copy的)

posted @ 2020-09-02 08:24  极客子羽  阅读(1074)  评论(0编辑  收藏  举报