From 1f99dfa2070cec88adf5402bd62be5d0af5c5247 Mon Sep 17 00:00:00 2001 From: Victoria Bialas Date: Wed, 13 Sep 2017 12:30:15 -0700 Subject: [PATCH] Add more info re: Hyper-V driver for Docker Machine on Windows, cleanup, link topics together (#4609) * add more links and info re: Hyper-V driver for Docker Machine on Windows Signed-off-by: Victoria Bialas * added info on where Machine data lives Signed-off-by: Victoria Bialas * added information about the Hyper-V Manager Signed-off-by: Victoria Bialas * linked between docker-machine create command and other relevant topics Signed-off-by: Victoria Bialas * copyedits Signed-off-by: Victoria Bialas * copyedits, added Examples heading to create driver Signed-off-by: Victoria Bialas * clarifed docker-machine create example Signed-off-by: Victoria Bialas --- docker-for-windows/troubleshoot.md | 14 ++++++++++++++ machine/drivers/hyper-v.md | 14 ++++++++++++++ machine/get-started.md | 2 +- machine/install-machine.md | 10 +++++++++- machine/reference/create.md | 11 +++++++++++ 5 files changed, 49 insertions(+), 2 deletions(-) diff --git a/docker-for-windows/troubleshoot.md b/docker-for-windows/troubleshoot.md index 99f078767c..316186cb9c 100644 --- a/docker-for-windows/troubleshoot.md +++ b/docker-for-windows/troubleshoot.md @@ -325,6 +325,20 @@ off". ![Hyper-V on Windows features](images/hyper-v-enable-status.png ) +#### Hyper-V driver for Docker Machine + +Docker for Windows comes with the legacy tool Docker Machine which uses the old +[`boot2docker.iso`](https://github.com/boot2docker/boot2docker){: +target="_blank" class="_"}, and the [Microsoft Hyper-V +driver](/machine/drivers/hyper-v.md) to create local virtual machines. _This is +tangential to using Docker for Windows_, but if you want to use Docker Machine +to create multiple local VMs, or to provision remote machines, see the [Docker +Machine](/machine/index.md) topics. We mention this here only in case someone is +looking for information about Docker Machine on Windows, which requires that +Hyper-V is enabled, an external network switch is active, and referenced in the +flags for the `docker-machine create` command [as described in the Docker +Machine driver example](/machine/drivers/hyper-v.md#example). + ### Virtualization must be enabled In addition to [Hyper-V](#hyper-v), virtualization must be enabled. diff --git a/machine/drivers/hyper-v.md b/machine/drivers/hyper-v.md index 83b5e7af8a..60fc5a022c 100644 --- a/machine/drivers/hyper-v.md +++ b/machine/drivers/hyper-v.md @@ -134,3 +134,17 @@ you can create these swarm nodes: `manager1`, `worker1`, `worker2`. docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" worker1 docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" worker2 ``` + +## Where to go next + +As a point of interest, the virtual machines you create with the +[`docker-machine create`](/machine/reference/create.md) command show up in the +Hyper-V Manager under "Virtual Machines", but you need to manage them with +[`docker-machine`](/machine/reference/index.md) commands not through the Hyper-V +Manager. + +To get started using `docker-machine` commands, see these topics: + +* [Run containers and experiment with Machine commands](/machine/get-started.md#run-containers-and-experiment-with-machine-commands) and the introductory topics that follow + +* [Docker Machine commmand line reference](/machine/reference/index.md) diff --git a/machine/get-started.md b/machine/get-started.md index 204e28fe04..48362f907d 100644 --- a/machine/get-started.md +++ b/machine/get-started.md @@ -126,7 +126,7 @@ choose another name for this new machine. * 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.) - * 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.) + * 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.) $ docker-machine create --driver virtualbox default Running pre-create checks... diff --git a/machine/install-machine.md b/machine/install-machine.md index bc36b4f50d..22f02bacdb 100644 --- a/machine/install-machine.md +++ b/machine/install-machine.md @@ -94,13 +94,21 @@ To uninstall Docker Machine: To remove each machine individually: `docker-machine rm ` - To remove all machines: `docker-machine rm -f $(docker-machine ls -q)` + To remove all machines: `docker-machine rm -f $(docker-machine ls -q)` (you might need to use `-force` on Windows) Removing machines is an optional step because there are cases where you might want to save and migrate existing machines to a [Docker for Mac](/docker-for-mac/index.md) or [Docker for Windows](/docker-for-windows/index.md) environment, for example. +>**Note**: As a point of information, the `config.json`, certificates, +and other data related to each virtual machine created by `docker-machine` +is stored in `~/.docker/machine/machines/` on Mac and Linux and in +`~\.docker\machine\machines\` on Windows. We recommend that you do not edit or +remove those files directly as this will only affect information for the Docker +CLI, not the actual VMs, regardless of whether they are local or on remote +servers. + ## Where to go next - [Docker Machine overview](overview.md) diff --git a/machine/reference/create.md b/machine/reference/create.md index 0deeb78bd3..f8706a1067 100644 --- a/machine/reference/create.md +++ b/machine/reference/create.md @@ -8,6 +8,17 @@ Create a machine. Requires the `--driver` flag to indicate which provider (VirtualBox, DigitalOcean, AWS, etc.) the machine should be created on, and an argument to indicate the name of the created machine. +> Looking for the full list of available drivers? +> +>For a full list of drivers that work with `docker-machine create` and +information on how to use them, see [Machine +drivers](/machine/drivers/index.md). +{: .important} + +## Example + +Here is an example of using the `--virtualbox` driver to create a machine called `dev`. + ```none $ docker-machine create --driver virtualbox dev Creating CA: /home/username/.docker/machine/certs/ca.pem