From 0b25051569b5f240543a1e0cd24f97d31dadd797 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Tue, 4 Feb 2014 14:24:18 +0900 Subject: [PATCH] add kvm support Signed-off-by: Hiroshi Miura --- README.md | 1 + lib/vagrant-cachier/plugin.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 27b0394..67d836c 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ http://fgrehm.viewdocs.io/vagrant-cachier. * [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc) * [VMware providers](http://www.vagrantup.com/vmware) with NFS enabled (See [GH-24](https://github.com/fgrehm/vagrant-cachier/issues/24) for more info) +* [vagrant-kvm] ## Contributing diff --git a/lib/vagrant-cachier/plugin.rb b/lib/vagrant-cachier/plugin.rb index c6c638f..65d9961 100644 --- a/lib/vagrant-cachier/plugin.rb +++ b/lib/vagrant-cachier/plugin.rb @@ -81,6 +81,12 @@ module VagrantPlugins require 'vagrant-lxc/action' hook.before Vagrant::LXC::Action::Boot, Action::EnsureSingleCacheRoot end + + if defined?(Vagrant::ProviderKVM) + # XXX + require 'vagrant-kvm/action' + hook.before Vagrant::PrividerKVM::Action::Boot, Action::EnsureSingleCacheRoot + end end action_hook 'ensure-single-cache-root-exists-on-up', :machine_action_up, &ensure_single_cache_root action_hook 'ensure-single-cache-root-exists-on-reload', :machine_action_reload, &ensure_single_cache_root