Search code examples
macosdockerboot2docker

How to fix "error in run: Failed to get machine "boot2docker-vm": machine does not exist"?


Running boot2docker with the start|info|stop|delete arguments result in an error message:

snowch$ boot2docker start
error in run: Failed to get machine "boot2docker-vm": machine does not exist    
snowch$ boot2docker info
error in run: Failed to get machine "boot2docker-vm": machine does not exist
snowch$ boot2docker stop
error in run: Failed to get machine "boot2docker-vm": machine does not exist
snowch$ boot2docker delete
error in run: Failed to get machine "boot2docker-vm": machine does not exist

The init error was slightly different

snowch$ boot2docker init
error in run: Failed to initialize machine "boot2docker-vm": exit status 1

How can I fix this?


Solution

  • In the end, I removed the boot2docker-vm virtual machine:

    snowch$ rm -rfi ~/VirtualBox\ VMs/boot2docker-vm/
    

    Original source of the answer: https://github.com/boot2docker/boot2docker/issues/436

    Note: this method is probably the quickest but you will lose your existing boot2docker virtual machine. If you want to keep your existing boot2docker virtual machine, you could try Patrick Henning's answer