最近、開発環境をセットアップするために Vagrant を使い始めました。私は、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 ホスト上で、Vagrant 用の Hyper-V プロバイダーを使用しています。