ログってなんぼ

日々のメモです

Vagrant:サーバーを弄ったり捨てたりまた作ったり

vmにログイン後

ファイルを作る

[vagrant@localhost ~]$ ll
合計 0
[vagrant@localhost ~]$ touch test.txt
[vagrant@localhost ~]$ ll
合計 0
-rw-rw-r-- 1 vagrant vagrant 0  6月  4 20:28 2014 test.txt
[vagrant@localhost ~]$

logoutしてから鯖を捨てる

[vagrant@localhost ~]$ exit
logout
Connection to 127.0.0.1 closed.

$ vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...

また作ってログイン

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'centos6'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
GuestAdditions versions on your host (4.3.12) and guest (4.3.6) do not match.

$ ssh localvm
[vagrant@localhost ~]$ ll
合計 0

綺麗さっぱり。