<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Justin Spradlin &#187; Linux</title>
	<atom:link href="http://www.justinspradlin.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinspradlin.com</link>
	<description>Coding and such...</description>
	<lastBuildDate>Wed, 03 Mar 2010 17:52:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>5 Reasons VirtualBox Rocks My Socks</title>
		<link>http://www.justinspradlin.com/general-technology/5-reasons-virtualbox-rocks-my-socks/</link>
		<comments>http://www.justinspradlin.com/general-technology/5-reasons-virtualbox-rocks-my-socks/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 01:30:37 +0000</pubDate>
		<dc:creator>Justin Spradlin</dc:creator>
				<category><![CDATA[General Technology]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.justinspradlin.com/?p=24</guid>
		<description><![CDATA[Lately I&#8217;ve been interested in learning about a variety of the Operating Systems that are available today.  I&#8217;m a big advocate of using the right tool for the job so experimenting with the latest OSes is a must in order to figure out the strengths and weaknesses of each.  While experimentation is a [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.justinspradlin.com/general-technology/5-reasons-virtualbox-rocks-my-socks/"><img src="http://www.justinspradlin.com/images/vboxlogo.jpg" alt="Virtualbox Logo" class="rev_right"/></a><p>Lately I&#8217;ve been interested in learning about a variety of the Operating Systems that are available today.  I&#8217;m a big advocate of using the right tool for the job so experimenting with the latest OSes is a must in order to figure out the strengths and weaknesses of each.  While experimentation is a great way to learn it can be a bit of a pain to find an old machine, format the hard drive, and install an OS.  <a href="http://en.wikipedia.org/wiki/Dual_boot">Dual booting</a> is an alternative option, but there is the inherent risk of messing up the current state of your machine.</p>
<p>Overcoming these issues was always a bit of a challenge for me until about six months ago when I stumbled upon <a href="http://www.virtualbox.org/">VirtualBox</a>.  VirtualBox is Sun&#8217;s &#8220;family of powerful x86 virtualization products.&#8221;  VirtualBox allows you to install and run &#8220;guest&#8221; operating systems in their own virtual environment on top of a &#8220;host&#8221; operating system.  I know that virtualization has been around for a while, but until finding VirtualBox, I&#8217;ve never had much success running virtualization software.  VirtualBox is different.  It&#8217;s intuitive and easy to use.  Here are the top 5 reasons why I love VirtualBox:</p>
<span id="more-24"></span>
<ol>
	<li><a href="#cheap_machines">Cheap Machines for Easy Experimentation</a></li>
	<li><a href="#dual_booting">No More Dual Booting</a></li>
	<li><a href="#networking_works">Networking Works</a></li>
	<li><a href="#vm_cloning">Virtual Machine Cloning</a></li>
	<li><a href="#guest_additions">Guest Additions Make for Seamless Work</a></li>
</ol>
<h3 id="cheap_machines">1. Cheap Machines for Easy Experimentation</h3>
<p>If you&#8217;ve ever wanted to try out a particular OS, but didn&#8217;t feel like dealing with the hassles mentioned above then VirtualBox may be exactly what you are looking for.  VirtualBox allows you to install guest operating systems in their own virtual environment which means there are no side effects on the current state of your machine (other than taking up some hard drive space of course).  If you mess something up simply discard your virtual machine (VM) and start over.</p>
<p>The net effect is that you save a lot of time.  No need for additional machines, formatting, or partitioning.  Simply create a new VM, mount the CD drive (or an .iso image of the OS you want to install), and fire up the virtual machine.</p>
<p><a href="http://www.justinspradlin.com/images/vbox_config.jpg"><img class="centered" src="http://www.justinspradlin.com/images/vbox_config_small.jpg" alt="VirtualBox settings window"/></a><br/><i>VirtualBox allows you to install a wide range of OSes including, but not limited to Linux (Ubuntu, etc.), BSD, Solaris, Windows (including 3.1).  For a full list of guest operating systems <a href="http://www.virtualbox.org/wiki/Guest_OSes">click here.</a></i></p>
<h3 id="dual_booting">2. No More Dual Booting</h3>
<p>When I first started dual booting years ago I appreciated the fact that it was possible to run two (or more) operating systems on the same machine.  This proved to be very useful when I wanted to play video games, write, or work with multimedia and graphics tools using Windows, but wanted to develop software using the tools available under various flavors of Linux.  There was a problem however.  Sometimes I would want to do work that required tools available in one of the OSes but not the other.  Other times I would simply prefer to work in a way that favored a particular operating system.  In either case I would often have to reboot my machine, select a particular OS, do my work in that OS, and then reboot back to my main operating system.  As you can imagine this was quite painful.</p>
<p>With VirtualBox you can have the best of all worlds.  You can work with as many OSes as you want at the same time.  I do this a lot particularly when developing websites.  I can run a full <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> stack on an Ubuntu Linux guest operating system while I use photo editing software on my Windows host machine.  As a bonus you can place the guest OS into &#8220;Full Screen&#8221; mode and be totally ignorant of the fact that you are running a virtualized operating system.  Best of all:  No reboots required.</p>
<p><a href="http://www.justinspradlin.com/images/ubuntu_guest.jpg"><img class="centered" src="http://www.justinspradlin.com/images/ubuntu_guest_small.jpg" alt="VirtualBox running inside of Windows"/></a><br/><i>VirtualBox running inside of Windows.</i></p>
<p><a href="http://www.justinspradlin.com/images/ubuntu_full.jpg"><img class="centered" src="http://www.justinspradlin.com/images/ubuntu_full_small.jpg" alt="VirtualBox running in full screen mode"/></a><br/><i>VirtualBox running in full screen mode.</i></p>
<h3 id="networking_works">3. Networking Works</h3>
<p>One of the most exciting aspects about VirtualBox for me is that networking works between guest and host operating systems, guest and other guest operating systems, and guest operating systems and external networks (i.e. the Internet).  This has a lot of interesting implications.  One thing that I&#8217;ve been able to do is set up an old Dell computer in my closet running two VirtualBox VMs.  I have Ubuntu Linux installed on both VM instances.  I use one VM to serve as a centralized <a href="http://git-scm.com/">Git</a> source code repository (you are using <a href="http://www.justinspradlin.com/general-technology/getting-it-on-with-git-part-1/">Git</a>, <a href="http://www.justinspradlin.com/general-technology/getting-it-on-with-git-part-2/">right?</a>).  The other VM hosts a LAMP stack for serving a simple Wiki.  On my network these two VMs act as individual machines.  I can restart, shutdown, or in any other way modify one VM without disrupting the other.</p>
<p>With previous versions of VirtualBox networking could be slightly cumbersome to set up, but version 2.1 makes setup a breeze.  If you do try VirtualBox and get caught up along the way there is plenty of <a href="http://www.virtualbox.org/wiki/Documentation">documentation</a> and a strong <a href="http://www.virtualbox.org/wiki/Community">development community</a> to help you out along the way.</p>
<p><a href="http://www.justinspradlin.com/images/networking.jpg"><img class="centered" src="http://www.justinspradlin.com/images/networking_small.jpg" alt="VirtualBox networking"/></a><br/><i>VirtualBox networking allows for communication between guests, hosts, and outside networks.</i></p>
<h3 id="vm_cloning">4. Virtual Machine Cloning</h3>
<p>I once spent a lot of time setting up one of my virtual machine guest environments to the exact specifications that I needed.  I downloaded tons of software, added bash aliases, and tweaked various configurations to suit my needs.  Then an interesting thing happened.  I ended up needing another VM with the exact same specifications.  Taking the time to manually configure another VM wasn&#8217;t really an option.  Fortunately VirtualBox has built in VM cloning* support.  All I had to do was run the following command:<sup>**</sup></p>
<div class="codeBlock">
	<pre><code>VBoxManage clonehd &lt;/path/source.vdi&gt; &lt;/path/target.vdi&gt; -format VDI</code></pre>
</div>
<p>This saves a lot of time by reducing the effort needed to reproduce the guest virtual machines that you have previously set up using VirtualBox.  This also allows you to share your environment with other people by simply giving them access to your .vdi file (VirtualBox VM instance) and configuration settings.  In addition, once you set up a pristine environment you can clone it and always have it stored as a backup incase you mess something up with the VM you are currently working with.</p>
<p><sup>*</sup><i>There is a bit of a bug in VirtualBox 2.1.  The <code>clonehd</code> command seems to be generating corrupt .vdi files.  In the meantime as a work around you can simply copy the .vdi file, paste it into a target directory, and then run <code>VBoxManage internalcommands sethduuid &lt;target.vdi&gt;</code> command (thanks to <a href="http://paulsiu.wordpress.com/category/virtualization/virtualbox/">The Bonobo Journal</a> for the tip).</i></p>
<p><sup>**</sup><i>Note:  On Windows don&#8217;t forget to make sure you add the VBoxManage application to your path so that you can run it from the command line.</i></p>
<h3 id="guest_additions">5. Guest Additions Make for Seamless Work</h3>
<p>If you decide to install VirtualBox you will definitely want to install the &#8220;Guest Additions&#8221; package that is available for most guest operating systems.  Guest Additions allow for better interoperability between your installed guest VMs and your host system.  A few of the best features included with Guest Additions are:</p>
<blockquote>
<p><strong>Shared Clipboard</strong> &#8211; gives you the ability to bi-directionally copy and paste text between guest and host operating systems.</p>
<p><strong>Independent Mouse Control</strong> &#8211; permits you to move your mouse between guest and host systems.  Without Guest Additions installed your mouse is &#8220;captured&#8221; by the guest virtual machine until the &#8220;Host Key&#8221; is pressed (usually the right <code>ctrl</code> key).</p>
<p><strong>Better Video Support</strong> &#8211; allows you to resize your VM window while also dynamically resizing the screen resolution of your guest operating system.</p>
</blockquote>
<p><a href="http://www.justinspradlin.com/images/resized_guest.jpg"><img class="centered" src="http://www.justinspradlin.com/images/resized_guest_small.jpg" alt="Resized VirtualBox Window"/></a><br/><i>With Guest Additions installed VirtualBox screens can dynamically be resized to any screen resolution.</i></p>
<h3>Conclusion</h3>
<p>Besides simply saving time, space, and energy there are a lot of real world applications for VirtualBox.  I really like to setup multiple VMs on my host machine to serve as development and staging environments for the various web applications that I work on.  Also I like to test my web applications using a combination of different operating systems and browsers (especially various Windows/Internet Explorer combinations).  With VirtualBox this is all very straight forward.  In the future I would like to use VirtualBox to experiment with running multiple VMs over a network to learn more about setting up clustered, load balanced environments.</p>
<p>There are other virtualization and emulation tools on the market (<a href="http://www.vmware.com/">VMWare</a>, <a href="http://www.xen.org/">Xen</a>, <a href="http://www.winehq.org/">Wine</a>), but I find that VirtualBox has the right mix of performance and ease of use to suit all of my development needs.</p>]]></content:encoded>
			<wfw:commentRss>http://www.justinspradlin.com/general-technology/5-reasons-virtualbox-rocks-my-socks/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>
