vagrant - 不断同步文件夹设置
vagrant - constantly syncing folder setup
我正在尝试使用 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'
我注意到房东所做的更改会同步到房客,反之则不然。我想让文件夹像共享文件夹一样,来宾和主机都可以对其应用更改。有什么最好的方法吗?
谢谢
您收到的回复是告诉您安装 Virtual Box guest additions。这是您必须在安装 Virtual Box 之上执行的单独安装操作。您是否安装了 Virtual Box Guest Additions?
我正在尝试使用 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'
我注意到房东所做的更改会同步到房客,反之则不然。我想让文件夹像共享文件夹一样,来宾和主机都可以对其应用更改。有什么最好的方法吗? 谢谢
您收到的回复是告诉您安装 Virtual Box guest additions。这是您必须在安装 Virtual Box 之上执行的单独安装操作。您是否安装了 Virtual Box Guest Additions?