-
-
Notifications
You must be signed in to change notification settings - Fork 647
Windows and vagrant-cachier #736
Comments
Hmm... I hadn't thought about that when adding the config. I'm testing a fix now that will simply use the same sync type as the default folder—e.g. |
Though for compatibility, we could just drop the entire |
I'm going to drop the config for now—trying to change the Testing, then will push this up. |
@morsok - Can you see if the latest |
Yeah I agree that the performance isn't really significant here. Thank you for your diligence ! I'll try to bother my team mate to test the master on his windows machine (I don't know if I can get a license key to test it myself ? any idea ?) |
i used this plugin https://github.com/winnfsd/vagrant-winnfsd and now cachier works like a charm on Windows 10 WSL required_plugins = %w(vagrant-disksize vagrant-hostmanager vagrant-vbguest vagrant-clean vagrant-cachier)
plugin_installed = false
required_plugins.each do |plugin|
unless Vagrant.has_plugin?(plugin)
system "vagrant plugin install #{plugin}"
if Vagrant::Util::Platform.windows?
system "vagrant plugin install vagrant-winnfsd"
end
plugin_installed = true
end
end
# If new plugins installed, restart Vagrant process
if plugin_installed === true
exec "vagrant #{ARGV.join' '}"
end
config.vm.box = 'ubuntu/bionic64'
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
# OPTIONAL: If you are using VirtualBox, you might want to use that to enable
# NFS for shared folders. This is also very useful for vagrant-libvirt if you
# want bi-directional sync
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the
# NLM sideband protocol. Without this option, apt-get might hang if it tries
# to lock files needed for /var/cache/* operations. All of this can be avoided
# by using NFSv4 everywhere. Please note that the tcp option is not the default.
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
# For more information please check http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
end
config.vm.synced_folder ".", "/vagrant", type: "nfs" |
Hello,
If you have vagrant-cachier, the Vagrantfile totally ignores the synced folder type and tries to use NFS.
However it will not work since you are on windows !
I think there is two solutions here, either use the provided type (by config.yml) if possible, or ignore the vagrant-cachier configuration if the provided type is not 'nfs'
I had to delete the vagrant-cachier plugin as a workaround on the windows hosts to make the vm work.
The text was updated successfully, but these errors were encountered: