[[Vagrant]]

* sandboxプラグインの導入 [#p2e76aa7]
下記バージョンならvagrant plugin installでインストール可能です。~
 [Mac] 
 $ vagrant version
 Installed Version: 1.7.4
 
 $ vagrant plugin list
 vagrant-share (1.1.4, system)
 
 $ vagrant plugin install sahara
 Installing the 'sahara' plugin. This can take a few minutes...
 Installed the plugin 'sahara (0.0.17)'!
 
 $ vagrant plugin list
 sahara (0.0.17)
 vagrant-share (1.1.4, system)

*** コマンド [#peb81170]
|サンドボックスを有効|vagrant sandbox on |
|サンドボックスを無効|vagrant sandbox off|
|サンドボックスの状態を確認|vagrant sandbox status|
|状態をcommitする|vagrant sandbox commit|
|commitした状態まで戻す|vagrant sandbox rollback|


* 検証 [#ea281521]
 [Mac]
 $ cd Vagrantfileのあるパスへ
 $ vagrant sandbox on
 [default] Starting sandbox mode...
 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
 
 [VMマシン]
 $ touch sandboxtest.txt
 $ exit
 
 [Mac]
 $ vagrant sandbox rollback
 [default] Rolling back the virtual machine...
 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
 
 [VMマシン]
 $ ls -l sandboxtest.txt
 ls: sandboxtest.txt: No such file or directory


参考URL:http://ri.hateblo.jp/entry/2013/10/29/013359

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS