Skip to content

Commit 1f99dfa

Browse files
Add more info re: Hyper-V driver for Docker Machine on Windows, cleanup, link topics together (docker#4609)
* add more links and info re: Hyper-V driver for Docker Machine on Windows Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * added info on where Machine data lives Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * added information about the Hyper-V Manager Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * linked between docker-machine create command and other relevant topics Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * copyedits Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * copyedits, added Examples heading to create driver Signed-off-by: Victoria Bialas <victoria.bialas@docker.com> * clarifed docker-machine create example Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
1 parent e750dca commit 1f99dfa

File tree

5 files changed

+49
-2
lines changed

5 files changed

+49
-2
lines changed

docker-for-windows/troubleshoot.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,20 @@ off".
325325
326326
![Hyper-V on Windows features](images/hyper-v-enable-status.png )
327327
328+
#### Hyper-V driver for Docker Machine
329+
330+
Docker for Windows comes with the legacy tool Docker Machine which uses the old
331+
[`boot2docker.iso`](https://github.com/boot2docker/boot2docker){:
332+
target="_blank" class="_"}, and the [Microsoft Hyper-V
333+
driver](/machine/drivers/hyper-v.md) to create local virtual machines. _This is
334+
tangential to using Docker for Windows_, but if you want to use Docker Machine
335+
to create multiple local VMs, or to provision remote machines, see the [Docker
336+
Machine](/machine/index.md) topics. We mention this here only in case someone is
337+
looking for information about Docker Machine on Windows, which requires that
338+
Hyper-V is enabled, an external network switch is active, and referenced in the
339+
flags for the `docker-machine create` command [as described in the Docker
340+
Machine driver example](/machine/drivers/hyper-v.md#example).
341+
328342
### Virtualization must be enabled
329343
330344
In addition to [Hyper-V](#hyper-v), virtualization must be enabled.

machine/drivers/hyper-v.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,17 @@ you can create these swarm nodes: `manager1`, `worker1`, `worker2`.
134134
docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" worker1
135135
docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" worker2
136136
```
137+
138+
## Where to go next
139+
140+
As a point of interest, the virtual machines you create with the
141+
[`docker-machine create`](/machine/reference/create.md) command show up in the
142+
Hyper-V Manager under "Virtual Machines", but you need to manage them with
143+
[`docker-machine`](/machine/reference/index.md) commands not through the Hyper-V
144+
Manager.
145+
146+
To get started using `docker-machine` commands, see these topics:
147+
148+
* [Run containers and experiment with Machine commands](/machine/get-started.md#run-containers-and-experiment-with-machine-commands) and the introductory topics that follow
149+
150+
* [Docker Machine commmand line reference](/machine/reference/index.md)

machine/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ choose another name for this new machine.
126126

127127
* If you are using Toolbox on Mac, Toolbox on older Windows systems without Hyper-V, or Docker for Mac, use `virtualbox` as the driver, as shown in this example. (The Docker Machine VirtualBox driver reference is [here](drivers/virtualbox.md).) (See [prerequisites](get-started.md#prerequisite-information) above to learn more.)
128128

129-
* On Docker for Windows systems that support Hyper-V, use the `hyperv` driver as shown in the [Docker Machine Microsoft Hyper-V driver reference](drivers/hyper-v.md). (See [prerequisites](get-started.md#prerequisite-information) above to learn more.)
129+
* On Docker for Windows systems that support Hyper-V, use the `hyperv` driver as shown in the [Docker Machine Microsoft Hyper-V driver reference](drivers/hyper-v.md) and follow the [example](/machine/drivers/hyper-v.md#example), which shows how to use an external network switch and provides the flags for the full command. (See [prerequisites](get-started.md#prerequisite-information) above to learn more.)
130130

131131
$ docker-machine create --driver virtualbox default
132132
Running pre-create checks...

machine/install-machine.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,21 @@ To uninstall Docker Machine:
9494

9595
To remove each machine individually: `docker-machine rm <machine-name>`
9696

97-
To remove all machines: `docker-machine rm -f $(docker-machine ls -q)`
97+
To remove all machines: `docker-machine rm -f $(docker-machine ls -q)` (you might need to use `-force` on Windows)
9898

9999
Removing machines is an optional step because there are cases where you might
100100
want to save and migrate existing machines to a [Docker for
101101
Mac](/docker-for-mac/index.md) or [Docker for
102102
Windows](/docker-for-windows/index.md) environment, for example.
103103

104+
>**Note**: As a point of information, the `config.json`, certificates,
105+
and other data related to each virtual machine created by `docker-machine`
106+
is stored in `~/.docker/machine/machines/` on Mac and Linux and in
107+
`~\.docker\machine\machines\` on Windows. We recommend that you do not edit or
108+
remove those files directly as this will only affect information for the Docker
109+
CLI, not the actual VMs, regardless of whether they are local or on remote
110+
servers.
111+
104112
## Where to go next
105113

106114
- [Docker Machine overview](overview.md)

machine/reference/create.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ Create a machine. Requires the `--driver` flag to indicate which provider
88
(VirtualBox, DigitalOcean, AWS, etc.) the machine should be created on, and an
99
argument to indicate the name of the created machine.
1010

11+
> Looking for the full list of available drivers?
12+
>
13+
>For a full list of drivers that work with `docker-machine create` and
14+
information on how to use them, see [Machine
15+
drivers](/machine/drivers/index.md).
16+
{: .important}
17+
18+
## Example
19+
20+
Here is an example of using the `--virtualbox` driver to create a machine called `dev`.
21+
1122
```none
1223
$ docker-machine create --driver virtualbox dev
1324
Creating CA: /home/username/.docker/machine/certs/ca.pem

0 commit comments

Comments
 (0)