・・・格納するディレクトリを作った後に
[root@CentOS6 centos6]# vagrant init centos
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.

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.

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network :forwarded_port, guest: 80, host: 8080

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

[root@CentOS6 centos6]# vagrant up
VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
[root@CentOS6 centos6]# VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.32-504.8.1.el6.x86_64) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.4.3.24r98716[root@CentOS6 centos6]# sudo /etc/init.d/vboxdrv setupStopping VirtualBox kernel modules [ OK ]Uninstalling old VirtualBox DKMS kernel modules [ OK ]Trying to register the VirtualBox kernel modules using DKMSError! echoYour kernel headers for kernel 2.6.32-504.8.1.el6.x86_64 cannot be found at
/lib/modules/2.6.32-504.8.1.el6.x86_64/build or /lib/modules/2.6.32-504.8.1.el6.x86_64/source.
[失敗](Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [失敗](Look at /var/log/vbox-install.log to find out what went wrong)

[root@vagrant centos6]# vagrant ssh
Welcome to your Vagrant-built virtual machine.
[vagrant@localhost ~]$ pwd
/home/vagrant
[vagrant@localhost ~]$ exitlogout
Connection to 127.0.0.1 closed.
[root@vagrant centos6]# vagrant halt
[default] Attempting graceful shutdown of VM...
[root@vagrant centos6]# vagrant status
Current machine states:
default poweroff (virtualbox)
The VM is powered off. To restart the VM, simply run `vagrant up`[root@vagrant centos6]# vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Destroying VM and associated drives...
[root@vagrant centos6]# vagrant status
Current machine states:
default not created (virtualbox)
The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
[root@vagrant centos6]#