Ir al contenido principal

Install Windows XP on KVM with virtio drivers

Preface

Being 2023, you would be surprised on how many machines running Windows XP are out there. Of course it is the worst idea ever to have a running xp box, but it is what is when the customer requires it.

Assumptions:

  1. You have a running setup of KVM/Qemu. You can check my guide here.
  2. You use virt-manager to manage and create virtual machines.
  3. You have a Windows XP x86 SP3. This method may work for Windows XP 64 bits but I have not tested it.

1. Create the virtual machine

Fire up virt-manager

  1. Choose the ISO image location and when you have to choose the operating system, click the "Include end of life operating systems" check mark to have Windows XP as an option:

  2. Assign 1 GB of RAM and 1 CPU.
  3. Assign the disk size. Up to you but for a basic install 10GB is more than enough.
  4. Click on "Customize configuration before install" and "Finish".
  5. Change sound device to "AC97".
  6. IMPORTANT:Remove the network card. Important. If not, the installation may hang. We will add one later.
  7. Make sure that the dis bus is "IDE" for the hard disk and CDROM devices.
  8. Make sure that the video controller is set to "QXL".
  9. Go to "Boot Options". mark "Enable boot menu" and check and move the CDROM to the top of the list. KVM uses the CDROM on boot for the OS installation, and then dismounts it. This may cause the Windows XP installation to fail as it reboots and checks for the CD on the first installation phase.
  10. Click on "Begin Installation" (top left corner).

Install Windows XP

Not much to say here, just choose a quick NTFS formatting as you are using a virtual disk and performance gain from formatting it is not going to make any difference.

2. Install the virtio drivers

Virtio drivers are equal to guest additions in virtualbox or vmware tools on vSphere. If you want to have some nice features such as hardware pass through and memory ballooning, you must install them.

They are not pre-compiled as Windows binaries by default on their GitHub page, but fortunately there are various sources that do that for us. The most reliable I have found is the Fedora project repository.

Here you have a myriad of versions. Many of them will fail or cause issues. This is the version that worked for me:

  1. Download the ISO for version 0.1.185-2.
  2. Mount the ISO on Windows XP - you can do it with the virtual machine powered on.
  3. Open the device manager in Windows XP. You will see various unrecognized devices:

  4. You have to install the drivers one by one the old windows way pointing to the proper driver's folder:

    PCI Simple Communications controller (virtio serial driver): yourcdromletter:\vioserial\xp\x86

    Video controller(VGA compatible): yourcdromletter:\qxl\xp\x86

    PC Device: yourcdromletter:\Balloon\xp\x86. This is quite important as it provides memory ballooning capabilities.

  5. Install the Qemu guest agent: yourcdromletter:\guest-agent\qemu-ga-i386.msi.

  6. Shutdown Windows XP and add a network card. Choose the "virtio" driver.

  7. Power on windows and install the network driver at yourcdromletter*:\NetKVM\xp\x86.

4. Configure memory ballooning

With the virtual machine powered off, configure the range of the RAM you want to assign:


 

5. Optional: add a SCSI disk.

Add an additional disk with the "virtio" Disk Bus. The driver is in yourcdromletter:\viostor\xp\x86

6. The end.

Now you have a perfectly functional Windows XP vm, and one of themost insecure-by-design operating systems ever created.

Comentarios

Entradas populares de este blog

Recuperando datos de un archivo MIG (Windows Easy Transfer)

Hola a todos. Microsof creó en su momento una herramienta llamada Windows Easy Transfer (WET para los amigos) que permite copiar la configuración y archivos de un usuario con Windows XP a otro equipo con Windows Vista en un Disco,Unidad de red, DVD, CD o directamente con un cable especial USB. Básicamente y salvo raros casos utilizaréis la opción de transferir los archivos a una unidad de red o Disco Externo. En este caso, y tras seleccionar con el pertinente asistente de WET lo que queremos transferir, se creará un archivo de extensión .MIG con todos los datos escogidos. Tras esto, abrimos en el equipo de destino WET y restauramos los datos del archivo MIG creado. Pues bien, en mi caso, utilicé WET para exportar los datos...y me encontré con la sopresa (culpa mía por no leerme las instrucciones al detalle) que la transferencia entre versiones con distintos idiomas de Windows XP a Vista no funciona (mi XP era español y mi Vista recién instalado Inglés). Como obviamente esto me suponía...

Sincronizar tu Nokia con OSX

Cuando empecé a utilizar un MAC, y como forofo de Nokia que soy, me pregunté si mi teléfono podría ser sincronizado en OSX de forma similar a como se sincroniza en Windows (calendario y contactos, fundamentalmente). La respuesta me la dio, como es natural, Google , y es, por supuesto, que sí: las entradas de calendario con iCal y los contactos con la Agenda se pueden sincronizar. Como soy básicamente un poco vago, decidí que no sólo quería sincronizarlo, sino que además se hiciera automáticamente y sin que yo tocara nada. Acudí a Google (cómo no) , porque hay mucha más gente que yo a la que ya se le ha ocurrido lo mismo, sobre todo en los países sajones (EEUU y UK fundamentalmente) donde el porcentaje de MACs es mucho más alto. En este post-receta os indicaré cómo lo he hecho, basándome en varios posts y comentarios encontrados en Internet. Es más sencillo de lo que parece. 1 - Comprobar la compatibilidad de vuestro Nokia Se puede ver aquí . Si vuestro Móvil no está, lamento deci...