Ghacks has a nice article about a tool that will convert a Windows XP computer to a virtual machine
VirtualXP is a free for personal use software that can turn an existing Windows XP system into a virtual machine that you can run on a newer version of Windows afterwards.
It works by converting the operating system to a Microsoft virtual disk which you can run on all client and server versions of Windows starting with Windows 7 and Windows Server 2008.