Post

Running Windows XP on Ubuntu with KVM

Hey there, welcome back to “Adnane’s World”! It’s been ages since I hit you with some wisdom, but guess what? I survived my final exams (next semester is one day away :/ ). Today, we’re jumping into the exciting world of KVM (Kernel-based Virtual Machine) and virtualization.

Let’s do something cool together! I’ll show you how to use KVM to run Windows XP on your Ubuntu. It’s like blending vintage Windows with Ubuntu. Easy and fun! Let’s get started!

Ubuntu Update

To start, launch the terminal and update your local package index as follows.

Desktop View

Check Virtualization Status

Before proceeding, check if virtualization is enabled on your system. Your CPU must support KVM virtualization, which requires an Intel VT-x (vmx) or AMD-V (svm) processor. Run the following command, and if the output is greater than 0, virtualization is enabled. Otherwise, it’s disabled, and you need to enable it.

Desktop View

Desktop View

If virtualization is not enabled, activate it in your system’s BIOS settings. Additionally, check KVM virtualization status with the following command:

Desktop View

For this to work, you need to have the cpu-checker package installed. If not, install it:

Desktop View

Desktop View

Then run the kvm-ok command. If KVM virtualization is enabled, you should get the following output:

Desktop View

Desktop View

Install KVM on Ubuntu

Next, run the following command to install KVM and additional virtualization packages on Ubuntu, in my case iuse Ubuntu Lite :

Desktop View

Desktop View

Breakdown of installed packages:

1
2
3
4
5
6
qemu-kvm: Open-source emulator and virtualization package providing hardware emulation.
virt-manager: Qt-based graphical interface for managing virtual machines through the libvirt daemon.
libvirt-daemon-system: Package providing configuration files required to run the libvirt daemon.
Virtinst: Set of command-line utilities for provisioning and modifying virtual machines.
libvirt-clients: A set of client-side libraries and APIs to manage and control virtual machines and hypervisors from the command line.
bridge-utils: Set of tools for creating and managing bridge devices.

Enable Virtualization Daemon (libvirtd)

With all packages installed, activate and start the Libvirt daemon.

Desktop View

Check that the virtualization daemon is running:

Desktop View

Desktop View

Additionally, add the currently logged-in user to the kvm and libvirt groups to create and manage virtual machines.

Desktop View

The $USER environment variable points to the currently logged-in user. To apply this change, you need to log out and log back in.

Launch KVM Virtual Machines Manager

Once KVM is installed, start creating virtual machines using the virt-manager graphical interface. Use the GNOME search utility and look for “Virtual Machine Manager”. Click on the appearing icon to launch the Virtual Machine Manager interface.

Desktop View Desktop View

Click on “File” and then select “New Virtual Machine.” Alternatively, use the displayed button

Desktop View

This opens the virtual machine installation wizard, presenting four options: Local installation media (ISO or CDROM image) Network installation (HTTP, HTTPS, and FTP) Import an existing disk image Manual installation In this guide, assuming you have downloaded a Windows XP ISO image ( you can download the ISO file from archive.org ), select the first option and click ‘Forward.’

Desktop View

In the next step, click ‘Browse’ to locate the ISO image.

Desktop View

In the following window, click ‘Local Browse’ to select the ISO image from your Linux PC’s local directories.

Desktop View

As demonstrated below, we selected the Windows XP ISO image. Then click “Open”. Once the ISO image is selected, click ‘Choose Volume’ to proceed to the next step.

Desktop View

Next, set the RAM and the number of CPU cores for your virtual machine and click “Forward”.

Desktop View

In the following step, set the disk space for your virtual machine and click “Forward”.

Desktop View

Finally, click ‘Forward’ to complete the virtual machine configuration.

Desktop View

Shortly after, the virtual machine creation process will start.

Once finished, the virtual machine will boot with the operating system installation program displayed. From there, you can proceed with installing your preferred system.

Desktop View

This post is licensed under CC BY 4.0 by the author.