[~/chef-test]$ vagrant plugin install vagrant-vmware-fusion Installing the 'vagrant-vmware-fusion' plugin. This can take a few minutes... Installed the plugin 'vagrant-vmware-fusion (2.2.8)'!
[~/chef-test]$ vagrant plugin license vagrant-vmware-fusion ~/Downloads/license.lic Installing license for 'vagrant-vmware-fusion'... The license for 'vagrant-vmware-fusion' was successfully installed!
[~]$ cd chef-test/ [~/chef-test]$ vagrant box add cent64 https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box Downloading box from URL: https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box Box download is resuming from prior download progress Extracting box...te: 401k/s, Estimated time remaining: --:--:--) Successfully added box 'cent64' with provider 'vmware_fusion'!
[~/chef-test]$ vagrant box list cent64 (vmware_fusion)
[~/chef-test]$ vagrant init cent64 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.
生成された Vagrantfile を編集し、初回のみ GUI を有効化する
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.provider :vmware_fusion do |v|
v.gui = true
end
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "cent64"
[~/chef-test]$ vagrant up --provider=vmware_fusion Bringing machine 'default' up with 'vmware_fusion' provider... [default] Cloning VMware VM: 'cent64'. This can take some time... [default] Verifying vmnet devices are healthy... [default] Preparing network adapters... [default] Starting the VMware VM... [default] Waiting for the VM to finish booting... [default] The machine is booted and ready! [default] Forwarding ports... [default] -- 22 => 2222 [default] Configuring network adapters within the VM... [default] Waiting for HGFS kernel module to load... [default] Enabling and configuring shared folders... [default] -- /Users/atsushi/chef-test: /vagrant
仮想マシンをアップグレードするか聞かれるので、[今後このダイアログを表示しない] をチェックして、[アップグレードしない]ボタンを押す
[~/chef-test]$ vagrant halt [default] Attempting graceful shutdown of VM... [default] Waiting for the VMX process to go away...
以降 v.gui = true は不要
[~/chef-test]$ vagrant up --provider=vmware_fusion [~/chef-test]$ uname -a Darwin hondou-no-MacBook.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 [~/chef-test]$ vagrant ssh [vagrant@vagrant-centos-6 ~]$ uname -a Linux vagrant-centos-6 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [vagrant@vagrant-centos-6 ~]$ whoami vagrant [vagrant@vagrant-centos-6 ~]$ exit logout Connection to 192.168.228.135 closed.
Cent OS 6.4 には、user:vagrant (password:vagrant) が登録されている。vagrant は sudoer として登録されている
[~/chef-test]$ vagrant halt
[~/chef-test]$ vagrant suspend
[~/chef-test]$ vagrant destroy