If you are a Linux ubuntu user and you just want to do any thing in Windows when you are operating in ubuntu,you may not want to restart your computer and select to boot Windows.This tutorial tells how to  install Windows XP with virtualbox inside ubuntu,and I hope it may  help.Following is my virtual XP system.

snapshot19

1.First,install Virtualbox, here tells you how to install it.

2.After Virtualbox installed,click to System–>Administration–>Users&Groups,

snapshot20

click unlock at following window,enter you password then click Manage Groups

snapshot21

scroll down to select vboxusers, then click Properties,

snapshot22

tick  wraith on,wraith is my user name.

snapshot23

You can just execute following command in a terminal instead what you do above:

sudo adduser user-name vboxusers

type your ubuntu user name instead user-name.

3.Now open Virtualbox at Applications–>System Tools–>Sun VirtualBox,

Click New to create a new machine

snapshot24

click next and enter a name for the machine at bottom select OS to Microsoft Windows ,Windows XP

snapshot25

click next and set memory size,512MB is recommended if you have a 1GB RAM.

snapshot26

click next and create new hard disk

snapshot27

click next until following window,select as follow

snapshot28

click next and distribute virtual hard disk size

snapshot29

click next,then finish.you will see:

snapshot30

Click Settings,in General,set the Video Memory size,then go to CD/DVD-ROM,tick on Mount CD/DVD Drive–>Host CD/DVD drive

click Audio,select Host Audio Driver to OSS audio driver,click ok to change at last.

Now,you need a CD for Windows install,put it in you CD-ROM,and click Start ,windows will be installing.Click start to run Windows after the install finish.

Tips:

If you want to install the virtual XP system with an image file,click Settings and tick on ISO Image File at CD/DVD-ROM  tab,then add it from your disk.