A virtualization program creates a kind of 'sealed box' which simulates a normal computer, but runs completely within the software environment of an existing operating system. Into that 'sealed box', the user can install another operating system, which then 'thinks' it's running on an ordinary PC. When the virtualized system is shut down, all the information and settings it contains is saved in a single large file on disk. There are several virtualization systems available for Ubuntu, but the best-known is VirtualBox (formerly VBox), a free program from Sun Microsystems (http://www.virtualbox.org). VirtualBox can be installed via the Add/Remove option on the Applications menu.
VirtualBox files are stored in the user's home directory in a hidden folder called .virtualbox. Apart from the basic setup information, this consists of two folders called HardDisks and Machines. The Machines folder contains the settings used by VirtualBox when starting and running a virtualized system; the HardDisks folder contains the actual information file which makes up each virtualized system.
Creating a new system image
Users creating a new virtualized system are taken through a wizard where they specify the settings. Popular systems like Windows XP have their own predefined settings which should need very little tweaking to work on the user's system. They will need to create a new 'hard disk' file which will be used to store the system; this can be either a fixed size, or a dynamic file which will be resized up to a fixed limit as files are added to the system. A 10Gb maximum should be enough for just about any operating system. Once the file is created it can be copied and moved around like any other file: so your completed Windows XP installation can be transferred via network, memory stick or hard drive to any PC running VirtualBox.
The resulting image is equivalent to a new PC with a blank hard disk, so you now need to install Windows XP on to it. Check the settings under CD/DVD-ROM and make sure that a CD is mounted. This can either be the real CD drive or a link to a drive image (ISO) file. For a legal Windows XP installation you will normally need the original XP CD, and you will need to input the installation code. With the CD inserted, start the virtualized system. It should 'boot' from the CD-ROM in the same way as an actual PC, and you can then go on to install Windows XP as you normally would.
Once the system is up and running it will appear in a panel within a VirtualBox window. (The original VirtualBox window will still be open underneath.) You can then go to the Devices menu and install the VirtualBox Guest Additions. These will then appear as a 'D' drive within Windows which can be double-clicked to install them. The Guest Additions are not essential, but they provide much more control over the Windows screen display and make it much easier to interact with the virtualized system.
After rebooting the system you should be looking at Windows XP running within VirtualBox. Take careful note of the name of the key shown at the bottom right of the screen. This is the Host Key, which provides you with an 'escape route' from Windows XP back to your Ubuntu system. Pressed in combination with other keys it can change to a full-screen display, adjust the window size, or shut down the system if it gets stuck -- see the details under the Machine menu.