Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 2013-09-07.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<h3>Weekly Reflection for the 2nd Week (09/08/13-09/14/13)</h3>

<h4>Summary of vagran Usage</h4>

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: <b>vagrant <command> -help</b>

To remove a virtual box: <b>vagrant box remove <virtualbox name></b>

To install a virtual box: <b>vagrant box add \<vm-name\> \<url\></b> <br>

Before bring up a virtual box for the first time, configure it with command: <b>vagrant init <vm-name></b>

To bring up a vm: <b>vagrant up</b>

Most times, the virtual box will be ready after a while, then I can access the shell with command: <b>vagrant ssh</b>

After log into the system, I can swap files with my host system through <b>/vagrant</b> 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: <b>vagrant halt</b>

Or do it from the Ubuntu shell with following command: <b>sudo shutdown 0</b>

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:<br><b>vagrant suspend</b><br>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.