0

Embed Windows XP Inside Ubuntu Using Virtual Box

Posted by Derek Jing on 6:15 PM in ,
Compared with Ubuntu+XP dual-boot system, this method makes it easy to switch to the other OS from current OS and share files freely.


  1. Prepare the system

  2. First you need to install the following package.Dynamic Kernel Module Support Framework.This package contains the framework for the Dynamic Kernel Module Support (DKMS) method for installing and updating kernel modules.
    $ sudo apt-get install dkms

  3. Install Compiz Fusion in Ubuntu

  4. This step is not necessary, just for beautifying desktop

    $ sudo apt-get install compizconfig-settings-manager

  5. Download and install Virtualbox

  6. Download it from the official website. Do not use Synaptic to install OSE package.
    $ sudo dpkg -i VirtualBox_3.0.0_Ubuntu_edgy.deb

  7. Add appropriate user profile to the vboxusrs group so that Virtualbox will work

  8. The group 'vboxusers' will be created during installation. Note that a user who is going to run VirtualBox must be member of that group.
    $ sudo usermod -a -G vboxusers username
    or
    $ sudo adduser username vboxusers

  9. Check building kernel module

  10. If no warning comes during installing procedure, ignore this step.

    The installer will also search for a VirtualBox kernel module suitable for your kernel. The package includes pre-compiled modules for the most common kernel configurations. If no suitable kernel module is found, the installation script tries to build a module itself. If the build process is not successful you will be shown a warning and the package will be left unconfigured. Please have a look at '/var/log/vbox-install.log' to find out why the compilation failed. You may have to install the appropriate Linux kernel headers.After correcting any problems, do
    $ sudo /etc/init.d/vboxdrv setup
    This will start a second attempt to build the module

  11. Enable USB support in Virtualbox

  12. In order to use VirtualBox's USB support, the user account under which you intend to run VirtualBox must have read and write access to the USB filesystem (usbfs).

    For 'Jaunty' you need to add a line to your /etc/fstab file:
    $ sudo gedit /etc/fstab
    Add following line to the end of the opened file:
    none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
    then run
    $ sudo mount -a

  13. Start VirtualBox

  14. Applications – System Tools – Sun xVM VirtualBox
    Create a Windows virtual machine (follow the “New” Wizzard).

  15. Basic Virtualbox configurations

  16. To be able to get your virtual machine booting from an XP install cd, we need to mount the CD/DVD drive. Click the settings button and you will see this window – click the CD/DVD-ROM tab.


  17. Start virtual machine (VM) and install Windows XP using boot XP disk




  18. Install the guest additions

  19. Once XP is completely installed, install the guest additions ISO, which will enable a full screen resolution and a lot of compatibility between Ubuntu and XP (such as folder sharing).
    To mount the Additions ISO file: Virtual machine's menu bar >> Devices >> Install guest additions ==> This will automatically bring up the Additions in your VM window.
    Note: For 'Direct 3D support' in Windows to work, the Guest Additions must be installed in Windows "safe mode". Press F8 when the Windows guest is booting and select "Safe mode", then install the Guest Additions. Otherwise Windows' file protection mechanism will interfere with the replacement DLLs installed by VirtualBox and keep restoring the original Windows system DLLs.
    Running the installer: Open windows explorer in XP, you will see the mounted ISO. Double click it to begin installation.


  20. Setup folder sharing between host and guest systems

  21. 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 require networking. 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.
    Assign folder for sharing: Virtualbox menu >> Devices >> Shared folders. Add a folder under 'Machine folder' (this shared folder can be the host ubuntu home folder)
    Mount the shared folder from inside XP: My Networking Places >> Map a network drive >> select the shared host folder, and assign a drive letter (such as 'B') for it. Done!

0 Comments

Post a Comment

Copyright © 2009 Derek's Technical Notes All rights reserved.