虚拟机使用Vagrant WinNFSd替换共享文件夹

windows下默认虚拟机共享文件夹的方式因为磁盘IO效率太低,可以让windows支持NFS方式共享文件夹给vagrant虚拟机来提升速度

 

开源项目地址:https://github.com/winnfsd/vagrant-winnfsd

安装

$ vagrant plugin install vagrant-winnfsd

 

D:\apps\appspot\python\vps\vagrant_files\develop>vagrant plugin install vagrant-winnfsd
Installing the ‘vagrant-winnfsd’ plugin. This can take a few minutes…
Installed the plugin ‘vagrant-winnfsd (1.2.0)’!

D:\apps\appspot\python\vps\vagrant_files\develop>vagrant plugin list
vagrant-share (1.1.5, system)
vagrant-winnfsd (1.2.0)

 

NFS方式使用vagrant-winnfsd

Vagrantfile 配置

 

在Vagrant.configure(‘2’) do |config| 中加入

Vagrant.configure('2') do |config|
  config.vm.network "private_network", ip: "192.168.56.94"

  #winfsd
  config.winnfsd.logging = "on"
  config.winnfsd.uid = 1
  config.winnfsd.gid = 1
  config.vm.synced_folder "./", "/vagrant", type: "nfs"
end

About 智足者富

http://chenpeng.info

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>