Step1. VirtualBoxのダウンロード&インストール https://www.virtualbox.org/wiki/Downloads
Step2. Vagrantのダウンロード&インストール http://www.vagrantup.com/downloads.html
Step3. 仮想マシン用のディレクトリをつくる。
$ mkdir vagrant_getting_started
$ cd vagrant_getting_started
$ vagrant init
Step4. Boxイメージを選択し設定する。その際、https://atlas.hashicorp.com/boxes/search?utm_source=vagrantcloud.com&vagrantcloud=1
を利用する。
vagrant box add ボックス名
Step5. 仮想マシンの起動
vagrant up
Step6. 仮想マシンへのリモートログイン
vagrant ssh
補足1
詳細は https://docs.vagrantup.com/v2/getting-started/index.html に
書いてあります。
補足2
ホストのvagrant init
したディレクトリ(Vagrantfileがあるディレクトリ)
とゲストの/vagrant
は同期しているので、ゲスト上でrm -rf /
をすると、
ホスト上のVagrantfileがあるディレクトリも削除されます。