docker : 创建机器时, VT-X/AMD 尚未启用
docker : When creating a machine, VT-X/AMD is enabled yet
我正在学习本教程
Dockerizing Flask With Compose and Machine - From Localhost to the Cloud
尝试使用以下命令创建虚拟机时
docker-machine create -d virtualbox dev;
我有以下错误
Error creating machine : Error in driver during machine creation. This computer doesn't have VT-X/AMD enabled. Enabling it in the BIOS is mandatory
(补充:我是 运行 一个虚拟盒子上的 ubuntu 图像。物理主机是一台 windows 机器。VT VT-X/AMD
都启用了,在 bios 和 virtualbox 中。)
在这里和那里阅读,这似乎是一种正常行为,因为我正在尝试在 virtualbox 中创建一个 virtualbox -> Click here for the explanation
我应该使用什么命令而不是 docker-machine
?
欢迎任何见解...
更新:在@VonC 最初回答后,我又问了 3 个问题。请在下面找到问题,斜体
1) 我应该如何让 virtualbox 和 docker 配置看到新的 "virtualbox"?
2) ubuntu 框能否在该主机上执行 docker-compose 和构建容器?
3) 如果我正在拉取像 debian 这样的镜像,我如何将它用作一台机器并在其上构建一个容器?
I'm in a VM already , running ubuntu. Physical host is a windows machine
那你就不需要docker-machine了。
您将从 windows 创建一个小的 Linux 图像(再次输入常规 Windows CMD shell)
docker-machine create -d virtualbox dev
但是在 full-fledged Ubuntu VM 上,您只需要直接 install docker 和 运行 它即可。
如果您需要使用 docker-machine,只需复制(在 Windows 上)v0.6.0-rc1/docker-machine_windows-amd64.exe
作为 docker-machine.exe 到任何您想要的地方。
另外:set VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
(如果你的 VirtualBox 安装在那里)
您现在可以使用 docker-machine -d virtualbox dev
.
2) Will the ubuntu box, be able to do the docker-compose and build the container on that host?
是的,没问题。 The installation is straightforward.
3) If I'm pulling an image like debian, how can I use it as a machine and build an container on top of it?
您只需写一个以 FROM debian:jessie
开头的 Dockerfile
(参见 an example here),添加一些命令(RUN
、COPY
、...) : 例如:
FROM debian:stable
RUN apt-get update && apt-get install -y --force-yes apache2
EXPOSE 80 443
VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"]
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
构建它 (docker build .
) 并 运行 它 (docker run
)。
如果您不想更改 BIOS 设置,请运行以下命令。
我有同样的问题,因为我的 Windows 8 服务器中安装了 Hyper-V 管理器。为了避免这个问题,我 运行 下面的选项
--virtualbox-no-vtx-check
Example: docker-machine create default --virtualbox-no-vtx-check
我正在学习本教程
Dockerizing Flask With Compose and Machine - From Localhost to the Cloud
尝试使用以下命令创建虚拟机时
docker-machine create -d virtualbox dev;
我有以下错误
Error creating machine : Error in driver during machine creation. This computer doesn't have VT-X/AMD enabled. Enabling it in the BIOS is mandatory
(补充:我是 运行 一个虚拟盒子上的 ubuntu 图像。物理主机是一台 windows 机器。VT VT-X/AMD
都启用了,在 bios 和 virtualbox 中。)
在这里和那里阅读,这似乎是一种正常行为,因为我正在尝试在 virtualbox 中创建一个 virtualbox -> Click here for the explanation
我应该使用什么命令而不是 docker-machine
?
欢迎任何见解...
更新:在@VonC 最初回答后,我又问了 3 个问题。请在下面找到问题,斜体
1) 我应该如何让 virtualbox 和 docker 配置看到新的 "virtualbox"?
2) ubuntu 框能否在该主机上执行 docker-compose 和构建容器?
3) 如果我正在拉取像 debian 这样的镜像,我如何将它用作一台机器并在其上构建一个容器?
I'm in a VM already , running ubuntu. Physical host is a windows machine
那你就不需要docker-machine了。
您将从 windows 创建一个小的 Linux 图像(再次输入常规 Windows CMD shell)
docker-machine create -d virtualbox dev
但是在 full-fledged Ubuntu VM 上,您只需要直接 install docker 和 运行 它即可。
如果您需要使用 docker-machine,只需复制(在 Windows 上)v0.6.0-rc1/docker-machine_windows-amd64.exe
作为 docker-machine.exe 到任何您想要的地方。
另外:set VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
(如果你的 VirtualBox 安装在那里)
您现在可以使用 docker-machine -d virtualbox dev
.
2) Will the ubuntu box, be able to do the docker-compose and build the container on that host?
是的,没问题。 The installation is straightforward.
3) If I'm pulling an image like debian, how can I use it as a machine and build an container on top of it?
您只需写一个以 FROM debian:jessie
开头的 Dockerfile
(参见 an example here),添加一些命令(RUN
、COPY
、...) : 例如:
FROM debian:stable
RUN apt-get update && apt-get install -y --force-yes apache2
EXPOSE 80 443
VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"]
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
构建它 (docker build .
) 并 运行 它 (docker run
)。
如果您不想更改 BIOS 设置,请运行以下命令。 我有同样的问题,因为我的 Windows 8 服务器中安装了 Hyper-V 管理器。为了避免这个问题,我 运行 下面的选项
--virtualbox-no-vtx-check
Example: docker-machine create default --virtualbox-no-vtx-check