<?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>Jason P. Brown &#187; Computing</title>
	<atom:link href="http://jasonpbrown.com/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonpbrown.com</link>
	<description>an experiment in brown noise</description>
	<lastBuildDate>Fri, 05 Mar 2010 22:06:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>VirtualBox Folder Sharing</title>
		<link>http://jasonpbrown.com/computing/virtualbox-folder-sharing/</link>
		<comments>http://jasonpbrown.com/computing/virtualbox-folder-sharing/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 00:05:36 +0000</pubDate>
		<dc:creator>Jason P. Brown</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jasonpbrown.com/?p=38</guid>
		<description><![CDATA[So you read about how much I love VirtualBox and you decided to give it a go.  You downloaded and installed VirtualBox (3.1.2 at time of writing) on your Windows computer.  Then you grabbed the latest .ISO of Ubuntu Linux &#8230; <a href="http://jasonpbrown.com/computing/virtualbox-folder-sharing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So you read about how much <a href="http://jasonpbrown.com/personal-computing/i-love-virtualbox/">I love VirtualBox</a> and you decided to give it a go.  You <a href="http://www.virtualbox.org/wiki/Downloads">downloaded and installed VirtualBox</a> (3.1.2 at time of writing) on your Windows computer.  Then you grabbed <a href="http://www.ubuntu.com/getubuntu/download">the latest .ISO of Ubuntu Linux</a> (9.10) and walked through VirtualBox&#8217;s New Virtual Machine Wizard to create  your very first virtual appliance.  Or maybe you went the other route and started off with a Linux machine and created a Windows-based virtual appliance.</p>
<p>Either way, now you want to swap files between the two of them.</p>
<p><span id="more-38"></span></p>
<p>The first thing you have to do, in both cases, is install the VirtualBox Guest Additions from inside your new virtual machine.  You install these from an .ISO that is installed with the VirtualBox application.  Basically you have to mount that ISO as a CD/DVD.  Thankfully, VirtualBox takes a little of the confusion out of  the process by providing you with a shortcut in the Devices Menu on your already running virtual machine. The keyboard shortcut is Host+D (Right CTRL + D by default).</p>
<h2>Installing the VirtualBox Guest Additions on Linux (Ubuntu)</h2>
<p>After ignoring the useless (in my case) auto-run prompt, I opened up a terminal window (Applications -&gt; Accessories -&gt; Terminal).  I changed directories to where the CD was mounted (/media/cdrom), and ran ls to see the contents of the directory.  After identifying the appropriate version your virtual environment, go ahead an run it as root (or use sudo if available).  On 64bit Ubuntu, it looks just like this (don&#8217;t type the dollar sign, it&#8217;s used to illustrate the beginning of the command):</p>
<p><code>$ cd /media/cdrom<br />
$ sudo ./VBoxLinuxAdditions-amd64.run</code></p>
<p>The <strong>sudo</strong> command temporarily elevates your privileges so you can run the installer, and it will ask you to re-enter your password, so you know.</p>
<p>Get used to this process.  Every time you update the kernel you are going to want to re-install the guest additions.  Also, whenever you update the VirtualBox application itself, it&#8217;s a good idea to re-install them as well.</p>
<h2>Installing VirtualBox Guest Additions on Windows</h2>
<p>&#8230;is easy as pie.  Shortly after you mount the guest additions .ISO, an auto-run prompt will likely appear and you can just follow the prompts to run the installer.  If it doesn&#8217;t autoplay, browse the computer to the CD-ROM drive and double-click on VBoxWindowsAdditions.exe.  That should sort out the appropriate version for your current operating system.  If you are unsure about individual components, just say yes to everything.  No harm, no foul.</p>
<p>Again, in case you missed it above, it is possible that future windows updates could break the guest additions, so if the guest machine acts goofy after a windows update just reinstall them.   Also, plan on re-installing the guest additions everytime you update the main VirtualBox application on your host machine.   It&#8217;s painless, so quit whining.</p>
<p>Now that you have the guest additions installed, lets practice sharing!</p>
<h2>Sharing Files from a Windows Host to a Linux Guest</h2>
<p><a href="http://blogs.sun.com/tao/entry/virtual_box_shared_folder_between">Zhiqi Tao posted on this topic</a>, but let me attempt a little more detail.  For this example we are going to assume you have a local directory called &#8220;C:\Downloads&#8221; that you want your Linux virtual machine to access.</p>
<p>On your still running virtual machine, go to the &#8220;Devices&#8221; menu and select &#8220;Shared Folders&#8230;&#8221;.   From there you will be prompted with a &#8220;Shared Folders&#8221; window, and in that window you should see a blue folder with a green plus sign in the upper right.  Click on it or press the Insert key to open an &#8220;Add Share&#8221; window.  Use the drop-down for the &#8220;Folder Path&#8221; and select &#8220;Other&#8221; to browse to the directory you intend to share, or you can simply type it in.  If you browsed to the directory, then it will auto-populate the &#8220;Name&#8221; field otherwise you will have to type that in as well.  The name field is very important here, and you will want to pay special attention to case.  Since we want this share to be available every time we start the virtual machine, and we want to be able to write to it from either system, leave &#8220;Read-only&#8221; unchecked, but make sure you check &#8220;Make Permanent&#8221;.  See the example below:</p>
<div id="attachment_41" class="wp-caption aligncenter" style="width: 334px"><a href="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-sharing-w2l-addshare.png"><img class="size-full wp-image-41" title="VirtualBox - Add Share Window (Windows Host)" src="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-sharing-w2l-addshare.png" alt="VirtualBox - Add Share Window (Windows Host)" width="324" height="246" /></a><p class="wp-caption-text">VirtualBox - Add Share Window (Windows Host)</p></div>
<p>Click &#8220;OK&#8221; to add the share and return to the &#8220;Shared Folders&#8221; window.  Under &#8220;Machine Folders&#8221; you should now see an entry with the name and path you specified above, along with Full Access. Click okay to return to the virtual machine.  We are going to navigate to your home folder and create a miniature directory structure to support this initial share as well as any future shares you decide to make.  Then, we are going to add a mount command to /etc/fstab and to /etc/rc.local so that the share is automatically made available every time you start the virtual machine.  Play along at home and remember, Linux is case sensitive!</p>
<p><code>$ cd ~<br />
$ mkdir Shared<br />
$ mkdir Shared/Downloads</code></p>
<p>You are going to need to know the full path to the new Downloads directory.  It should be &#8220;/home/&lt;USERNAME&gt;/Shared/Downloads&#8221; where &lt;USERNAME&gt; is the login you created when you installed the system.  To be sure, you can enter the following commands:</p>
<p><code>$ cd Shared/Downloads<br />
$ pwd</code></p>
<p>Make note of the output of the <strong>pwd</strong> command (which stands for <strong> </strong><span style="text-decoration: underline;">p</span>resent <span style="text-decoration: underline;">w</span>orking <span style="text-decoration: underline;">d</span>irectory), and don&#8217;t forget about case sensitivity (you tired of me saying that yet?).  Let&#8217;s continue.</p>
<p><code>$ sudo nano /etc/fstab</code></p>
<p>Add the following line below the existing entries using the space or tab key between elements.  Remember to replace &lt;USERNAME&gt;  with your login name, and if you have been using different directories then change those as well.   It&#8217;s long, but please remember it should go on a single line!</p>
<p><code>Downloads       /home/&lt;USERNAME&gt;/Shared/Downloads  vboxsf  rw,user,noauto,exec,utf8 0       0</code></p>
<p>The first element is the name of the share, and it must be an exact match for the &#8220;Name&#8221; in the list of &#8220;Shared Folders&#8221; (see the &#8220;Folder Name&#8221; in the &#8220;Add Share&#8221; example window above).  Hit CTRL+O  then Enter to write the file, then CTRL+X to exit nano.  Now we have to edit another file in /etc/, but before we do that, we need to do some self-examination.</p>
<p><code>$ id</code></p>
<p>Make note of the <strong>uid</strong> and <strong>gid</strong> values, because we are going to need them.  Mine were both 1000, and yours may very well be 1000 too.</p>
<p><code>$ sudo nano /etc/rc.local</code></p>
<p>Add the following line directly <span style="text-decoration: underline;">above</span> the line that reads &#8220;exit 0&#8243;.  Feel free to copy and paste, but remember to change your <strong>uid</strong> and <strong>gid</strong> values in addition to swapping out &lt;USERNAME&gt; with your actual login!</p>
<p><code>mount -t vboxsf -o uid=1000,gid=1000,dmode=755,fmode=644 Downloads /home/&lt;USERNAME&gt;/Shared/Downloads</code></p>
<p>Again, Hit CTRL+O  then Enter to write the file, then CTRL+X to exit nano.  Reboot the machine with the following:</p>
<p><code>$ sudo shutdown now -r</code><br />
or<br />
<code>$ sudo reboot</code></p>
<p>When the machine comes back up, /home/&lt;USERNAME&gt;/Shared/Downloads on your guest will be the same as C:\Downloads on your host machine, and should be completely writable from either direction.  Voila!</p>
<h2>Sharing Files from a Linux Host to a Windows Guest</h2>
<p>This is a much simpler process in comparison.  First, you select &#8220;Shared Folders&#8230;&#8221; from the &#8220;Devices&#8221; menu, then press the insert key or click the folder with the green plus sign in the resulting &#8220;Shared Folders&#8221; window to bring up the &#8220;Add Share&#8221; dialogue.   Use the &#8220;Folder Name&#8221; drop-down to select &#8220;Other&#8221; and browse to the folder you&#8217;d like to share.</p>
<p>Make note of the Folder Name that is auto-filled, or change it to something of your liking.  Keep it simple, and one word.  Then make sure &#8220;Read Only&#8221; is not checked, but check &#8220;Make Permanent&#8221;.  See the example in the section above.</p>
<p>Then, in your Windows Host, open up explorer and from the menu bar choose &#8220;Tools -&gt; Map Network Drive&#8221;.  Choose a drive letter from the drop down, and for the folder type</p>
<p><code>\\vboxsvr\&lt;FolderNameFromAddShareDialogue&gt;</code></p>
<p>Obviously you want to replace &lt;FolderNameFromAddShareDialogue&gt; with the actual folder name from the add share dialogue.   In our previous example, it was &#8220;Downloads&#8221;.</p>
<p>Make sure you check &#8220;Reconnect at logon&#8221; and click on the &#8220;Finish&#8221; button.  There you go, you are all set, easy peasy.  And really, this process works no matter what kind of host you are working with.  Windows is just easy that way.</p>
<p>Hopefully you find this useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonpbrown.com/computing/virtualbox-folder-sharing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I Love VirtualBox</title>
		<link>http://jasonpbrown.com/computing/i-love-virtualbox/</link>
		<comments>http://jasonpbrown.com/computing/i-love-virtualbox/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 19:09:07 +0000</pubDate>
		<dc:creator>Jason P. Brown</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://jasonpbrown.com/?p=23</guid>
		<description><![CDATA[Sun&#8217;s VirtualBox is a tool I&#8217;ve come to rely on for virtualization, and I seriously rely on virtualization.  What is virtualization and why do I rely on it so much?   Virtualization, in the most basic possible sense of the &#8230; <a href="http://jasonpbrown.com/computing/i-love-virtualbox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.virtualbox.org/">Sun&#8217;s VirtualBox</a> is a tool I&#8217;ve come to rely on for virtualization, and I seriously rely on virtualization.  What is virtualization and why do I rely on it so much?   Virtualization, in the most basic possible sense of the not-really-a-word, is a method of running one or more operating systems inside another wholly separate operating system.  I rely on it so much, because honestly, I have multiple geek personalities to deal with.  One of me has a long history of geeking out to windows tech and is an avid gamer so it is essential to my computing well-being that I keep a decent Windows-based PC around.    Yet, another me has hefty development interests Linux and Open-source technologies.  I don&#8217;t see that changing anytime soon, and I have a lot of work ahead of me to bring those skills on par with my lengthy experience in Microsoft technology.  Furthermore, I&#8217;m certain there are me&#8217;s out there that I haven&#8217;t even met yet.</p>
<p><span id="more-23"></span></p>
<p>VirtualBox solves this problem for me(s) elegantly.  My Desktop is a 64bit Windows 7 machine with a healthy 8gb of ram and a roomy hard drive.   This is my primary machine for both work and play.  My secondary PC is a Laptop running 64bit Linux (Ubuntu), with 3gb of ram and a 500gb drive.  It&#8217;s feasible that I could use each machine dependent on what technology I needed at the time, but that plan is better on paper than it is in practice.</p>
<p>For one, not only would I hate to run every single piece of Microsoft-dependent software I could possibly need on my daily-use PC, some of them are just downright incompatible with each other.  Even if they did play nice together, the whole of it would represent a serious deterioration in available local resources which is not so good for my happiness.  Besides, I&#8217;ve never managed to shake my operating system re-installation habit that has become an almost Pavlovian response to sluggish Windows computing even though, admittedly, Microsoft OSes have gotten a lot better than they once were.  Regardless, the rigorous demand on local resources and my compulsion for total drive wipes combined with what would be a delicate and time-consuming installation process is, quite frankly, a recipe for disaster.   The bare truth of it all is, I need more than one Windows environment.  Unfortunately, I need more than one Linux environment as well.  I&#8217;m not so proud that I can&#8217;t admit being neck deep in an open-source learning curve.  I&#8217;m still experimenting and I fully expect to engage in some catastrophic mistake-making.  I need an experimental environment, a stable development one, and a working production one as well.</p>
<p>Thanks to virtualization, I can satisfy all these demands on a single computer.  The only hurdle is storage capacity, and current hard drive sizes make that mostly moot.  With 8gb of RAM, I can even run several of these environments concurrently.</p>
<p>For example, I have several Windows-based Virtual Appliances (or machines).  One is a functional backup of my previous web server running 32bit Windows 2003/SQL2000/Cold Fusion, another is a 64bit Windows 2008 R2 MOSS 2007 development environment, and last one is a 32bit Windows Vista general .NET development platform.  I&#8217;ll probably have a 4th one once MOSS 2010 ships.  As it stands right now, I&#8217;m using the old 2003 server as a staging area for .NET apps I write on from the Vista machine, and it is not uncommon for both of those to be running at the same time.</p>
<p>As far as Linux goes, I have 2 virtual appliances.  The first is a replica of my current co-located web server powered by Ubuntu 8.04 LTS.  It serves the dual purpose being both a living back-up of my production environment as well as proving ground for new development.  My second appliance is an Ubuntu 9.10 desktop machine that is in the process of becoming my PHP, Ruby, and Python development environment.  Both of those run simultaneously nearly 100% of the time.  The kicker is, I still have enough free resources to take a game-break now and then, and I&#8217;m not talking about solitaire.</p>
<p>It gets better.  Not only is VirtualBox free, it is also cross platform.  That means that I can export my virtual appliances from either my Windows Desktop or my Linux Laptop and import them to the other.  If I need to take my Windows show on the road, I simply import the appropriate appliance to my Laptop, and off I go.</p>
<p>Truthfully though, VirtualBox isn&#8217;t the only application that can do all that.  I think the more recent VMWare Player is quite capable of doing that much.  The one thing I love about VirtualBox though, is its &#8220;Seamless Mode&#8221;.  Seamless mode is kind of hard to explain, but essentially it is a way of running a virtual appliance so that it feels as though you are running two operating systems at once.  It simply adds a new taskbar or set of taskbars to your normal operating system interface.  This is a fantastic way to run two distinct graphical environments.  Whether I am are doing cross-platform work, client-server development, or just looking to experience a new OS from the comfort and safety of familiar ground, VirtualBox&#8217;s Seamless Mode is pure awesomeness.</p>
<p>I think a couple screenshots might be in order, to really drive it home.  In both examples, we have a 64bit Ubuntu 9.10 virtual appliance running on a Windows 7 Host.  The first shot is the standard mode, with Ubuntu running in it&#8217;s own window.  The second is Ubuntu running in Seamless Mode right over the top of the Windows 7 interface.  Click each thumbnail for a full size image (1920&#215;1080 PNG &gt; 1mb).</p>
<div id="attachment_28" class="wp-caption aligncenter" style="width: 310px"><a href="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-ubuntu-over-w7-std.png"><img class="size-medium wp-image-28" title="VirtualBox - Ubuntu on W7" src="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-ubuntu-over-w7-std-300x168.png" alt="VirtualBox - Ubuntu on W7" width="300" height="168" /></a><p class="wp-caption-text">VirtualBox - Ubuntu on W7 - Standard Mode</p></div>
<div id="attachment_27" class="wp-caption aligncenter" style="width: 310px"><a href="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-ubuntu-over-w7-seemless.png"><img class="size-medium wp-image-27" title="VirtualBox - Ubuntu on W7 - Seemless Mode" src="http://jasonpbrown.com/wp-content/uploads/2010/01/vbox-ubuntu-over-w7-seemless-300x168.png" alt="VirtualBox - Ubuntu on W7 - Seemless Mode" width="300" height="168" /></a><p class="wp-caption-text">VirtualBox - Ubuntu on W7 - Seemless Mode</p></div>
<p>How cool is that?  If you didn&#8217;t see anything nifty, look closer.  In the second image, you will notice the Ubuntu (Gnome) menu bar extended across the entire screen, with the Ubuntu task bar sitting comfortably on top of the Windows 7 taskbar at the bottom.  The fully accessible Windows Desktop peeks out from between them.</p>
<p>It was a total &#8220;Wow&#8221; moment for me the first time I experienced it and I&#8217;ve been hooked ever since.</p>
<p>Now, VirtualBox isn&#8217;t exactly perfect, but the development of this application is very active and it seems to get better with each release, and they are definitely frequent.  Seamless Mode has it&#8217;s own limitations too.  For example, the Guest OS (the virtual appliance machine) doesn&#8217;t span across multiple monitors, or at least it didn&#8217;t the last time I tried.  Also, you have to get used to how window focus works, meaning that when you click on a guest OS window, all visible elements of the guest OS butt in front of the host OS windows, though of course, the reverse is not true.  Then in order to access the desktop of the guest OS, you have to rely on browsing tools.  All are mainly usability concerns that you quickly acclimatize too.  Still though, even with the occasional rough spots, VirtualBox is a shining example of greatness in free (and largely Open Source) software.</p>
<p>You can download VirtualBox here &#8211; <a href="http://www.virtualbox.org/wiki/Downloads">http://www.virtualbox.org/wiki/Downloads</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonpbrown.com/computing/i-love-virtualbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
