1. 登録されているboxイメージの確認
>vagrant box list centos (virtualbox) opscode-centos65 (virtualbox)
2. boxイメージを使って初期化
>vagrant init opscode-centos65 A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.
3. できたVagrantfileの設定を行う
nameとmemory設定、あとネットワークの設定を行っておく
# -*- mode: ruby -*- # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # initで指定したboxが指定されている config.vm.box = "opscode-centos65" config.vm.provider :virtualbox do |vb| vb.name = "centos6.5v211" vb.customize ["modifyvm", :id, "--memory", 1024] end config.vm.network :public_network, ip: "192.168.2.211" end
4. 起動
>vagrant up