【发布时间】:2019-04-25 16:44:08
【问题描述】:
我在 Visual Studio 2019 中有一个项目。我想学习 Docker 并尝试将我的 2 个 Web 应用程序部署在一个 swarm 中。
当我使用命令时 “docker-machine create -d hyperv --hyperv-virtual-switch “stationext”myvm1” Docker 创建一个虚拟机。我可以在 Hyper-V 管理器中看到它。但是这个虚拟机是 Linux 的。
如何在 Windows 上通过命令“docker-machine create”创建虚拟机?
创建日志
PS C:\WINDOWS\system32> docker-machine create -d hyperv --hyperv-virtual-switch "stationext" myvm3
Running pre-create checks...
Creating machine...
(myvm3) Copying C:\Users\Sergii\.docker\machine\cache\boot2docker.iso to C:\Users\Sergii\.docker\machine\machines\myvm3\boot2docker.iso...
(myvm3) Creating SSH key...
(myvm3) Creating VM...
(myvm3) Using switch "stationext"
(myvm3) Creating VHD
(myvm3) Starting VM...
(myvm3) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Docker\Docker\Resources\bin\docker-machine.exe env myvm3
【问题讨论】:
-
你能分享你用来创建 docker 机器的命令的日志吗?
-
我已将其添加到我的答案中。