QEMU/Guests/Windows XP: Difference between revisions

No edit summary
(5 intermediate revisions by 2 users not shown)
'''[[How_to_install_Windows_2000_in_QEMUQEMU/Guests/Windows 2000|< Windows 2000]]''' | '''[[How_to_install_Windows_Longhorn_in_QEMUQEMU/Guests/Windows Vista|Windows LonghornVista >]]'''
{{DISPLAYTITLE:How to install Windows XP in QEMU}}
[[File:winxpQEMUXP.jpgpng|thumbnail|350px|Windows XP running in QEMU]]
 
This page details how to install Windows XP in QEMU. '''Windows XP''' is an operating system created by Microsoft, first released on August 24, 2001. SupportIt endedhad inseveral Aprilservice 8,packs 2014and butdozens thisof variesdifferent based on the version your usingvariations. WindowsSupport XPended hason severalApril different8, editions2014 (suchfor asthe Homeregular Edition,version Tabletand PCApril edition9, Media2019 Center edition, Embedded, etc). This article covers every variant of Windows XP includingfor POSReady 2009 which is supported until 2019.
 
While this guide will work for every version and service pack, we will be using and strongly recommend using Windows XP Professional Service Pack 3, since it has the greatest application support.
==Running on CollabVM==
Windows XP works great as a VM for CollabVM. A few programs do not work on it but thanks to its still large popularity this usually isn't a big problem. VM 2 on the official CollabVM website runs Windows XP with Service Pack 3 and Windows 2000. Both Home and Professional are known to work perfectly fine in QEMU and CollabVM.
 
==Prerequisites==
'''Recommended version''': Windows XP Professional with Service Pack 3
===QEMU===
You'll need [[QEMU/Installation|QEMU]] installed.
 
===Windows XP ISO===
You'll need a Windows XP ISO for this guide. You can use a physical disc or download the [https://computernewb.com/isos/windows/en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso vanilla (SP3) iso] here, or an [https://computernewb.com/isos/windows/Windows%20XP%20Professional%20SP3%20x86%20-%20Integral%20Edition%202022.9.9%20%28Vanilla%29.iso updated SP3 ISO with most updates slipstreamed].
 
==Starting up==
===Installation===
First, open a command window and create a disk image for the VM using a command like the following.
 
<pre>qemu-img create -f qcow2 winxp.img 10G12G</pre>
===QEMU===
'''10G12G''' can be replaced with however big you want the hard drive to be (with G standing for Gigabytes'''G'''igabytes). Since Windows XP is notan really that big of anolder OS and, it candoesn't eventake beup installeda on 2 GBlot of space. ifIf you're turnplanning hibernationto off,install buta 5lot GBof isapplications recommendedand asgames, a30G minimum if you want toshould be able to install severaldecent programsenough.
====Pre-installation====
Make a qcow2 image (or a raw image if you want) by typing
<pre>qemu-img create -f qcow2 winxp.img 10G</pre>
 
When that's done, runstart theup followingQEMU with a command like the following:
'''10G''' can be replaced with however big you want the hard drive to be (with G standing for Gigabytes). Windows XP is not really that big of an OS and it can even be installed on 2 GB of space if you turn hibernation off, but 5 GB is recommended as a minimum if you want to be able to install several programs.
<pre>qemu-system-i386 -m 512M -hda winxp.img -device VGA,vgamem_mb=64 -cpu host -accel kvm -M pc -netdev user,id=lan -device rtl8139,netdev=lan -usb -device usb-tablet -rtc base=localtime -monitor stdio</pre>
 
This adds a VGA card (with 64 MB of VRAM, to allow high resolutions and color depth), KVM acceleration (allowing the OS to run at native speeds), an RTL8139 internet adapter, and a USB tablet for smooth mouse input.
When that's done, run the following command:
 
We set the memory to 512 MB, but it can technically run on as low as 96 MB of RAM or as high as 4 GB of RAM. Since XP is a 32-bit OS it can't recognize more than 4 GB, though there is a 64-bit version which removes this limitation. (There is a PAE patch that also removes this limitation, but programs can't use more than 4 GB regardless.)
<pre>qemu-system-i386 -hda winxp.img -cdrom winxp_iso_name.iso -boot d -enable-kvm -cpu host -m 512 -vga cirrus -net nic,model=rtl8139 -net user -usbdevice tablet -localtime</pre>
 
If you use Integral Edition, you can get better performance by switching <code>-M pc</code> with <code>-M pc-q35-2.6</code>.
Or if running without root or virtualization:
<pre>qemu-system-i386 -hda winxp.img -cdrom winxp_iso_name.iso -boot d -cpu qemu64 -m 512 -vga cirrus -net nic,model=rtl8139 -net user -usbdevice tablet -localtime</pre>
 
From here, the installation is pretty straightforward. Agree to the license, (quick) format the disk, and wait for it to install. The OS should install pretty quick on newer systems.
We run with 512 MB of RAM, but this can be lowered to 256 MB if your server is low on resources. It also runs on as low as 64 MB of RAM but this is unrecommended. If you cannot allocate more than 128 MB of RAM, you may want to run [[Windows 2000]] instead, which runs better on 128 MB.
 
===Installing Superium and MyPal===
====After installation====
It is highly recommended to install Supermium or MyPal, which are modern browsers for Windows XP. Supermium is based on Chromium 122, while MyPal is based on Firefox 68. Supermium is recommended for beefy systems, while older systems or systems with lower RAM should use MyPal.
<pre>qemu-system-i386 -hda winxp.img -boot c -enable-kvm -cpu host -m 512 -vga cirrus -net nic,model=rtl8139 -net user -usbdevice tablet -localtime</pre>
 
====Supermium====
Or if running without root or virtualization:
Supermium needs at least XP SP1, SS3, and around 2 GB of RAM to function properly.
<pre>qemu-system-i386 -hda winxp.img -boot c -cpu qemu64 -m 512 -vga cirrus -net nic,model=rtl8139 -net user -usbdevice tablet -localtime</pre>
 
[[File:SupremiumXP.png|thumb|right|alt=A screenshot of Supermium running on XP|Supermium running]]
====Setting up your VM====
# Open Internet Explorer (or whatever browser you have installed)
# Navigate to <code>http://win32subsystem.live/supermium/legacy/</code>
# Download the 32-bit Setup and run it
# You will get a few options in the setup. All of them are optional but I recommend installing the Noto Emoji font and creating shortcuts for Supermium. Hit OK
# If all went well, Supermium should be working!
 
====MyPal====
After going through the OOBE, it is recommended to go through gpedit.msc and manage some policies. If you have an AD (Active Directory) server, you can hook up your VM to that and manage policies there. If you want, you can also "debloat" the OS making it run slightly faster, though, versions earlier than 8.1 are not as bad.
[[File:MyPalXP.png|thumb|right|alt=A screenshot of MyPal running on XP|MyPal running]]
# Download the [https://computernewb.com/isos/software/mypal68.iso MyPal 68 ISO] or download [https://github.com/Feodor2/Mypal68/releases/download/68.13.8b/mypal-68.13.8.en-US.win32.zip from GitHub]
# Switch to the MyPal ISO by running a command similar to the following in the QEMU console: <pre>change ide1-cd0 /path/to/mypal68.iso</pre>
# Open the CD and extract the ZIP file anywhere
# Navigate to the MyPal folder and open mypal.exe
# If all went well, it should be running now!
 
[[Category:Windows installation guides]]
[[Category:QEMU guides]]
 
===Activation===
'''[[How_to_install_Windows_2000_in_QEMU|< Windows 2000]]''' | '''[[How_to_install_Windows_Longhorn_in_QEMU|Windows Longhorn >]]'''
Have a copy of XP SP2 or SP3 that isn't activated? Here's how to fix that:
 
# Download the [https://computernewb.com/software/windows_activation/%5BWINXP%5D%20XP%20Phone%20Keygen.exe XP telephone keygen]
# Click Start -> Activate Windows
# Check "Yes, I want to telephone a customer service representative to activate Windows" and click Next
# Open the keygen
# Click the "Get from the system" button, if that doesn't work, type the installation ID manually into the program (you'll see it in step 3, its a long string of numbers)
# Type the numbers you get in the the keygen's "Confirmation ID" into their respective columns in the activation program
# Click "Next"
# Windows should be activated!
 
'''[[QEMU/Guests/Windows 2000|< Windows 2000]]''' | '''[[QEMU/Guests/Windows Vista|Windows Vista >]]'''