如何在vagrant中禁用同步文件夹的自动装载?

如何在vagrant中禁用同步文件夹的自动装载?,vagrant,vagrantfile,Vagrant,Vagrantfile,我正在为vagrant编写一个配置脚本,在安装同步文件夹之前需要执行一些操作。 文档使用disabled:true标志指定了一种普通禁用装载的方法,但也有对定义共享但不自动装载的方法的引用 线程引用: 代码中的注释(第55行): 例如,该线程建议使用nil作为来宾路径 config.vm.synced_folder "./", nil, id: 'application_root' 但是在vagrant 1.7.2中这样做会在尝试运行资源调配时返回一个错误 There are errors

我正在为vagrant编写一个配置脚本,在安装同步文件夹之前需要执行一些操作。 文档使用
disabled:true
标志指定了一种普通禁用装载的方法,但也有对定义共享但不自动装载的方法的引用

线程引用:

代码中的注释(第55行):

例如,该线程建议使用
nil
作为来宾路径

config.vm.synced_folder "./", nil, id: 'application_root'
但是在vagrant 1.7.2中这样做会在尝试运行资源调配时返回一个错误

There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The shared folder guest path must be absolute: 
有什么想法吗


在我的情况下,我只关心vbox提供程序。

也许可以解释一下为什么只有在设置完成后才需要同步文件夹。可能有另一种修复方法。在配置期间,我可能必须运行内核更新,这意味着如果机器停止,将无法安装同步文件夹,因为vbox内核模块的版本不正确。因此,我们的想法是让每个流浪汉都去检查模块是否已加载。如果没有,则构建它们,最后手动装载同步文件夹。
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The shared folder guest path must be absolute: