candidtim / vagrant-appindicator

Vagrant Application Indicator for Ubuntu
GNU General Public License v3.0
49 stars 7 forks source link

Query VMs state on startup #7

Open candidtim opened 9 years ago

candidtim commented 9 years ago

It is often the case that some VMs may be left in an "inconsistent" state after system restart: some running VMs may have been killed while this will be not tracked in vagrant's machine-index, which is used as the data source for the indicator. As a result, after restart, Vagrant AppIndicator shows VMs as running, while they are actually shut down.

As Vagrant's machine-index doesn't provide means to track these changes made outside of Vagrant, AppIndicator might query Vagrant to find out the states of all known machines. Querying just once att AppIndicator start will cover most of the desynchronization cases.

candidtim commented 8 years ago

Note, vagrant global-status --prune seems to do the thing.