diff --git a/lib/vagrant-libvirt.rb b/lib/vagrant-libvirt.rb index 0eb3619..e1929e9 100644 --- a/lib/vagrant-libvirt.rb +++ b/lib/vagrant-libvirt.rb @@ -13,6 +13,12 @@ module VagrantPlugins end end +begin + require 'vagrant' +rescue LoadError + raise 'The Vagrant Libvirt plugin must be run within Vagrant.' +end + # This is a sanity check to make sure no one is attempting to install # this into an early Vagrant version. if Vagrant::VERSION < '1.5.0'