Five Step guide to Run Windows on Linux Machine
As a programmer, I love to have Linux on my desktop. Not only Linux is free, its also easy on memory and cpu utilization when compared to Vista or even XP. Microsoft OS also gets bloated with all the 3rd party firewalls and AntiVirus softwares which are required before plugging into the network.
However, there are still few instances when you need to run software(s) which are only supported on windows. Some people prefer dual-boot machines for this, but since these days most of the new desktops (even laptops) are coming with dual-core and upto 4gig of memory; I prefer running windows inside a virtual machine. In this article, I will give some details on how to install Windows OS as a VM using Virtual Box.
VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.
Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.
VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Sun ensures the product always meets professional quality criteria.
-- From VirtualBox Official Site
Step 1 : Install Virtual Box
With VirtualBox, one can run unmodified Operating System (in this example, XP) directly on top of your existing operating system (in this example, Fedora). Since XP would run under a special environment called "virtual machine" its usually called the "guest", whereas Fedora is called the "host".

The guest operating system “thinks” it’s running on real machine; whereas in the background VirtualBox is intercepting certain operations that the guest performs to make sure that the guest does not interfere with other programs on the host.
To start the installation first of all go to Virtual Box Download Page and select the "host" platform. Once selected, download the appropriate installation binary for your host platform.
In my case, since I going to run VirtualBox on Fedora-8 I downloaded VirtualBox-1.6.2_31466_fedora8-1.i586.rpm from the website.
This rpm had three dependencies, which can be resolved first by running this command :
yum install gcc libmng qt kernel-devel
After install the dependencies, you can proceed and install the actual rpm using this command.
rpm -ivh /path/to/file/VirtualBox-1.6.2_31466_fedora8-1.i586.rpm
Once installed you would see icon for "virtual box" under Applications >> System Tools.
Step 2 : VirtualBox Post Install TuneUp
After installing Virtual box, you have to add yourself ( and all other users who are going to use virtual box ) in the vboxusers group.
For doing this go to : System >> Administration >> Users and Groups. Enter administration password to make the change, which would bring up the "User Manager". In the dialog box, select groups and add your username to the "vboxusers" group.

After adding yourself to the vboxusers group, run the following command.
sudo /etc/init.d/vboxdrv setup
This step is required because VirtualBox uses a special kernel module to perform physical memory allocation and to gain control of the processor for guest system execution. Without this kernel module you may not be able to start any virtual machines.
Step 3 : VirtualBox Initialization
Now starts the fun part of installing XP. Go to Applications >> System Tools and click on icon for VirtualBox. It should open a dialog box like below. On the left, you can see a pane that lists all the virtual machines created so far. A row of buttons above it allows you to create new VMs and work on existing VMs. The pane on the right displays the properties of the virtual machine currently selected. When you start VirtualBox for the first time, as there is no virtual machine yet, everything will be empty.

Click on the NEW icon, which would start the wizard that will guide you through guest settings and installation. First thing that we have to select here is the type of Operating System we want to install, viz Windows XP.

Select the type of the guest operating system that is (or will be) installed in the VM.
Step 4 : Guest Operating System Settings
Before we can go ahead and install the guest operating system we have to create virtual HDD and memory for the system. The wizard will automatically guide you through these settings.
VirtualBox is quite flexible in deciding what virtual hardware will be provided to the guest. For example, if you provide VirtualBox with the image of a CD-ROM in an ISO file, VirtualBox can present this image to a guest system as if it were a physical CD-ROM.
- Memory Allocation : This setting determines the amount of memory (RAM) that the virtual machine should have for itself. Every time a virtual machine is started, VirtualBox will allocate this much memory from host machine and present it to the guest operating system.
- Hard Disk Settings : Here we specify a virtual hard disk for VM. VirtualBox will use a large image file on your “host” hard disk, whose contents VirtualBox presents to your "guest" as if it were a complete hard disk.
- CD/DVD-ROM Settings : Now we want to make a CD-ROM or a DVD-ROM available to the "guest", in order to install your guest operating system. We will use this this setting to specify the location of Windows XP install media or an ISO.
- Network Settings : The “Network” section in a virtual machine’s Settings window allows you to configure how VirtualBox presents virtual network cards to your VM, and how they operate. When you first create a virtual machine, VirtualBox by default enables “Network Address Translation” (NAT) mode. This way the the guest can connect to the outside world using the host’s networking and the outside world can connect to services on the guest which you choose to make visible outside of the virtual machine.
- Shared Folder Settings : Shared folders allow you to easily exchange data between a guest and your host. This feature requires that the VirtualBox Guest Additions be installed on guest.
Once all these settings have been placed, go through the regular installation process and install Windows XP operating system.
Step 5 : Virtual Machine Post Installation Tweaking
Now click the “Start” button in the main window to start the virtual machine that we just created. This will open up a new window, and will boot up XP guest as shown below :

- Shared Folder : In the previous step we setup a shared folder between Guest OS and Host OS. Shared folders allow you to access files of your host system from within the guest system, much like ordinary shares on Windows networks would – except that shared folders do not need a networking setup. Shared folders must physically reside on the host and are then shared with the guest; sharing is accomplished using a special service on the host and a file system driver for the guest, both of which are provided by VirtualBox.
This is very handy when you have to transfer files among the system on a regular basis. To do this, go to your guest system XP and create a shortcut as shown below.
- Installing Guest Additions : To improve graphics and mouse movements on the guest operation system you can also install the 'Guest Additions'. For this go to 'Devices' tab on VirtualBox and then select 'Install guest Additions', this will open up an installation dialog box within the guest OS (XP), proceed further and install the program.
It installs a special mouse driver in the guest that communicates with the “real” mouse driver on your host and moves the guest mouse pointer accordingly. After installation you will only have one mouse pointer and pressing the Host key is no longer required to “free” the mouse from being captured by the guest OS. It also provides you with extra high and non-standard video modes as well as accelerated video performance.

"Guest Additions” refers to special software packages that are shipped with VirtualBox. Even though they are part of VirtualBox, they are designed to be installed inside a VM to improve performance of the guest OS and to add extra features. VirtualBox Guest Additions provides closer integration between host and guest and improving the interactive performance of guest systems.
UPDATE : Seamless Windows Execution
With this feature, the individual windows that are displayed on the desktop of the guest machine can be mapped on the host’s desktop, as if the underlying application was actually running on the host.
- To enable this go to Machine >> Seamless Mode.
- After doing this, you can map any Windows XP (guest) application on fedora's (host) desktop. As seen in screenshot below, I am running Internet Explorer directly on Fedora's Desktop.
Hope This helps :-)
Network Host Interface
Very nice, easy guide. Just one thing I'm missing... under step 5, a howto for configuring host network.
installing xp
can you please tell me how to load windows xp on virtual box . the host os is to be susue linux enterprise 10
Post new comment