`vagrant up`:rsync错误:某些文件/ attrs未被传输

时间:2017-09-28 18:42:58

标签: vagrant

我在Windows 10 x64上使用vagrant 2.0.0

VirtualBox vesion是5.1.28

Vagrant box是centos7 v1708.01,https://app.vagrantup.com/centos/boxes/7

Vagrantfile是这样的:

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


Vagrant.configure("2") do |config|

  config.vm.box = "base"
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.synced_folder "www", "/var/www"

end

我已使用此命令安装vagrant-vbguest

$ vagrant plugin install vagrant-vbguest

运行vagrant up时,出现错误:

dell@DESKTOP-OKFHT30 MINGW64 /d/vagrant_env
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 80 (guest) => 8080 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 5.1.28 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Rsyncing folder: /d/vagrant_env/ => /vagrant
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /d/vagrant_env/
Guest path: /vagrant
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--chmod=ugo=rwX" "--no-perms" "--no-owner" "--                                                                       no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 2222 -o LogLevel=FATAL   -o IdentitiesOnly=yes -o StrictHostKeyCheck                                                                       ing=no -o UserKnownHostsFile=/dev/null -i 'D:/vagrant_env/.vagrant/machines/default/virtualbox/private_key'" "--exclud                                                                       e" ".vagrant/" "/d/vagrant_env/" "vagrant@127.0.0.1:/vagrant"
Error: This rsync lacks old-style --compress due to its external zlib.  Try -zz.
Continuing without compression.

rsync: change_dir "/d/vagrant_env" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

我该怎么办?

0 个答案:

没有答案