However, as akalyaev noted, NFS speeds the heck out of your Vagrant operations, and vagrant-cachier makes setting up NFS shares for your machines' package manager caches simpler. Simply install the plugin:
vagrant plugin install vagrant-cachier
Then, insert the relevant configuration line into your Vagrantfile:
Vagrant.configure("2") do |config| config.vm.box = 'your-box' config.cache.auto_detect = true # If your Vagrantfile provisions multiple VMs, use the following line instead of auto_detect to prevent collisions: #config.cache.scope = :machine # If you are using VirtualBox, you might want to enable NFS for shared folders # config.cache.enable_nfs = true end
The following package managers are managed by vagrant-cachier: APT, Yum, Pacman, Chef, RubyGems, RVM, npm, Composer, and APT-CACHER.