windows - vagrant - 不断同步文件夹设置

标签 windows centos vagrant virtualbox centos7

我正在尝试使用 virtualbox 在我的 windows10 上构建一个 centos7 虚拟机。我正在使用 cento/7 盒子。 它默认使用 rsync 同步文件夹,我不太喜欢它,因为我必须打开一个额外的 cmd 才能运行 vagrant rsync-auto 以进行持续同步。 我尝试使用 nfs 但没有成功。 这是我的 vagrantfile。

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'

我注意到主机所做的更改将同步到 guest ,但反之则不然。我想让文件夹像共享文件夹一样, guest 和主机都可以对其应用更改。有什么最好的方法吗? 谢谢。

最佳答案

你得到的回复是告诉你安装 Virtual Box guest additions。这是您必须在安装 Virtual Box 之上执行的单独安装操作。您是否安装了 Virtual Box Guest Additions?

关于windows - vagrant - 不断同步文件夹设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33579200/

相关文章:

c++ - 确定由 Windows GUI 操作触发的基础调用

javascript - 启动桌面应用程序的网页

mono - 构建 Mono 时编译错误。已经安装了 2.10,提示我需要 2.4?

python - 在 CentOS 上安装 Node Js - ImportError : No Module named bz2

c - 在 Visual Studio 中构建大量小工具有什么好方法?

linux - 带有 Slimerjs 的 CasperJS - Xlib : extension "RANDR" missing on display ":99"

macos - 我怎样才能杀死正在使用端口 8080 的任何进程,以便我可以 Vagrant ?

windows - 自从 Docker 工具箱在 Windows 上安装后,Vagrant 不起作用

proxy - 如何在代理环境中使用 vagrant?

安装 VS 2015 后 Windows 10 在启动时卡住