LoginSignup
2
2

More than 5 years have passed since last update.

Vagrantのコマンドメモ

Last updated at Posted at 2016-09-02

端末環境: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

参考

Vagrantのbox、VirtualBoxのVM、削除/パス

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2