<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - VirtualBox: open source virtualisation - Comments</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation</link>
 <description>Comments for &quot;VirtualBox: open source virtualisation&quot;</description>
 <language>en</language>
<item>
 <title>You&#039;re welcome.</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation#comment-38534</link>
 <description>&lt;p&gt;You&#039;re welcome.&lt;/p&gt;</description>
 <pubDate>Sat, 25 Oct 2008 09:11:56 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 38534 at http://townx.org</guid>
</item>
<item>
 <title>Great How-To!</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation#comment-38533</link>
 <description>&lt;p&gt;Thanks for taking the trouble - saved me loads of time.&lt;/p&gt;</description>
 <pubDate>Sat, 25 Oct 2008 08:06:32 -0500</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 38533 at http://townx.org</guid>
</item>
<item>
 <title>You&#039;re very welcome. Thanks</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation#comment-38367</link>
 <description>&lt;p&gt;You&#039;re very welcome. Thanks for taking the time to comment.&lt;/p&gt;</description>
 <pubDate>Wed, 30 Jul 2008 16:03:51 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 38367 at http://townx.org</guid>
</item>
<item>
 <title>Thanks for DSL setup</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation#comment-38366</link>
 <description>&lt;p&gt;Thanks a lot for the &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;setup info. I would be stuck without your blog entry&lt;/p&gt;</description>
 <pubDate>Wed, 30 Jul 2008 14:36:19 -0500</pubDate>
 <dc:creator>Jay</dc:creator>
 <guid isPermaLink="false">comment 38366 at http://townx.org</guid>
</item>
<item>
 <title>VirtualBox: open source virtualisation</title>
 <link>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation</link>
 <description>&lt;p&gt;I&#039;ve been a &lt;a href=&quot;http://vmware.com/&quot;&gt;VMware&lt;/a&gt; user for a couple of years now, and have found it invaluable for testing different operating systems and network configurations without the need for tons of hardware. (For example, I used VMware to simulate deployments of Rails applications from my laptop to a virtual Linux server, using Capistrano over &lt;span class=&quot;caps&quot;&gt;SSH.&lt;/span&gt;) I have the luxury of a Workstation licence, which makes it simple to set up new virtual machines and network them.&lt;/p&gt;

&lt;p&gt;However, having heard about &lt;a href=&quot;http://www.xensource.com/Pages/default.aspx&quot;&gt;Xen&lt;/a&gt; and the like, I thought I&#039;d have a look over the open source offerings for virtualisation and see how they measured up. This week, I have been trying out &lt;a href=&quot;http://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;, a nice system which offers much of the functionality of VMware (probably all if you&#039;re prepared to read the manual properly), but which you can use for nothing. The licensing model is to charge extra for some &quot;enterprise&quot; features, but for me the wholly-free community version (released under the &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt;) is more than adequate. Also bear in mind that I installed it on Ubuntu Linux (Dapper) and used that as the host operating system (the one running the virtual machines), but that it is available for Windows too.&lt;/p&gt;

&lt;h2&gt;Installation&lt;/h2&gt;

&lt;p&gt;The first step is to &lt;a href=&quot;http://www.virtualbox.org/wiki/Downloads&quot;&gt;download a package for your operating system&lt;/a&gt;. I used the Ubuntu Dapper .deb package provided on the downloads site, which I installed with no problems. The only slight issue is that you need a few dependencies first. I had most already, but I needed a couple more. For those of you who are interested, here&#039;s the output of &lt;tt&gt;dpkg-query -s virtualbox&lt;/tt&gt;, which shows the dependencies:&lt;/p&gt;



&lt;pre&gt;
Package: virtualbox
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 30936
Maintainer: innotek GmbH &amp;lt;info@virtualbox.org&amp;gt;
Architecture: i386
Version: 1.5.0-24069-1_Ubuntu_dapper
Depends: libasound2 (&amp;gt;&amp;gt; 1.0.10), libc6 (&amp;gt;= 2.3.4-1), libgcc1 (&amp;gt;= 1:4.0.2), libgl ib2.0-0 (&amp;gt;= 2.10.0), libice6, libidl0, libpng12-0 (&amp;gt;= 1.2.8rel), libqt3-mt (&amp;gt;= 3 :3.3.6), libsdl1.2debian (&amp;gt;&amp;gt; 1.2.7+1.2.8), libsm6, libssl0.9.8 (&amp;gt;= 0.9.8a-1), li bstdc++6 (&amp;gt;= 4.0.2-4), libx11-6, libxalan110, libxcursor1 (&amp;gt;&amp;gt; 1.1.2), libxerces2 7, libxext6, libxt6, zlib1g (&amp;gt;= 1:1.2.1), debconf (&amp;gt;= 0.5) | debconf-2.0, psmisc
Pre-Depends: debconf (&amp;gt;= 1.1) | debconf-2.0
Recommends: linux-headers, gcc, make, binutils, bridge-utils, uml-utilities, lib hal1 (&amp;gt;= 0.5)
Conffiles:
 /etc/init.d/vboxnet dba1d3dd5cf1dfa526df9f8be2cd17b8
 /etc/init.d/vboxdrv b3b219d047c0de1216db6c4b9481a233
 /etc/vbox/vbox.cfg 7fa8136a0f4330b1024b70f9d258c0a5 obsolete
 /etc/init.d/virtualbox 4946cb298821c69ebd17575c75c56fd1 obsolete
Description: innotek VirtualBox
 VirtualBox is a powerful PC virtualization solution allowing you to run a
 wide range of PC operating systems on your Linux system. This includes
 Windows, Linux, FreeBSD, DOS, OpenBSD and others. VirtualBox comes with a broad
 feature set and excellent performance, making it the premier virtualization
 software solution on the market.
&lt;/pre&gt;



&lt;p&gt;I installed the VirtualBox .deb itself using:&lt;/p&gt;



&lt;pre&gt;
sudo dpkg --install virtualbox_1.5.0-24069-1_Ubuntu_dapper_i386.deb
&lt;/pre&gt;



&lt;p&gt;(Attempting to install highlighted my missing dependencies, which I then installed with &lt;tt&gt;apt-get&lt;/tt&gt;.) Once installed, you can get it up and running from the command line with:&lt;/p&gt;



&lt;pre&gt;
$ VirtualBox
&lt;/pre&gt;



&lt;p&gt;The interface is plain but fairly easy to follow:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://townx.org/files/virtualbox.png&quot; alt=&quot;&quot; height=&quot;447&quot; width=&quot;600&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Installing Damn Small Linux as a guest operating system&lt;/h2&gt;

&lt;p&gt;My preferred distribution for testing virtualisation software is &lt;a href=&quot;http://www.damnsmalllinux.org/&quot;&gt;Damn Small Linux&lt;/a&gt; (DSL), a tiny but still useful Linux distribution. The download is only 50Mb, and it will run from a CD image; but you can also install it to a &lt;span class=&quot;caps&quot;&gt;USB &lt;/span&gt;drive or proper hard drive, providing you give it at least 200Mb of space. I use it as the guest operating system on my Linux host, to quickly get a flavour of how the virtualisation software works.&lt;/p&gt;

&lt;p&gt;I downloaded an .iso for &lt;span class=&quot;caps&quot;&gt;DSL, &lt;/span&gt;created a new virtual machine, and pointed it at the .iso file as the CD image to boot from. This is what the VirtualBox configuration looks like; notice the options to mount multiple hard disks, mount a real CD drive, use &lt;span class=&quot;caps&quot;&gt;USB, &lt;/span&gt;audio etc., as in VMware:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://townx.org/files/virtualbox_dsl_config.png&quot; alt=&quot;&quot; height=&quot;447&quot; width=&quot;600&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once I clicked on the &lt;em&gt;Start&lt;/em&gt; button, &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;booted off the CD image first time, blindingly fast: much faster than a VMware virtual machine booting &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;with the same amount of &lt;span class=&quot;caps&quot;&gt;RAM.&lt;/span&gt; This was promising. Once up and running, everything worked as expected, and VirtualBox had set up the virtual machine&#039;s network connection so I could get out onto the internet using Firefox (1.0.6):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://townx.org/files/virtualbox_with_dsl_firefox.png&quot; alt=&quot;&quot; height=&quot;436&quot; width=&quot;600&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Installing Damn Small Linux to a virtual disk&lt;/h2&gt;

&lt;p&gt;However, trying to install to a hard disk was a bit more of a chore than I would have liked. To do this, I worked out this series of steps, with some trial and error. First, you have to attach a virtual disk to the machine, like so:&lt;/p&gt;


&lt;ol&gt;
&lt;li&gt;Close down the virtual machine so it is powered off.&lt;/li&gt;
&lt;li&gt;Click on the &lt;em&gt;Hard disks&lt;/em&gt; heading in the virtual machine configuration. This takes you to the &lt;em&gt;Hard Disks&lt;/em&gt; tab in the configuration window.&lt;/li&gt;
&lt;li&gt;Tick the &lt;em&gt;Primary Master&lt;/em&gt; radio button, then on the icon next to the drop-down box. This will take you through to the &lt;em&gt;Virtual Disks Manager&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Click on the &lt;em&gt;New&lt;/em&gt; button to add a new virtual disk.&lt;/li&gt;
&lt;li&gt;Click on the &lt;em&gt;Next&lt;/em&gt; button. You&#039;re now offered a choice of creating a &lt;strong&gt;Fixed-size&lt;/strong&gt; or &lt;strong&gt;Dynamically expanding&lt;/strong&gt; virtual disk. I chose a fixed size one. Click on &lt;em&gt;Next&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Set the size for the disk image. I went for 200Mb. You can leave the name for the disk at the default, and it will be stored in a .VirtualBox directory in your home directory.&lt;/li&gt;
&lt;li&gt;Click through the rest of the wizard until your virtual disk is created.&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;Next, boot off the operating system off the CD again. Here&#039;s where I had a few problems. While the hard disk was recognised (as &lt;tt&gt;/dev/hda&lt;/tt&gt;), it wasn&#039;t automatically mounted; in addition, it didn&#039;t have a valid partition table on it. Fine for technical users, but nowhere near as friendly as VMware: I seem to remember that when I installed &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;on VMware, I didn&#039;t need to create the filesystem myself.&lt;/p&gt;

&lt;p&gt;In VirtualBox, when I tried to run the &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;&quot;install to hard disk&quot; option (right click on the desktop, and select &lt;em&gt;Apps &amp;gt; Tools &amp;gt; Install to Hard Drive&lt;/em&gt;), it failed miserably. So I got a terminal up and created my own partition on the hard drive using fdisk. My session looked like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://townx.org/files/virtualbox_creating_partition.png&quot; alt=&quot;&quot; height=&quot;637&quot; width=&quot;539&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I then ran the installer, choosing to use an ext3 filesystem and using the Grub bootloader (Lilo didn&#039;t work). Here&#039;s what the &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;hard disk install script looks like while it&#039;s running:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://townx.org/files/virtualbox_dsl_onto_hard_drive.png&quot; alt=&quot;&quot; height=&quot;676&quot; width=&quot;568&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I don&#039;t know if you&#039;d need to do this for other Live CD to hard disk installers (e.g. Ubuntu&#039;s). In most cases, more sophisticated distributions provide a graphical tool for this, so it shouldn&#039;t be such a chore. However, notice that I think I needed to specify a bootable flag for the disk (with the &lt;tt&gt;a&lt;/tt&gt; option in fdisk), which you might need to keep an eye out for when installing another distribution. This might not be necessary, but I did it so that I definitely wouldn&#039;t end up with an unbootable disk.&lt;/p&gt;

&lt;p&gt;Once I&#039;d done this, &lt;span class=&quot;caps&quot;&gt;DSL &lt;/span&gt;happily booted off the virtual disk and I was done.&lt;/p&gt;

&lt;h2&gt;Pros and cons&lt;/h2&gt;

&lt;p&gt;So, what do I like about VirtualBox?&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;It&#039;s open source :) and doesn&#039;t cost a penny for the &quot;workstation&quot; style edition. VMware&#039;s player is open source, but the workstation needs a paid-for licence key. It also means that installation is at least as easy (and will probably eventually be easier than) VMware, as it can become part of mainstream distribution repositories.&lt;/li&gt;
&lt;li&gt;It runs happily on Linux and was easy to install on Dapper (providing you remember the dependencies).&lt;/li&gt;
&lt;li&gt;It seems faster than VMware.&lt;/li&gt;
&lt;li&gt;One feature I really like is that you can attach any virtual disk to any machine, and that disks can be managed separately from virtual machines. This means you could mount a single virtual disk onto multiple machines; so if you upgrade or change the operating system, you could still easily access data from another virtual machine by mounting its disk. I&#039;m not sure whether you can do this at all with VMware.&lt;/li&gt;
&lt;li&gt;Although I am not likely to use it, the &lt;span class=&quot;caps&quot;&gt;API &lt;/span&gt;is fairly open; you can also run guest OSes headlessly, as I believe you can with VMware server. You can also programmatically create virtual machines, as they are configured through an &lt;span class=&quot;caps&quot;&gt;XML &lt;/span&gt;file (I believe the virtual disk format is also compatible with the Xen virtualisation software; I don&#039;t think VMware&#039;s is). This open-ness should make it attractive to enterprises that don&#039;t want to get locked to a vendor.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;What don&#039;t I like?&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Setting up things like bridged networking seems like a real faff, involving doing quite a bit of work on the host operating system. It looked so much of a pain that I decided not to bother. This makes it tricky to do networking between the guest and the host (e.g. so you can copy files from the host onto the guest). Similarly, sharing folders looks slightly trickier than on VMware.&lt;/li&gt;
&lt;li&gt;Cut and paste requires you to add the VirtualBox Guest Additions to a virtual machine, which requires compilation. This process is similar to VMware&#039;s toolbox, and a bit of a pain. I haven&#039;t bothered with this yet.&lt;/li&gt;
&lt;li&gt;It doesn&#039;t quite have the interface polish of VMware, though that doesn&#039;t bother me too much.&lt;/li&gt;
&lt;li&gt;It doesn&#039;t have quite the backing of tools like Xen. This could mean that it doesn&#039;t attract the same quality of engineers, and that it will have trouble innovating so fast.&lt;/li&gt;
&lt;/ul&gt;



&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;This is a short, biased and probably inaccurate review of VirtualBox, but hopefully it will give you a flavour of why I think it is a useful tool, and help you get started with it yourself. I&#039;ll be using it in favour of VMware, at least in the short term, so that I don&#039;t have to pay a licence fee. It definitely suits my needs for the moment, and if you&#039;re interested in virtualisation, I&#039;d recommend giving it a go.&lt;/p&gt;</description>
 <comments>http://townx.org/blog/elliot/virtualbox-open-source-virtualisation#comments</comments>
 <category domain="http://townx.org/tech">tech</category>
 <category domain="http://townx.org/howtos">howtos</category>
 <pubDate>Tue, 18 Sep 2007 05:16:08 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">671 at http://townx.org</guid>
</item>
</channel>
</rss>
