diff --git a/2013-09-07.md b/2013-09-07.md index e69de29..e35a017 100644 --- a/2013-09-07.md +++ b/2013-09-07.md @@ -0,0 +1,25 @@ +

Weekly Reflection for the 2nd Week (09/08/13-09/14/13)

+ +

Summary of vagran Usage

+ +The most intresting thing this week is to play with vagrant. Vagrant is a pretty cool tool, it allows me to bring up a pre-configured virtual box and get access to it from Git Shell. Here is some commands I found extreamly useful. + +To get help for a command: vagrant -help + +To remove a virtual box: vagrant box remove + +To install a virtual box: vagrant box add \ \
+ +Before bring up a virtual box for the first time, configure it with command: vagrant init + +To bring up a vm: vagrant up + +Most times, the virtual box will be ready after a while, then I can access the shell with command: vagrant ssh + +After log into the system, I can swap files with my host system through /vagrant in the virtual machine, which is mapped to the Git Shell working directory. + +If I want to shutdown the virtual box, I can do it with command: vagrant halt + +Or do it from the Ubuntu shell with following command: sudo shutdown 0 + +Vagrant is not perfect, sometimes it lost communication with the virtual box after it bring the virtual box up. I need to wait for a long time before the Git Shell return the control back and there is no way to establish ssh access. In another word, the virtual box is sort of out-of-control. In that case, I need to shut it down with command vagrant halt. Maybe that's why vagrant also provide command:
vagrant suspend
With this command allows me to suspend the virtual box instead of shut it down completely. The benefit of doing so is that next time I don't need to worry about the virtual box going out-of-control.