端末環境:Mac OS X 10.11.6
vagrantバージョン:1.8.5
Boxの追加/削除
追加
$ vagrant box add boxname http://~~~~~
削除
$ vagrant box remove boxname
なお、Boxファイルはホームディレクトリ下の.vagrant.d/boxesに保存される。
$ ls ~/.vagrant.d/boxes/
centos7
仮想マシンの起動/停止など
起動
$ vagrant up
停止
$ vagrant halt
再起動
$ vagrant reload
状態確認
$ vagrant status
Current machine states:
default running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
一時停止
$ vagrant suspend
一時停止からの復帰
$ vagrant resume
仮想マシンの削除
Vagranfileのあるディレクトリで下記を実行
$ vagrant destroy