Machine: Windows docker-machine rm command should hint to use -force in case of error

Created on 26 Apr 2017  路  2Comments  路  Source: docker/machine

Expected behavior

"Successfully removed myvm1"

Actual behavior

PS C:\Users\xxx> docker-machine rm myvm1
About to remove myvm1
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Error removing host "myvm1": exit status 1
PS C:\Users\xxx>

Information

I had stopped and deleted the VM in Hyper-V. Docker-machine rm command was not finding the VM, so it was exiting in an error. My suggestion is to let people know that there is a "-f" option available to get around this error that would show up in the output after "Error removing host".

A diagnostic was uploaded with id: F8633AE9-1358-4921-8145-B65DA2948E14/2017-04-26_11-46-43

Steps to reproduce the behavior

Stop and delete VMname in Hyper-v
CLI: docker-machine rm VMname

Most helpful comment

Encountered the same issue and with the use of force was able to delete my vms.
docker-machine rm myvm1 --force
docker-machine rm myvm1 --force

All 2 comments

Encountered the same issue and with the use of force was able to delete my vms.
docker-machine rm myvm1 --force
docker-machine rm myvm1 --force

Thank you so much !
omg

Was this page helpful?
0 / 5 - 0 ratings