最近,我开始使用Vagrant来设置dev环境。我已经能够用Packer构建一个基本框,并在稍后使用powershell脚本提供/配置VM。
我想安装的一些软件都保存在共享驱动器上。在启动机器时,我想将它作为同步文件夹挂载。
我尝试了以下几点:
config.vm.synced_folder "\\\\corp\\dfs", "/DFS", type: "smb"我也试过//corp/dfs,但没有用。
我提供凭据并得到以下错误:
Exporting an SMB share failed! Details about the failure are shown
below. Please inspect the error message and correct any problems.
Host path: //corp/dfs
Stderr: The syntax of this command is:
NET SHARE
sharename
sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
[/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | BranchCache | None]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | BranchCache | None]
{sharename | devicename | drive:path} /DELETE
sharename \\computername /DELETE
Error:
Stdout:我在Windows主机上使用Hyper提供的Vagrant。
发布于 2016-03-30 18:18:13
在我看来,这里有两种可能的方法:
Vagrantfile中的synced_folder形式提供到该挂载点的路径。您的当前方法是尝试并让Vagrantfile动态生成挂载点。我不知道这是否可能,但上述两种方法中的一种肯定更可靠,更易于调试,而且更容易出错。
https://stackoverflow.com/questions/36308032
复制相似问题