Vagrant在windows上搜索rsync表单

时间:2017-07-24 11:14:32

标签: vagrant vagrantfile vagrant-windows vagrant-provision

这是Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.define :sylius do |sylius_config|
        sylius_config.vm.box = "debian/jessie64"

        sylius_config.vm.provider "virtualbox" do |v|
            v.gui = false
            v.memory = 1024
            v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
        end

        sylius_config.vm.synced_folder "sites/", "/var/www/sites", type: "smb" ,mount_options: ['rw', 'vers=3', 'tcp', 'fsc', 'nolock', 'actimeo=2']
        sylius_config.vm.network "private_network", ip: "10.0.0.200"

        # Shell provisioning
        sylius_config.vm.provision :shell, :path => "shell_provisioner/run.sh"
        sylius_config.vm.provision :shell, privileged: false, path: "shell_provisioner/module/sylius.sh"
    end
end

当我输入vagrant时,我得到了这个:

==> sylius: Checking if box 'debian/jessie64' is up to date...
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH

共享类型是“smb”,我可以看到为什么vagrant正在搜索rsync。有任何想法吗?如果重要的话,我正在使用virtualbox作为提供者。我尝试删除类型参数,但它不起作用。当我复制Vagrantfile时,共享类型为“nsf”,这需要rsync。

1 个答案:

答案 0 :(得分:0)

此框包含rsync类型的默认同步文件夹。

如果您查找方框的Vagrantfile(在mac上,在〜/ .vagrant.d / boxes / debian-VAGRANTSLASH-jessie64 // virtualbox / Vagrantfile下)

Vagrant.configure("2") do |config|
  config.vm.base_mac = "0800278dc04d"
  config.vm.synced_folder ".", "/vagrant", type: "rsync"
  config.vm.post_up_message = "Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports"
   #TODO check if this is still needed now that we use import2vox
  config.vm.provider "virtualbox" do |v|
      v.customize ["modifyvm", :id, "--cableconnected1", "on"]
  end

end

您需要编辑此文件并更改此文件,或者在当前的Vagrantfile中,覆盖默认类型或smb类型。