mitchellh / virtualbox

[ABANDONED] Create and modify virtual machines in VirtualBox using pure ruby.
http://mitchellh.github.com/virtualbox/
MIT License
245 stars 45 forks source link

VM.all cache is not cleared when a VM is destroy #5

Closed KieranP closed 14 years ago

KieranP commented 14 years ago

Goes something like this:

vms = VM.all
vm = VM.find(....)
vm.destroy
vms = VM.all
vms.each { |vm| puts vm.state }

Basically, VM.all is not reloaded/refreshed when a vm is destroyed, causing state calls to error out.

KieranP commented 14 years ago

Infact, any command (start, stop, save, updating settings etc) should really clear the .all cache, so the XML files are re-parsed for any new information.

mitchellh commented 14 years ago

I'm going to mark this as fixed for now, since the VM.all for destroy and save is done, but other areas need to be done as well.