May 10, 2008    


 

 


For various reasons, both at work and at home, I have need to use virtualization on more than one of my computers. Virtualization is a really neat technology that allows one computer which is running Linux (or other operating systems) to pretend to be multiple computers, each of which can run any PC operating system including other versions or distributions of Linux or even Windoze.

For several years I have been using VMWare which is a good commercial, but proprietary and closed-source virtualization manager. I have generally had good results with it, but the company only officially supports a few Linux distributions and kernels as the host operating system. This puts a crimp in things when you need to upgrade to a new kernel for functional or security reasons.

One VMWare employee has come up with a small program that can extend the ability to use VMWare to additional kernels but I have found this to be limited also. A few months ago I was no longer able to run my favorite game or to use that Windoze program at work. This was a problem for me.

I have found a really good open source virtualization manager in VirtualBox. This software allows me to run Windows XP on my laptop at work in order to use the one piece of software that I need that does not work well on Linux, and to run Fedora 5, an older version of the Fedora 8 that I currently use on my desktop computer at home. At home I use Fedora 5 to run my favorite Linux simulation game, Railroad Tycoon which no longer runs on current versions of the Linux kernel.

Thus instead of keeping a separate computer to run this older software, and incurring all of the expenses of that, I can use my primary desktop computer that runs Fedora 14 to also run a virtual computer with Fedora 5 so that I can play my game; all at no extra cost.

About VirtualBox

VirtualBox itself is really cool software. In addition to being open source, it is also free of charge. It is easy to install and uses less system resources, such as CPU cycles, than VMWare. VirtualBox is easy to use and it is fairly easy to install the guest operating systems. VirtualBox loads faster than VMWare and starts up paused virtual sessions much faster as well.

I really like the shared folders feature which, I think, works much better and is easier to configure than the VMWare version. This allows the guest operating system to access any folders of the host operating system that I choose to configure.

Issues

I have run into a couple caveats, however.

The first is that it is a little more difficult to install the VirtualBox additions to the guest operating system. These additions allow one to configure the display resolution, and also allows the guest session to automatically capture and release the mouse pointer.

I kept getting errors when attempting to install the guest additions. I found that by prefacing the commands in the VirtualBox instructions with the bash command (thus running the program inside a bash CLI session) I was able to install the additions. This problem was true of any BASH script that I attempted to run. After installing the additions, this little circumvention was no longer necessary.

Your command should look like this:

# bash ./VboxLinuxAdditions-x86.run

Note: this problem was extant with earlier versions of VirtualBox. It no longer appears to be the case and appears to have been corrected when used with more current versions such as Fedora 10 and above. The problem still exists with CentOS 5.3.

The other issue that I ran into is with networking. It was fairly easy to set up a host-based network in VMWare, in which the host and guest could communicate directly via a virtual network segment. This can be done with VirtualBox, but is more difficult. However the ability to share folders with the host pretty much makes up for this. NAT-based networking is easy to set up and works quite well. In fact I have found that with shared folders, NAT’ted networking is all I need.

I plan to use VirtualBox exclusively from now on. VMWare was good, but it VirtualBox is better and costs nothing.

I hope you find this information useful.



 

 


4 Comments

  1. Pingback: Millennium Technology Consulting LLC » Virtualization Overview

  2. I also really like VirtualBox, but have found the shared folders to be quite slow to open (as in 30 or 40 seconds). Nosing around in the manual, I read about Bridged Networking, which works much better for me – the folders “shared” in this manner open as fast as they would under the host OS.

  3. Sorry, David (and anyone else who read my prior comment) – there is no problem using the shared folders feature of VirtualBox. It was my mistake in not setting up shared folders correctly. When I set it up correctly (RTFM, I know), the shared folders work like a dream. I wanted to post this to clear up the misinformation from my previous post. My apologies for the confusion.

  4. Perhaps you could post what you did to make it work correctly.

  5. Good idea. Somewhat involved, but here goes:

    How to set up file sharing between a Windows Guest and Linux Host in VirtualBox:

    1. First, be sure you have the Windows Guest Addition installed. If you don’t, see the instructions here:
    http://www.virtualbox.org/manual/UserManual.html#id2507572

    2. Then, set up a shared folder from the Linux side. From your Linux Host, start VirtualBox, then select your Windows Guest OS (just high-light it, don’t start up the OS) in the pane on the left-hand side of the main VB menu. Then click on Settings (the choice along the top left, with the icon that looks like a gear), which will open a new window with several choices along the left side. Choose Shared Folders, which takes you (surprise) to the Shared Folders window. Click on the top icon of the three that appear along the right side – it looks like a folder with a + sign, which will take you to a pop-up window for specifying the Linux folder that you want to share with your Windows Guest. (For example, I chose /home/jim/Documents.) VB automatically assigns it a name that will appear when you see this folder from Windows (sensibly, it chose “Documents,” but I believe you can change this if you wish). If you want to be able to modify – not just view – the files in this folder when accessing them through Windows, then leave the box for “read only” unchecked (the default).

    3. Finally, tell your Windows Guest how to see your new shared Linux folder. Start your Windows Guest OS, then open Windows Explorer and look for the shared Linux folder under “My Networking Places” -> “Entire Network” -> “VirtualBox Shared Folders”. By right-clicking on a shared folder and selecting “Map network drive” from the menu that pops up, you can assign a drive letter and name to that shared folder. You can then access your shared Linux folder from Windows. For more details on setting up shared folders, see the discussion in the VirtualBox manual here:

    http://www.virtualbox.org/manual/UserManual.html#sharedfolders

You must be logged in to leave a reply.