Windows virtual machine no longer starts after upgrade to Ubuntu 12.04 (Precise)

Bug #994225 reported by jerico
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When trying to start my XP and Windows 7 guests for the first time via Virtual Machine Manager after upgrading to 12.04, the virtual machines would not start. The Virtual Machine Manager would either become unresponsive or the instance would simply return to "not running" state immediately.

The instance's log in /var/log/libvirt/qemu/...log says:

[...]
kvm: /build/buildd/qemu-kvm-1.0+noroms/memory.c:1239: memory_region_add_subregion_common: Assertion `!subregion->parent' failed.
2012-05-03 20:33:07.774+0000: shutting down
[...]

This led me to the following email thread:
<https://lists.gnu.org/archive/html/qemu-devel/2011-10/msg02929.html>

And this response:
<http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg03008.html>

I checked /etc/libvirt/qemu/...xml and changed

 <type arch='x86_64' machine='pc-0.12'>hvm</type>

manually to

 <type arch='x86_64' machine='pc-1.0'>hvm</type>

This solved the problem for both, XP and Win7.

Calling the command line with pc-0.12 from the libvirt log directly would start the virtual machine but it would still not boot correctly. I could connect to the guest via VNC but most of the time it would just present a black screen. The guest tried to boot from the Windows 7 recovery partition a few times, though, even showing the recovery GUI but then would not be able to recover. This is why I file against qemu-kvm and not libvirt or VMM.

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug.

I'm trying to tell whether this is related (the cause of?) bug 986133. Do you currently have model type='vga', and if so, then does it help your vm with using pc-0.12) to boot if you use

    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

Revision history for this message
jerico (jerico-dev) wrote :

Yes, changing to cirrus also solves the problem. Looks like you're on the right track. This is further evidence that the root cause could be the problem described in the mail thread I linked above. Thanks for the feedback!

Revision history for this message
jerico (jerico-dev) wrote :

I forgot to say: I did not use vga but vmvga with the vmware tools installed on the guest IIRC. This is because vmvga offers better resolution.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Changing priority to low as there are workarounds.

Changed in qemu-kvm (Ubuntu):
importance: Medium → Low
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I had the same problem with a Quantal guest with vmvga - works with cirrus.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Dave,

can you show the full xml for your guest?

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

(Still happens in 1.0.50-2012.03-0ubuntu3 now with qq host)

xml for the guest attached.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Dave,

thanks. Could you try changing the line:

<type arch="x86_64" machine="pc-0.11">hvm</type>

to

<type arch="x86_64" machine="pc-1.0">hvm</type>

and see whether that helps?

Revision history for this message
Harald Hannelius (harald-arcada) wrote :

I have lost a couple of hours on this on every dist-upgrade of Ubuntu. Wouldn't it be time to either include some xml-upgrade hook when upgrading qemu/libvirt/whatever or just drop the version-number from the 'pc' when creating guests?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Harald,

When you create guests you can specify the machine type, so if you're not tied to any features of a particular version number (the version numbers *are* supposed to provide a stable unchanging set of features, ideally :) you can certainly use 'pc'.

The script libvirt-migrate-qemu-machinetype is provided in quantal (and being SRUd to precise) to do the xml upgrading. That won't be done automatically, since not all users will want that, but you can run it yourself.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note, if someone wants to work on getting this fixed in qemu-kvm, the thing to do would be try to reproduce it with qemu git HEAD (with machine type pc-0.12) and, if reproduced, mark this bug as also affecting project QEMU.

The priority of this bug may go up if there is someone who actually needs to run windows on machine type pc-0.12 for a specific feature

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hi All,
   On QQ this VM is now booting for me (Qemu is now 1.1~rc+dfsg-1ubuntu7) (with the original XML)

The guest's X isn't that happy though (which suggests to me it's probably a separate bug?):

In Xorg.0.log:
  (EE) vmware(0): Failed to open drm.

In dmesg:

   [drm:vmw_driver_load] *ERROR* Hardware has no pitchlock
   vmgfx: probe of 0000:00:02.0 failed with error -38

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Serge: OK, another reference; if I change it to pc-1.0 I get back to the seg, if I leave it at 0.11 then on qq it boots as per comment #12.

Weird. (Note: If editing this file, stop libvirt-bin start libvirt-bin and then try it).

Dave

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Upstream git 71ea2e016131a9fcde6f1ffd3e0e34a64c21f593 boots for me with pc-1.0 as well as 0.11
Note it still does the errors I mention in #12.

I configured the kvm with:

./configure --enable-attr --enable-bluez --enable-brlapi --enable-curl --enable-curses --enable-kvm --disable-libiscsi --enable-linux-aio --disable-opengl --enable-rbd --enable-sdl --disable-smartcard-nss --disable-smartcard --enable-uuid --disable-usb-redir --enable-vhost-net --enable-virtfs --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-vnc-sasl --enable-vnc-tls --enable-xfsctl

removed oss4-dev that was causing some sound header issues, built and copied into /usr/bin/daveskvm
then frigged /usr/bin/kvm to point to that and added /usr/bin/daveskvm to the list in /etc/apparmor.d/abstractions/libvirt-qemu

stopped and restarted libvirt-bin

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Dave. Note that there are several bugs against upstream QEMU project regarding windows, but I don't offhand recall one like in comment #12. Would you mind opening a new bug for that, and I will (or you can) mark it as afffecting QEMU.

If I understand right, this particular bug is fix released in q, but we need to find the commits to cherrypick to fix in p.

Revision history for this message
Khaled Blah (khaled-blah) wrote :

I saw this bug, too, and doing what was suggested in #8 solved my problems. Thanks, Serge!

Revision history for this message
Bart Janssens (bartholomeus-j) wrote :

Just upgraded to from 11.10 to 12.04 and had to make the adjustment explained in #8 to get the windows vm up. Cheers for the temp 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.