・vagrant 1.9.1
・MacOs 10.13.1
・virtualbox 5.1.20
やりたいこと
■共有フォルダでローカル(finder)からソースを修正して仮想環境に反映させたい。
- 現在は仮想環境にcyber duckでアクセスしてファイルを修正して反映させている。(finderからはアクセスできない)
- ローカルホストに入った状態→/home/vagrat
※ ここの配下にあるmy_appフォルダを全てfinderからアクセスできるようにしたい
共有フォルダの設定
例:1. Users/user_name/project_dir
※ project_dirの中にvagrantfileが存在する
vagrantfile
1config.vm.synced_folder "Users/user_name/project_dir", "/my_app"
確認
- そもそもfinderのmy_appフォルダを仮想環境に共有フォルダとすることしかできないのか?
1.とした場合はfinderにmy_appがない状態で仮想環境のmy_appフォルダを共有フォルダとしてfinderから操作することはできないのか?
実行
vagrant up
処理内容 ==> default: Checking if box 'bento/centos-6.8' is up to date... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! [default] GuestAdditions 5.1.20 running --- OK. ==> default: Checking for guest additions in VM... ==> default: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => Users/user_name/project_dir
エラー内容
Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o uid=500,gid=500 vagrant /vagrant The error output from the command was:
以上よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。