XP fails to install in KVM on a LVM block device

Bug #298056 reported by Malte S. Stretz
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kvm

This issue was reported already in bug 105195 (see comment 21) but that bug is a mess of different issues so I opened a new one.

The issue here is that installing Windows XP directly on a LVM-managed block device fails while the installation into a file container works. The installation fails with "A disk read error occurred" after the first reboot (see comment 17 in the original bug, http://launchpadlibrarian.net/19436242/Screenshot-QEMU.png).

I tried both virt-install and virt-manager (connecting with virt-viewer). I haven't tried if installing directly on an IDE block device fails as well (for obvious reasons).

The following command fails:
  virt-install \
    --connect qemu:///system --hvm \
    -n xp \
    -r 512 \
    -f /dev/mapper/lvm-xp \
    -c Images/ISO/en_winxp_pro_with_sp2.iso \
    --os-type windows --os-variant winxp --arch x86_64 \
    --vnc --noautoconsole

While this succeeds:
  virt-install \
    --connect qemu:///system --hvm \
    -n xp \
    -r 512 \
    -f xp.img -s 12 \
    -c Images/ISO/en_winxp_pro_with_sp2.iso \
    --os-type windows --os-variant winxp --arch x86_64 \
    --vnc --noautoconsole

mss@Otherland:~$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10
mss@Otherland:~$ apt-cache policy kvm virt-manager libvirt-bin linux-image lvm2
kvm:
  Installed: 1:72+dfsg-1ubuntu6
  Candidate: 1:72+dfsg-1ubuntu6
  Version table:
 *** 1:72+dfsg-1ubuntu6 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
virt-manager:
  Installed: 0.5.4-2ubuntu1
  Candidate: 0.5.4-2ubuntu1
  Version table:
 *** 0.5.4-2ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
libvirt-bin:
  Installed: 0.4.4-3ubuntu3
  Candidate: 0.4.4-3ubuntu3
  Version table:
 *** 0.4.4-3ubuntu3 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
linux-image:
  Installed: (none)
  Candidate: 2.6.27.7.11
  Version table:
     2.6.27.7.11 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
lvm2:
  Installed: 2.02.39-0ubuntu2
  Candidate: 2.02.39-0ubuntu2
  Version table:
 *** 2.02.39-0ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
pva (pieter-valkenburg) wrote :

I have the same problem on 8.10 (AMD-64) (EXT3 on LVM on encrypted partition). Other installations work (jeos) If i use qemu instead of kvm the installation will pass the first boot and the graphical installations starts. (Q6700 cpu)

On 8.04-1 (AMD-64) with the same configuration I have no problems with the installation of xp. (Q6600 and Q6700 cpu)

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

As mentioned in bug 105195 did the command
  kvm -m 512 \
    -hda /dev/mapper/lvm-xp \
    -cdrom Images/ISO/en_winxp_pro_with_sp2.iso \
    -boot d \
    -name xp \
    -k de \
    -vnc :1
successfully install XP (without any reformat-hacks though).

So the bug seems to be in virt-install and/or virt-manager, maybe the --os-type and/or --os-variant enables some weird workaround which actually breaks the setup. I'll have a try later.

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

Changed from kvm to virt-manager

Revision history for this message
pva (pieter-valkenburg) wrote :

Some additional information:
I use qemu file images for my virtual disks, no raw devices. And I tried different OS types (general, vista, dos, linux,...) It all fails. Next week I'll try 8.10 again to check the proposed workaround.

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

@pva: Then you should subscribe to bug 105195 instead; I opened this bug explicitly for the sub-bug of failing installs related to raw devices while installation to a virtual disk works fine. Sorry if I didn't make that clear :)

Revision history for this message
Alvin (alvind) wrote :

XP fails to install on raw device, but it also fails to install when using virt-install or virt-manager on a qcow2 image. What is the difference here with bug 105195?

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

The difference is/was (got to try it again when I've got some time) that in my case installing on a qcow2-image is no problem while installing directly on a block device fails.

Revision history for this message
Johannes Vanderknyff (johannes-vanderknyff) wrote :

Just a tip, in intrepid, the command at the top works, but it does not have any network access. Modify the command as so for the default network interface:

  virt-install \
    --connect qemu:///system --hvm \
    -n xp \
    -r 512 \
    -f xp.img -s 12 \
    -c Images/ISO/en_winxp_pro_with_sp2.iso \
    --os-type windows --os-variant winxp --arch x86_64 \
    --vnc --noautoconsole \
    --network=network:default

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

The libvitrtd and the kernel was updated since the last time I tried. Now installing via virt-install seems to work fine. But installing from virt-manager hangs on the BIOS screen where it says "Booting from Hard Disk..."

mss@Otherland:~$ apt-cache policy kvm virt-manager libvirt-bin linux-image lvm2
kvm:
  Installed: 1:72+dfsg-1ubuntu6
  Candidate: 1:72+dfsg-1ubuntu6
  Version table:
 *** 1:72+dfsg-1ubuntu6 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
virt-manager:
  Installed: 0.5.4-2ubuntu1
  Candidate: 0.5.4-2ubuntu1
  Version table:
 *** 0.5.4-2ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
libvirt-bin:
  Installed: 0.4.4-3ubuntu3.1
  Candidate: 0.4.4-3ubuntu3.1
  Version table:
 *** 0.4.4-3ubuntu3.1 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        500 http://security.ubuntu.com intrepid-security/main Packages
        100 /var/lib/dpkg/status
     0.4.4-3ubuntu3 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
linux-image:
  Installed: (none)
  Candidate: 2.6.27.11.14
  Version table:
     2.6.27.11.14 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        500 http://security.ubuntu.com intrepid-security/main Packages
     2.6.27.7.11 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
lvm2:
  Installed: 2.02.39-0ubuntu2
  Candidate: 2.02.39-0ubuntu2
  Version table:
 *** 2.02.39-0ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

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

I tried it again. Last time the virtual machine switched off after the first Setup stage (I actually didn't watch it too closely). This time it rebootet and tried to boot from CD-ROM again. Now it hangs after "Press any key to boot from CD....." (I didn't). See attachment.

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

When I shutdown the machine after waiting for ages and start it again, Windows will boot from CD again (without asking me to press any key), ie. won't find the half-installed OS.

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

The partition the Setup created looks fine though:

root@Otherland:~# fdisk -ul /dev/mapper/lvm-xp

Disk /dev/mapper/lvm-xp: 17.1 GB, 17179869184 bytes
32 heads, 63 sectors/track, 16644 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x89b689b6

             Device Boot Start End Blocks Id System
/dev/mapper/lvm-xp1 * 63 33552287 16776112+ 7 HPFS/NTFS
root@Otherland:~# mount -o loop,offset=$((63 * 512)) /dev/mapper/lvm-xp /mnt/
root@Otherland:~# ls -l /mnt/
total 41289
-rwxrwxrwx 1 root root 232 2009-03-04 11:44 boot.ini
-rwxrwxrwx 1 root root 24448 2004-08-04 14:00 NTBOOTDD.SYS
-rwxrwxrwx 1 root root 47564 2004-08-04 14:00 NTDETECT.COM
-rwxrwxrwx 1 root root 250032 2004-08-04 14:00 ntldr
-rwxrwxrwx 1 root root 41943040 2009-03-04 11:41 PAGEFILE.SYS
drwxrwxrwx 1 root root 8192 2009-03-04 11:44 WINDOWS
root@Otherland:~# lvdisplay lvm/xp
  --- Logical volume ---
  LV Name /dev/lvm/xp
  VG Name lvm
  LV UUID 6qdF1Y-H9G4-mAge-T93i-AzKd-TZ2P-J0jgV1
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 16.00 GB
  Current LE 4096
  Segments 1
  Allocation normal
  Read ahead sectors auto
  - currently set to 256
  Block device 254:4

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

Comparing the two log files it seems that virt-install didn't use KVM (guess I had to use the --accelerate switch). Lets see if LVM is really the culprit or the KVM acceleration...

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

Ok, tried it. Either I was hallucinating or the original bug is fixed indeed: Now installing without acceleration, ie. <domain type="qemu">, works both on block devices and images while installing with <domain type="kvm"> fails in both cases.

I think the latter is a known bug, just got to find the correct entry to dup this...

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for reporting this issue.

Can you reproduce this issue with a more recent version of virt-manager, such as the one in Karmic or Lucid?

Changed in virt-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
pva (pieter-valkenburg) wrote :

I'm not using Ubuntu anymore. I use proxmox ve now for KVM virtualisation.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Does anyone else still have this issue with a recent version of virt-manager?

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to 'New'. Thanks again!

Changed in virt-manager (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Malte S. Stretz (mss) wrote :

I was AFK for a few months but tried it on lucid yesterday and XP installed fine. So I guess whatever this was, it is fixed.

Changed in virt-manager (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Intellect (pishisyda) wrote :

I'm not shure if it is a bug. Had the same problem on Gentoo. It seems one should use cache=none when using row or host_device on lvm. Setting -drive ...,cache=none before the first stage of windows XP installation solved the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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