Hey Yaniv,

The vagrant docs actually have the following paragraph on: 
https://docs.vagrantup.com/v2/cli/global-status.html

> This command doesn't actively verify the state of the machines listed, and is 
> instead based on a cache. Because of this, it is possible to see stale 
> results (machines say they're running but they're not). For example, if you 
> restart your computer, Vagrant wouldn't know. To prune the invalid entries, 
> run global status with the --prune flag.

And it shows in my help output. Try upgrading your vagrant version? 

I'm glad we figured it out though!

- Seth

On Oct 2, 2014, at 12:02 PM, Yaniv Ben Yosef <[email protected]> wrote:

> Thanks Seth! I was sure I wasn't the first one to come across this problem, 
> and I did search for it, but didn't find the answer you pointed out.
> Anyway, your solution worked great for me. 
> As a note to the Vagrant developers:
> 1. please add this to the documentation
> 2. more importantly, please add the --prune to the command line help printout
> 
> Thank you!
> Yaniv
> 
> On Thursday, October 2, 2014 9:46:43 PM UTC+3, Seth Vargo wrote:
> Hey Yaniv,
> 
> This can be a bit confusing, and it looks like other people have had this 
> issue before: 
> http://stackoverflow.com/questions/24440142/removing-list-of-vms-in-vagrant-cache.
>  The cache is just that (a cache). You can prune the cache like this:
> 
>     vagrant global-status --prune
> 
> Hope that helps!
> 
> - Seth
> 
> On Oct 2, 2014, at 11:26 AM, Yaniv Ben Yosef <[email protected]> wrote:
> 
>> Hi,
>> 
>> I deleted a project directory that had a Vagrant file with single VM. 
>> Unfortunately, that VM was still running when I deleted the environment. The 
>> deletion included the Vagrantfile and the .vagrant directory.
>> Then when I executed vagrant global-status, I got the following output:
>> 
>> 
>> id       name    provider   state    directory                               
>>  
>> ------------------------------------------------------------------------------
>>  
>> c88547e  default virtualbox poweroff 
>> /Users/yaniv/IdeaProjects/auxlinux-integ  
>> 3a4c20f  host0   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>   
>> 9243526  host1   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>   
>> bc31c93  host2   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>   
>> 3ed6252  default virtualbox running  /Users/yaniv/dev/mi/mi-saf              
>>   
>> a3b2d05  default virtualbox poweroff /Users/yaniv/dev/scala-e2e-testing      
>>  
>> 
>> When changed the directory to /Users/yaniv/dev/mi/mi-saf, and executed 
>> vagrant destroy 3ed6252, I got the following message:
>> 21:04 $ vagrant destroy 3ed6252
>> ==> default: VM not created. Moving on...
>> 
>> After that, I opened VirtualBox, and removed the vm manually via the UI. 
>> However, vagrant still returns the following list:
>> 
>> id       name    provider   state    directory                               
>>  
>> ------------------------------------------------------------------------------
>> c88547e  default virtualbox poweroff 
>> /Users/yaniv/IdeaProjects/auxlinux-integ 
>> 3a4c20f  host0   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>  
>> 9243526  host1   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>  
>> bc31c93  host2   virtualbox aborted  /Users/yaniv/dev/ansible-tuto           
>>  
>> 3ed6252  default virtualbox running  /Users/yaniv/dev/mi/mi-saf              
>>  
>> a3b2d05  default virtualbox poweroff /Users/yaniv/dev/scala-e2e-testing      
>>  
>> 
>> Any idea how I can tell Vagrant to remove this VM?
>> 
>> 
>> Thanks,
>> Yaniv
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Vagrant" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to