Using VirtualBox for virtualizing servers

Thursday, May 27th 2010, 01:07

Oracle VirtualBoxA considerable amount of my diploma project runs on several virtual machines, due to the lack of multiple physical machines required for the job. Of course, Riker isn’t tailored for production regarding this project, but it was built specifically to allow me to develop the code without restrictions. For a load under 10 users I think it would do the job quite okay. You might be asking yourself what kind of project it is if an Intel Core i7 930 processor couldn’t handle the job. I’m not going to tell you… Yet.

Because of the way VMware Server works on the last kernels from Ubuntu this tool couldn’t have offered me the stability and performance I need. And because I really like to use my graphics card to decode HD content, Xen or VMware ESXi weren’t an option either. What was left? VirtualBox is made for desktop virtualization. Still, the ease of use of this product and the fact that it never ever failed for my needs made me actually consider it could be up for the job. Of course, the only problem I had was daemonizing it somehow so that I could run the virtual machines without necessarily being logged in. It actually crossed my mind a few times to write some scripts which would rely on the CLI tools that VirtualBox provides, but the lack of time always made me think twice before this.

At some point in time though, I discovered VBoxTool, which coincidentally is nothing more than a collection of wrapper scripts written in BASH which help you daemonize the hypervisor. How cool is that? Provided that you set up a configuration file and add an init script to the desired runlevels (all this by following proper written explanations directly from the author), this “facade framework” (design pattern pun intended) will automatically start/resume the desired virtual machines and will shutdown/suspend them together with your host. I had to modify about four lines of code to alter a bit the behaviour for shutdown so that my VMs would always get suspended instead of turned off, but that’s almost nothing.

The VMs that are on most of the time both run Ubuntu Server 10.04 64bit: one with 2 GB of RAM and Oracle 11G, the other with 128 MB hosting an internal repository under nginx (which is a very fast web server). They both work great and my host doesn’t at all feel sluggish. Actually all these three machines (host + 2 guests) run incredibly well. The maximum sustained throughput I achieved using the virtualized repository was 60 MB/s which is pretty impressive. I haven’t tried yet to test the DB engine with a consistent load (a great number of queries directed to it simultaneously) but I will get that chance near the end of June when I’ll perform some load testing on my application.

By the way, nine days ago VirtualBox 3.2 has been released (the first release of VB since Oracle acquired Sun) and a bunch of new features have seen daylight. Check it out.

Considering that there’s a reliable way of running virtualized servers into a daemonized VirtualBox, do you still want to puzzle yourself with VMware Server’s erratic behaviour?

You might also like:

2 Comments

  • I arrived here following another post on your blog and I want to add something that might be useful for others as well.

    Thanks to phpVirtualBox, you can control VirtualBox over web interface, exactly like you do with VMware Server. I know that it has been a previous attempt to do this with VirtualBox, but that code never worked for me.

    You have a small how to here, but I think you will find also plenty tutorials out there.

  • Calin, thank you for your info. web face for virtualbox is the thing i was looking for.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


CODE EXAMPLES: When you want to include source code or terminal output, please use the the following tags like in the next example:

    [language]
    code lines
    [/language]
	

where you substitute language with the programming laguage used throught the code example (for terminal output that would be bash), e.g:

    [bash]
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [/bash]
	

To see a list of all the supported languages, please check this page.

If you want to include code bits inline, please use the code tags like in the following example:

    The <code>$USER</code> variable holds the current logged in username.
	

Projects that I support

Recent Comments

  • nope said:
    yeah that was my first thought too, but: mount: warning: seems to be mounted read-write. too bad, would have been just perfect. more»
  • Klaus Deiss said:
    Dear Radu, I tried it on Ubuntu 10.0.4.2 and 10.0.4.3 with different kernel versions (amd64 server 2.6.32 kernel). No... more»
  • scompo said:
    Nope.. Now it’s not working again.. This printer it’s a real pain in the butt.. The other hp printer I had... more»
  • Dmitrij said:
    Thank you Peter and Patrice. Could you please post the updated script? more»
  • hd_flash_pains said:
    didn’t work for me more»

Recent Tweets

Bear