Enjoy Windows Applications on Linux with Virtualization

815

This article is a part of a series of articles dedicated to helping Linux users accomplish tasks that require either Windows applications or Windows-equivalent applications. So far this series has covered:

This time around we visit the wonderful world of virtualization. As I have stated in the Emulation or Virtualization article, virtualization creates a contained, simulated environment in which one operating system, the host, can run another operating system, the guest. In this article I am going to show you how easy it is to get Microsoft Office running inside a Windows 7 guest running on top of a Ubuntu 9.04 host with the help of VirtualBox OSE. 

Note the OSE. There are two versions of VirtualBox – an open source version and a closed source version. We are going to concentrate on the open sourced version (for obvious reasons).¬†

What is VirtualBox?

VirtualBox is a software that makes creating virtual environments as simple as using a standard application. Originally developed by German company Innotek, VirtualBox is now developed by Sun Microsystems as part of the Sun xVM platform. VirtualBox can be used on the following hosts:

  • Linux
  • Mac
  • OS/2¬†
  • Windows XP
  • Windows Vista
  • Solaris

VirtualBox supports the following guest operating systems:

  • Linux
  • Windows XP
  • Windows Vista
  • Windows 7
  • Various BSDs
  • Haiku
  • ReactOS
  • SkyOS

The combination we are looking for from the above lists is a Linux host with a Windows guest. For the purposes of this article the Host will be Ubuntu 9.04 (with a GNOME desktop) and the Guest will be Windows 7. Before we go any further, however, we need to install VirtualBox.

Installing VirtualBox OSE

You can read everything you need to know about installing and running VirtualBox in my previous article “VirtualBox offers simple, easy-to-use virtual solutions“. This article illustrates how to set up VirtualBox for a Windows XP installation. There are really only a couple of differences you will need to make note of when creating a Virtual Machine for Windows 7. First, and most obvious, is that you will have to select Windows 7 from the Version drop down when creating the Virtual Machine. The second difference is the amount of virtual memory you will need to dedicate to Windows 7. This is where many machine fail when trying to add a Windows 7 guest. Remember, you will need a MINIMUM of 1 Gb of RAM for the Windows 7 installation. This means you will need plenty of RAM left over for your host operating system to run. Outside of those two differences, you can follow the original article to see how creating the Virtual Machine for Windows 7 is completed.

Now That Your VM is Created…

Virtual Machine ListingThe next step in the process is to put your Windows 7 disk in your drive and start your Virtual Machine. As you can see (in Figure 1) the VirtualBox Virtual Machine listing makes it very easy to select your virtual machine and start it up.

Since you will be installing Windows 7 once you press the Start button VirtualBox will detect the Windows 7 install CD in the drive and begin the installation process.

As you would expect, the installation process for Windows 7 in VirtualBox is exactly the same as it is in a standard installation. The only difference is you will need to install the Guest Additions in order to get a decent video resolution. Installing the Guest Additions happens after the installation of the operating system is installed.Guest Additions is installed on a per-virtual machine basis. Just because you install Guest Additions in your Windows 7 VM, doesn’t mean Guest Additions will be available to your other virtual machines.

Installing Guest Additions

To install the Guest Additions follow these steps:

  1. Start up your Virtual Machine.
  2. From the Devices menu select “Install Guest Additions”.
  3. Click “Yes” to download the Guest Additions image file.
  4. Click the Mount button to mount the image which will start up the Sun xVM setup wizard. 

At this point the installation is like a typical Windows application installation. When the installation is complete you will have to reboot the Virtual Machine (just reboot Windows 7). When Windows comes back up you will enjoy a much better resolution and can easily continue on with the installation of Office 2007.

Installing Office 2007

Mount CD/DVD drive You are now ready to install Office 2007. As you may already know there are different methods of installing this application: From disk or download. If you are installing from disk you need to take the following steps:

  1. Insert your disk into the CD drive.
  2. Go to the Devices menu on your virtual machine.
  3. Click on the Mount CD/DVD-ROM sub-menu (see Figure 2).
  4. Select the Host Drive option (the name of the drive will also be listed in this entry).
  5. Go to the Start menu and select Computer where you will see the Office 2007 disk listed. 
  6. Double click on the Office 2007 disk.
  7. Double click the Setup.exe file.
  8. Install as normal.

 Installing from download is handled exactly as it is done in a native Windows installation.You download the Office 2007 from the Trial page and run the installation as you would any application.

The End Results

Upon completion of the installation of Office 2007 in a virtual environment you will have a complete, working version of Microsoft Office 2007 that does not have any missing features that might be associated with installing via emulation. The Virtual Machine version of Office 2007 will be an exact replica of an Office 2007 installation running on a native Windows installation.

Pros of Virtualization

The pros of using virtualization are the deal maker for many. First and foremost you are running Office 2007 in its native environment. Because of this everything will work exactly as you would expect: You will enjoy all of the features of the application without having to suffer the possible bugs you might find when attempting to run via emulation. Another pro is that the installation is far easier than it is with emulation. Installing Office 2007 in a Virtual Machine is nearly identical to that of installing in its native environment.

Cons of Virtualization

As the pros are often the deal maker, the cons are equally a deal breaker for many. Why? By using virtualization  you are having to purchase not one license from Microsoft, but two. Not only does this cause the price to drastically rise, it also causes many fans of the GPL and Linux to shy away from virtualized solutions. Another con is the need for more system resources (which goes back to cost).

Final Thoughts

The choice is yours. You have been shown very different paths you can take in order to reach a single goal. Which is the right path for you?

Open source equivalents?

Emulation?

Virtualization?

If you need to have a Windows (or Windows type) solution for a problem, do not immediately assume you have to scrap Linux. Like with everything else Linux – there are many solutions to your problem, you just have to choose the one that fits you best.