Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant can't use the requested machine because it is locked

I have tried to access my projects sites that I have set up on homestead, they were working all fine before, and I haven't been working on them for few weeks, but today when I have tried to access them I couldn't open the sites. I have tried to run vagrant ssh but I get this error:

  VM must be running to open SSH connection. Run `vagrant up`
  to start the virtual machine.

And when I try to do vagrant up, I get:

  Vagrant can't use the requested machine because it is locked! This
  means that another Vagrant process is currently reading or modifying
  the machine. Please wait for that Vagrant process to end and try
  again. Details about the machine are shown below:

  Name: default
  Provider: virtualbox

When I do:

 vagrant status 'idOfTheMachine'

I get:

vagrant status 'idOfTheMachine'
/Users/myName/Homestead/Vagrantfile:4: warning: already initialized constant VAGRANTFILE_API_VERSION
/Users/myName/Homestead/Vagrantfile:4: warning: previous definition of VAGRANTFILE_API_VERSION was here
Current machine states:

default                   poweroff (virtualbox)

The VM is powered off. To restart the VM, simply run `vagrant up`

When I have opened virtualbox, and tried to see the shared folders, I could see the shared folders in the terminal but not the projects inside of them. I have googled around about this issue, but can't find any solution to it. Should I destroy the homestead machine on the virtual box and make a new one, and if so, how to make that properly, so that I have the same projects on the new machine?

like image 357
Ludwig Avatar asked Apr 16 '16 17:04

Ludwig


1 Answers

On Windows, I killed my Ruby processes and then was able to successfully run 'vagrant halt' and then 'vagrant up'.

like image 127
Paul Munsey Avatar answered Sep 22 '22 01:09

Paul Munsey