【发布时间】:2016-02-08 07:58:48
【问题描述】:
我正在尝试使用 virtualbox 在我的 windows10 上构建一个 centos7 虚拟机。我正在使用 cento/7 盒子。
它默认使用 rsync 同步文件夹,我不太喜欢它,因为我必须打开一个额外的 cmd 才能运行 vagrant rsync-auto 以进行持续同步。
我尝试使用 nfs 但没有成功。
这是我的流浪文件。
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.synced_folder ".", "/home/vagrant/sync", type: "nfs"
end
当我尝试运行它时。它给了我这个。
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` home_vagrant_sync /home/vagrant/sync
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` home_vagrant_sync /home/vagrant/sync
The error output from the last command was:
mount: unknown filesystem type 'vboxsf'
我注意到主机所做的更改将同步到访客,但反之则不会。我想让文件夹像共享文件夹一样,来宾和主机都可以对其应用更改。有什么最好的方法吗? 谢谢。
【问题讨论】:
标签: windows centos vagrant virtualbox centos7