Docker安装使用常见错误

一、启动Docker Toolbox如果出现下面的问题

VBoxManage.exe: error: Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

解决方法:

#管理员身份运行cmd关闭Microsoft-Hyper-V,提示重启选择y
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

#如果需要开启Hyper-V虚拟化管理员身份运行cmd
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V

二、安装过Docker Toolbox,卸载后,重新安装,Docker Quickstart Termial无法正常使用,提示:

Running pre-create checks...
Error with pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. If it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Looks like something went wrong in step ´Checking if machine default exists´

解决方法:

1.以管理员方式打开cmd,输入以下命令。(第二行命令参考第一行命令返回的结果)

C:\>bcdedit /copy {current} /d "No Hyper-V" 
The entry was successfully copied to {ff-23-113-824e-5c5144ea}. 

C:\>bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off 
The operation completed successfully.

2.重启电脑,选择No Hyper-V 系统,进入电脑。

4.3.下载安装Docker Toolbox。打开安装目录,找到start.sh。

编辑start.sh,找到下面的代码片段:
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"

#将其改为:

"${DOCKERMACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"

6.5.可以正常使用Docker Quickstart Termial了。

猜你喜欢

转载自blog.51cto.com/qiangsh/2164939