kvm can not run Windows XP

Bug #105195 reported by Lean Fuglsang
94
This bug affects 8 people
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Invalid
Medium
Chris Halse Rogers
Hardy
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
Karmic
Invalid
Medium
Chris Halse Rogers
libvirt (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Intrepid
Won't Fix
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned
virt-manager (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
Karmic
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kvm

I have installed kvm, loaded kvm-intel and enabled virtualisation in my bios.
But kvm can not run Windows XP. The boot selection screen pops up, but choosing to run Windows goes into black screen.

kvm -hda hd.img -no-reboot -snapshot
gives an unlimited loop, notice that the computer does not reboot.

kvm -hda xp.img -no-reboot -snapshot -no-kvm
without kvm XP reboots.

qemu -hda xp.img -no-reboot -snapshot -no-kvm
works perfectly.

Revision history for this message
Darren Albers (dalbers) wrote :

Have you tried it with the -no-acpi flag? It was required when I attempted to install XP.

Revision history for this message
Lean Fuglsang (lean-ubuntu-cd) wrote :

yes

Revision history for this message
lucck (lucjan-bryndza) wrote :

KVM build in fiesty crashes when run widows XP or linux live cd fiesty fawn with error: exception 13. with Fiesty AMD64 architecture

I resolved this problem after build and install kvm version 2.4 from sources.

Revision history for this message
lmierzej (lmierzej) wrote :

I have the same problem with kvm in feisty (kvm-intel) :-(

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

I have a similar problem. The Qumranet people claim that 32-bit Windows works in KVM, though, so something must be up with Ubuntu:

http://kvm.qumranet.com/kvmwiki/FAQ#head-c3a08e5599921c18f9727e6e335257a582ade86a

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

Okay, so I get this problem whenever I try to run my WinXP machine in qemu, whether using kvm or not. I had to break out video tools to catch the Blue Screen of Death, but I get this message:

STOP: 0x0000007B (0xF7AE3928,0xC0000034,0x00000000,0x00000000)

How about you folks? Can you run XP in qemu without kvm?

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

Also, I just tried kvm-25 (Feisty comes with release 16), and it's the same thing.

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

Okay, never mind... my problem is detailed here:

http://support.microsoft.com/kb/314082

and it has to do with the emulated IDE controller. That's why I can't run in qemu, either.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Are you able to reproduce this with the current Gutsy KVM version (1:28-4ubuntu1)? Note that you may run into bug #107172 if you try it on Intel.

Changed in kvm:
assignee: nobody → raof
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

I think I'm being bitten by Bug #107172, as I get Exception 13 as soon as Windows hits the graphical splash screen.

Revision history for this message
Soren Hansen (soren) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Hardy Heron. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at [WWW] http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Revision history for this message
jhmos (jhmos) wrote :

I had an XP qcow image which I had working under Feisty but found with Gutsy that it would crash after the login screen appears. Eventually, when trying out Hardy Alpha5 I did some more digging and, when trying to do screen captures when the bluescreen appears, found this message:

Intelppm.sys, DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS,

This site : http://blogs.msdn.com/virtual_pc_guy/archive/2005/10/24/484461.aspx suggested booting into Safemode and executing commands such as:

sc config intelppm start= disabled

I had to do this a couple of for iterations because other drivers were also incompatible.

Hopes this helps with people having similar problems.

Suspect this is not going to get fixed in KVM/QEMU any time soon since is would require emulating more hardware.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Works fine for me on current Intrepid (kvm 1:71+dfsg-1ubuntu2 on kernel 2.6.26-5.15)

Revision history for this message
Lautaro Bonetto (lautaro-bonetto) wrote :

When I try install Windows XP, after de first reboot, this error appear in the bios boot: "Error de lectura de disco. Press Ctrl+Alt+Del to reboot." (Disk read error). Then I can't use this virtual machine again.

Revision history for this message
windrek (windrek) wrote :

Lautaro Bonetto's case - same error here. Intrepid daily build 22.10. (repositories have kvm version 74). I used separate LV, then image on logical volume at /home and then completele separate partition -always the same. Error code of kvm is 13.

Revision history for this message
beflapje (beflapje) wrote :

Got exactly the same issue a LAurato Bonetto .
After the first reboot

Revision history for this message
beflapje (beflapje) wrote :

please ignore my previous attachment.
Adding the corect one

Revision history for this message
beflapje (beflapje) wrote :

if you need additional info on what i'm running please tell so i can add it to this threat.
Regards

Beflapje

Revision history for this message
Brian Parma (bj0) wrote :

I too am getting this error in Intrepid. I used virt-manager to create/install the Windows XP guest image. First time it tried to boot it wouldn't work. I tried it from the command line with kvm, and I get exception 13 with a dump of #s. If I try it with the -no-kvm switch, the window appears and tries to boot, but gives "A disk read error occurred."

Revision history for this message
Rodney Richison (rodney-rcrcomputing) wrote :

I get the error reading hard drive after first windows attempt to reboot. It does not matter if I use virt-install
virt-install --connect qemu:///system -n xpsp2 -r 1024 -f /home/rodney/vservers/sambar/sambar.qcow2 -s 100 -c /home/rodney/iso/xp_corp_sp2.iso --vnc --noautoconsole --os-type windows --os-variant winxp -hvm

or virt-manager

Here's a tail -f of the log if it helps

usr/bin/kvm -S -M pc -m 512 -smp 1 -name sambar -monitor pty -localtime -no-acpi -boot c -drive file=/home/rodney/vservers/sambar/sambar.qcow2,if=ide,index=0,boot=on -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=00:16:36:11:47:8e,vlan=0 -net tap,fd=15,script=,vlan=0,ifname=vnet2 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:2
char device redirected to /dev/pts/2
char device redirected to /dev/pts/3
info cpus
cont

Revision history for this message
Juel (juel-juels-world) wrote :

I can confirm this bug on intrepid 64bit intel:

kvm -m 1024 -boot d -cdrom /mnt/data/juel/IMAGES/WindowsXP_CD.iso -hda /dev/mapper/isw_cgbcheahia_KVMOS3

works until reboot, then when switching -boot d to -boot c

kvm -m 1024 -boot c -cdrom /mnt/data/juel/IMAGES/WindowsXP_CD.iso -hda /dev/mapper/isw_cgbcheahia_KVMOS3

fails with "A disk read error occured"

Surprisingly I can boot my second WindowsXP which I didn't install using kvm without any problems and the exactly same parameters ( using -no-acpi fails here )

Revision history for this message
Christopher (captain-c) wrote :

I am also experiencing this problem on Intrepid 64bit. Trying to run from Virtual Machine Manager.

Revision history for this message
Malte S. Stretz (mss) wrote :

Here it fails only if I try to install it directly on an LVM block device while an image file works; I opened the separate bug 298056 for this because it seems like this bug is a collection of different issues.

Revision history for this message
Dri (michael-mattsson) wrote :

Confirming this bug on Intrepid 64-bit with kvm_intel.

Tried Windows XP SP1, Windows 2003 Standard R2 and Windows 2000 SP4. Installer starts fine, after first reboot: "A disk read error occured".

Tried to convert a vmdk file to qcow (with qemu-img) hosting a Windows XP machine. Loader starts but immediately reboot. But the point is that the loader is found on the disk as it let's me boot in "Safe Mode".

Using this converted disk file let me re-install Windows XP without breaking a sweat. My best guess is that whatever way virt-manager uses to create disk images is broken somehow.

Revision history for this message
Rodney Richison (rodney-rcrcomputing) wrote :

I got around this by installing with kvm, format the drive, then boot with virt-manager and do the installation without formating the drive.

kvm -m 512 -hda winxp.qcow2 -cdrom xp_sp2.iso -boot d
just format the drive
then boot with virt manager, do NOT format the drive, choose "leave file system as it is".

Of course, you either need to do this from the local machine (if you have a gui loaded) or you'll have to get x-forwarding working across your ssh connection. I did it from the local machine.

Sure enough a nasty little bug though. :)

Revision history for this message
Christopher (captain-c) wrote :

Rodney, do you mind adding some more detail? I'm not sure what you mean by formatting the drive before the installation; or how to do that at least.

Revision history for this message
Rodney Richison (rodney-rcrcomputing) wrote :

Start the vm with this command "change to suit your setup"

kvm -m 512 -hda winxp.qcow2 -cdrom xp_sp2.iso -boot d

As you can see, we're booting from a cdrom image.
During the windows install, you have a chance to choose the partition your installing to, then you choose to format that partition.
Right after the format, you can stop the installation and quit the vm.
Now you start the vm with virt-manager, booting from the cdrom and go thru the installation a second time. This time, you choose the partition you made but DO NOT FORMAT IT, choose "leave file system as it is". From there, it's a normal installation.

Note: If you finish the install from the kvm command rather than the virt-manager, windows will likely not boot thereafter from virt-manager. However, that's no problem, you can re-install over it WITHOUT formating. The virt-manager partitioning/formatting seems to be the issue..

Revision history for this message
Jamin W. Collins (jcollins) wrote :

I can confirm that Rodney's solution does in fact work. Strange as it sounds.

Revision history for this message
ericc (eric-cheminot) wrote :

I can also confirm that Rodney's solution works. But - in my case - either not totally or I'm having another issue: the CPU usage of underlying kvm process is almost 100%. (Ubuntu 8.10 32bits on AMD 4600+, and the PC under guest Windows is seen as "normal", so it is - I think - not the regular ACPI issue)

Revision history for this message
Rodney Richison (rodney-rcrcomputing) wrote :

Ericc,

I did not have this issue, however, if it helps, I tend to make notes as I go.. Here's the link, you'll see a ubuntu kvm page there.

http://programs.rcrnet.net/

Revision history for this message
ericc (eric-cheminot) wrote : Re: [Bug 105195] Re: kvm can not run Windows XP

Rodney,

Thanks a lot for your notes! I am a beginner regarding KVM and your
notes will indeed be helpful.

-ec

On Fri, Nov 21, 2008 at 11:48 PM, Rodney Richison
<email address hidden> wrote:
> Ericc,
>
> I did not have this issue, however, if it helps, I tend to make notes as
> I go.. Here's the link, you'll see a ubuntu kvm page there.
>
> http://programs.rcrnet.net/
>
> --
> kvm can not run Windows XP
> https://bugs.launchpad.net/bugs/105195
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Alan (airoff) wrote :

I hope someone else can verify this, but I believe I have a workaround to the "lost drive" problem. I used W2K3 R2 Standard, 32 bit on a Ubuntu 8.10 server 64 bit.

Use Virtual Machine Manager to create a new VM. Set the hard disk to an IMG, not a QCOW2.

The preinstall went fine. Before you reboot the windows machine, remember to set the CD back to the win2k3 iso image.

Worked for me - anyone else?

--airoff

Revision history for this message
Hety (ruben-arutyunyan) wrote :

Solution by Rodney works. I actually just installed Win2k3 32bit on my machine fully and just booted it at my server.\

There is another problem however. I want to install yet another machine on server , but this time on lvm partition. Symptoms arte same, but its a headless machine and i cant use same solution. Ideas?

Revision history for this message
Jamin W. Collins (jcollins) wrote :

@Hety
I haven't tried is personally, but wouldn't an X11 forward via SSH give you the display from kvm even on a headless machine?

Revision history for this message
Hety (ruben-arutyunyan) wrote :

Well i have a workaround that will work for everyone i hope.

1: make a "service" .img with xp/win2k3 install. Minimal one. You can do it on your machine.
2: copy it over to server and attach all the partitions or .img files you will need to it.
2: boot it. It will give some acpi errors(mine did), ignore it.
3: Format everything you need using this machine. I had a glitch here: i had to format partition with assigned letter. If there was no assigned letter(D:, E: you name it) formatting ended with error. For me making partition and immediately adding letter + formatting it from the same wizard worked best.

Have fun guys.

Revision history for this message
mevdschee (mevdschee) wrote :

The solution that Rodney Richison proposed works for me.

I run Ubuntu Intrepid with kvm and got a Exception 13 after first reboot during windows xp home install.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hello all,

I was able to successfully install WindowsXP in virt-manager on a Jaunty Host, from end-to-end, without any hackery.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi all,

I have also verified that I'm able to install and run WindowsXP from the kvm command line, with:
 $ kvm -m 1024 -hda windowsxp.img -cdrom ../iso/windows_xp.iso
on a Jaunty host.

This bug appears fixed, to me. If anyone can reproduce this problem on Jaunty, please reopen the bug.

Cheers!
:-Dustin

Changed in kvm:
status: Incomplete → Fix Released
Revision history for this message
Esa Häkkinen (esa+hakkinen) wrote :

Reporting this occur also in Windows 2000 after DX9.0c install.

After six restarts with windowsupdate.microsoft.com, I finally installed DirectX 9.0c, which created this same behavior also appear on Win2000.

What does DX9.0c install as HDD driver, that breaks BIOS to Kernel loading process?

Revision history for this message
brainstorm (brainstorm) wrote :

Neither of the solutions proposed works in my remote Jaunty installation. I've followed the following howto step by step:

http://www.howtoforge.com/installing-windows-xp-as-a-kvm-guest-on-ubuntu-8.10-desktop

And also tried to fix the MBR as suggested by:

http://un.codiert.org/2008/09/booting-windows-xp-from-raw-disk-with-linux-kvm/

No matter what I try, disk read error is permanent, both using qemu img files and LVM volumes.

Revision history for this message
Nelson Kwai (nelson-kwai) wrote :

This problem occurs when booting a vmdk file (created with vmware's physical to virtual tool) with kvm-84 on jaunty 64bit.

Changed in kvm (Ubuntu Jaunty):
status: New → Fix Released
Changed in kvm (Ubuntu Hardy):
status: New → Confirmed
Changed in kvm (Ubuntu Intrepid):
status: New → Confirmed
Changed in virt-manager (Ubuntu Jaunty):
status: New → Fix Released
Changed in virt-manager (Ubuntu Karmic):
status: New → Fix Released
Changed in virt-manager (Ubuntu Hardy):
status: New → Confirmed
Changed in virt-manager (Ubuntu Intrepid):
status: New → Confirmed
Changed in libvirt (Ubuntu Karmic):
status: New → Fix Released
Changed in libvirt (Ubuntu Jaunty):
status: New → Fix Released
Changed in libvirt (Ubuntu Hardy):
status: New → Confirmed
Changed in libvirt (Ubuntu Intrepid):
status: New → Confirmed
Changed in kvm (Ubuntu Intrepid):
status: Confirmed → Invalid
Changed in kvm (Ubuntu Hardy):
status: Confirmed → Invalid
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, I've spent the day working with pmatulis on this bug.

We've been using the kvm-84 backport candidate from the ~ubuntu-virt PPA.

On Jaunty and Karmic, I'm able to install WindowsXP using virt-manager and libvirt without a problem.

On Hardy, I am not able to complete the installation using virt-manager and libvirt. I am able to make it through the first stage of the installer (blue, text screen). However, on reboot, the disk image is not bootable. I get an error stating that "A disk read error occured", and that I need to hit ctrl-alt-delete.

However, on Hardy, I am able to install Windows XP without a problem using kvm directly from the command line:
 $ kvm-image create -f qcow2 xp.img 7G
 $ kvm -m 512 -hda xp.img -cdrom xp.iso -boot d
(first stage of installation, shutdown at reboot)
 $ kvm -m 512 -hda xp.img -cdrom xp.iso -boot c
(finish installation)

Thus, I strongly suspect that the bug is in either virt-manager or libvirt in Hardy.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I have uploaded a backported libvirt to the ~ubuntu-virt ppa:
 * https://launchpad.net/~ubuntu-virt/+archive/ppa

Can you please try the kvm and libvirt found in that PPA?

:-Dustin

Changed in virt-manager (Ubuntu Intrepid):
status: Confirmed → Invalid
Changed in virt-manager (Ubuntu Hardy):
status: Confirmed → Invalid
Changed in virt-manager (Ubuntu Jaunty):
status: Fix Released → Invalid
Changed in virt-manager (Ubuntu Karmic):
status: Fix Released → Invalid
Changed in kvm (Ubuntu Karmic):
status: Fix Released → Invalid
Changed in kvm (Ubuntu Jaunty):
status: Fix Released → Invalid
Revision history for this message
Johannes Rauch (joe-smoke) wrote :

same problem here, first step of windows xp setup works fine, then after rebooting from hdd for second step shows just a black screen with a white dash .

i'm now able to boot windows from disk by using "-cpu coreduo,nx" option for kvm as shown in bug #395356 and bug #379991

Revision history for this message
Gavin Hamill (gdh) wrote :

+1 - the options I needed are "-cpu coreduo,-nx" rather than 'nx' as mentioned by Johannes

I have an older Core Duo (Thinkpad X60s) which does support the nx flag, but I must forcibly disable it if I want XP to run ... same store - stage one ('DOS-style' install works, but the first reboot to complete the installation just hangs at 50%CPU usage on a black screen..)

gdh@gdh-x60s:~$ cat /proc/cpuinfo | grep nx
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts pni monitor vmx est tm2 xtpr pdcm

Linux 2.6.28-15-generic on jaunty

gdh

Revision history for this message
Johannes Rauch (joe-smoke) wrote :

i guess it has something to do with intel cpus - i installed recently a kvm-vm with windows server 2008 on my "amd athlon 64"-based jaunty server with no problems at all...

on my notebook, i still got problems booting non-virtio based vms from harddisk using virt-manager/libvirtd. a linux-vm with virtio-driver works fine...

dell xps 1330m
intel core2duo t7250
ubuntu 9.04 (i386)
kernel 2.6.30.5

Revision history for this message
Pieter (diepes) wrote :

I get the blank/black screen after the bios, booting XP vm's i setup on the same pc a while ago.
Could it be the kernel version ?

Revision history for this message
Didi Kohen (kohen-d) wrote :

The bug is in KVM after all, I found out that PAE is needed for 32-bit kernels for supporting the NX flag, this makes things work perfectly with no added flags in the "server" variant of the kernel. (and on 64 bit kernels)

Revision history for this message
iMx (ed-stout) wrote :

Not working on Karmic:

2.6.31-12-generic #40-Ubuntu SMP Wed Oct 7 04:14:43 UTC 2009 i686 GNU/Linux

Running latest updates of everything from standard repo's, boots in safe mode - however dies with anything else, including +/-nx

Jarrett Miller (spook)
description: updated
Revision history for this message
John Barley (strange-cathect) wrote :

I've now had this bug through 3 releases of Ubuntu (currently Karmic). I am still unable to get past the "Setup cannot recognize Disk" error using the virtual manager.

Revision history for this message
K. Chowksey (klchxbec) wrote :

Turning the disk cache off solved this problem for me:

Instead of kvm ... -hda WinXP.img ...
Say kvm -drive file=WinXP2.img,index=0,media=disk,cache=none

Althoug, I don't know if this is a workaround for a windows bug or a kvm bug.

Revision history for this message
Chuck Short (zulcss) wrote :

Since Intrepid has reached end of life Im closing this SRU request.

Changed in libvirt (Ubuntu Intrepid):
status: Confirmed → Won't Fix
Revision history for this message
Intellect (pishisyda) wrote :

Thanks K. Chowksey. Your post helped me to solve my problem whith installation of windows XP on host_device on lvm on Gentoo. Set my drive like that "-drive file=/dev/mapper/vg_main-lv_profstr,format=host_device,cache=none,if=ide,media=disk" before the first stage of windows XP installation.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in libvirt (Ubuntu Hardy):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.