While I was going through docker tutorial on Windows 10 machine, I wanted to start over so I deleted Docker and removed VMs created in part 4 of tutorial directly from Hyper-V (without using docker-machine remove).
Now I got to part 4 again with a fresh install of Docker. This is what I get when I try to create a new machine.
> docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1
Host already exists: "myvm1"
ls still lists both machines that I created last time I was going through the tutorial.
>docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
myvm1 - hyperv Unknown
myvm2 - hyperv Unknown
Using kill or rm on any of these machines results in exit status 1. Hyper-V doesn't show any VMs running apart from MobyLinuxVM.
Trying to start or restart either one of VMs results in exit status 1 as well.
Is there a way to remove these VMs from docker-machine?
docker-machine keeps track of known machines using files inside ~/.docker/machine/ - you should be able to find them there, and remove those that you no longer need (make sure to backup if you're not sure)
@thaJeztah Thanks! Issue resolved.
Most helpful comment
docker-machine keeps track of known machines using files inside
~/.docker/machine/- you should be able to find them there, and remove those that you no longer need (make sure to backup if you're not sure)