4.3 KiB
layout | title | date | comments | categories |
---|---|---|---|---|
post | Virtualize a broken Windows XP machine with KVM or Xen, Part1 | 2013-11-03 09:48 | true | KVM Windows Virtualization Recovery IT |
There are still online many dirty legacy PCs which cannot be reinstalled. The most common problems are that they are installed with a special software and the CDs are lost or a license problems.
But what will happen when your zombie Durom 1300 dies? And your boss wants to use the accounting software ASAP.. The best scenario is when your HDD is healthy :)
First, you shoud find a cheap HDD -> USB converter. This is the clearest solution because I don't want to turn off my virtual hypervisors and probably, the old machine would have an IDE HDDs. Chinese combined IDE/SATA -> USB converters can be found for 15-16$.
This is the one I'm using..
##IMPORTANT!!! The old PC's are too dirty and their cases are sharp and dangerous! You should have a DPT vaccine and suitable protective clothing!!!
The HDD must be put on a PC with a hardware acceleration and KVM installed. In my case, my personal laptop was the salvation. I prepared a dummy VM with virt-manager, just to generate the XML file for libvirt. Use the simplest configuration. WinXP runs on an old hardware... Here are some steps in images:
...
Just one CPU with 1024Mb Ram is OK
It's not necessary to have WinXP iso. Use something just to generate the XML for LibVirt.
The disk is also not revelant. It will be removed after the configuration.
Better use i686
Force off the machine after this window and open the terminal.
In the terminal, type $virsh dumpxml WinXp > WinXp.xml . Open the generated text file with your text editor and find this stanzas:
{% codeblock lang:xml WinXp.xml Before.. %} {% endcodeblock %}
Remove the whole stanza about the CD Rom and change the disk configuration like this:
{% codeblock lang:xml WinXp.xml After.. %} {% endcodeblock %}
/dev/sdX must be your hard drive, connected with the chinese gadget. Make sure it's not mounted on the host system. Now your XP machine should run directly from the hard drive.
###Converting the hard drive to a virtual image..