qemu-system-i386 -m 512 -hda windows_xp.qcow2 -cdrom win_xp_pro.iso -boot d -cpu pentium3 -net nic,model=rtl8139 Use code with caution. Allocates 512MB of RAM (more than enough for XP).

Download the (specifically the older versions like 0.1.185 that still support XP). Mount it as a second CD-ROM.

Unless strictly necessary, keep the VM's network adapter disconnected.

Running Windows XP today comes with significant risks. Because Microsoft ended support in 2014, your QCOW2 image will be vulnerable to modern exploits.