Virt-manager upgrade 0.9.0 is not in sync with libvirt

Bug #823494 reported by Boris Derzhavets
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
seabios (Ubuntu)
Fix Released
Low
Boris Derzhavets

Bug Description

After upgrade virt-manager to 0.9.0 I have Spice runtime session in QXL mode broken. Just black screen. Only Spice&VGA works now for install and for runtime. Version of Libvirt is 0.9.3 in preview environment on F15 and everything works just fine.
Another my suspect ( regarding installation mode) is outdated QXL driver for X-Server. Too much QXL changes went in qemu-kvm 0.15-rc1.

Tags: patch

Related branches

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

After the most recent upgrade usual VNC sessions via VirtMan gets broken.
I am running qemu-kvm 0.15-rc1 for 7-8 days . It never happened before.
Two boxes are affected in same way.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I guess new Virt-manager has problems with X-Server. It's possible to manage VMs via "virsh" and clients modules connections.
Actually, it doesn't crash X-Server it makes a screen a kind of postmodern picture.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

After upgrade to xserver-xorg-video-qxl 0.0.14-1 X.Org X server -- QXL display driver
there is some improvement.

Switching to QXL in VM 0.9.0 automatically allocate 64M vram for QXL videomode
virsh dumpxml VF15 shows :-
<video>
      <model type='qxl' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
It doesn't work

Updating XML profile as follows
<video>
      <model type='qxl' vram='32000' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
Now

# virsh delete VF15
# virsh define VF15-new.xml

It allows VF15 to behave normal in Spice VM's session

Version of qemu-kvm is now 0.15.0 stable.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

My best is
      <model type='qxl' vram='32768' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
Works stable for Natty and F15 KVMs
Attempts to hack source of VirtMan and Virtinst with no luck. I cannot find file (*.py ) from where the number 65536
comes for "qxl" video mode as vram.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

It's here

~/LIBVIRT/libvirt-0.9.2/src/conf/domain_conf.c

. . . . . .

case VIR_DOMAIN_VIDEO_TYPE_QXL:
        /* QEMU use 64M as the minimal video video memory for qxl device */
        return 64 * 1024;

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

As of 08/13/11 patched version of Oneiric's Libvirt allocating by default
32M vram for QXL device uploaded to ppa:bderzhavets/qemu-git.
Now installs and runtime may be run in QXL mode via VirtManager 0.9.0 and
via spicec. XML updates using virsh commands are no longer required.

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

Thanks for the bug report and information, Boris.

We may sync libvirt 0.9.4-5 from debian sid this cycle. If understand your comments correctly that may fix your issue.

Changed in libvirt (Ubuntu):
status: New → Won't Fix
importance: Undecided → Low
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

May be yes and might be no. Oneiric's X-Server can handle request for 32M vram coming from QXL device qemu-kvm 's userland
process running Spice session. It works for install and for runtime. Patch is completely harmless for libvirt. I believe it's understandable. But as soon as amount of vram requested by QXL device comes up to 64M X-Server becomes unable to handle this request. I carefully read xserver-xorg-video-qxl description and went to conclusion that it's functionality is not connected to this
problem. As far as Qemu-kvm 0.15.0, Spice, QXL are NOT legitimate guests of Oneiric OS i cannot escalate the issue due to the
issue appears to be a problem of my private PPA's development.

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

Hi Boris,

can you attach the patch you are talking about?

This bug will be blocked on getting spice packages synced from Debian, but I'm hoping to get that started today.

Changed in libvirt (Ubuntu):
status: Won't Fix → Confirmed
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

# cat QXL-32M.patch
--- libvirt-0.9.2.orig/src/conf/domain_conf.c 2011-08-13 15:47:00.036368913 +0400
+++ libvirt-0.9.2/src/conf/domain_conf.c 2011-08-13 15:49:54.516368948 +0400
@@ -4519,7 +4519,7 @@

     case VIR_DOMAIN_VIDEO_TYPE_QXL:
         /* QEMU use 64M as the minimal video video memory for qxl device */
- return 64 * 1024;
+ return 32 * 1024;

     default:
         return 0;

Raw source attached

tags: added: patch
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I went trough http://mentors.debian.net/package/spice-gtk it reproduces exactly packaging schema of
spice-gtk-0.7.1-1.fc16.src.rpm. The same dependency bug which was resolved on Ubuntu a while ago
 (Spice-Gtk-0.6) popped up again. I saw this way of building Spice-Gtk-0.7 as soon as spice-gtk-0.7.1-1.fc16.src.rpm
was out (about 07/30/11) along with dependency issue. Why I didn't work as I could ?
I believe it's pretty much understandable. The final goal is to reproduce F16's Spice-Gtk-0.7's files layout on
Debian or Ubuntu picking up right libraries and run ./configure with right options for right packages.
Question of packaging is question of professional software design, nothing else, and time been spent to perform this design.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Quoting : http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00710.html

On Thu, Aug 04, 2011 at 11:03:10AM -0500, Rick Vernam wrote:
> it seems that qxl is not working correctly with any of the 0.15 releases thus
> far. this includes qemu and qemu-kvm.
>
> when I start qemu like so:
> qemu-system-x86_64 -cpu host -enable-kvm -m 768 -usb -vga qxl -monitor stdio
> I get a black screen.

I recently had black screen problems with QXL in 0.14.x that turned out to
actually be a Seabios bug due to the default 64MB vram QXL has. I suspect
this would hit 0.15.x builds too. If this is what you're hitting, then
reducing the vram to 32MB is a temporary workaround that should help, eg

   -vga qxl -global qxl-vga.vram_size=33554432

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

View :
http://<email address hidden>/msg73569.html

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Installed bios.bin sould be replaced by downloaded from http://spice-space.org/download/seabios/ as of 08/10/11
root@host:/usr# ls -l ` find . -name bios.bin -print`
lrwxrwxrwx 1 root root 19 2011-08-20 15:47 ./share/qemu/bios.bin -> ../seabios/bios.bin
-rw-r--r-- 1 root root 131072 2011-05-20 00:41 ./share/seabios/bios.bin
Then QXL device will work with 64M vram at install and runtime in spice sessions.
Issue is connected with Qemu-kvm 0.15 Release

Changed in libvirt (Ubuntu):
assignee: nobody → Boris Derzhavets (bderzhavets)
status: Confirmed → Fix Committed
affects: libvirt (Ubuntu) → seabios (Ubuntu)
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

The most recent snapshot for seabios supporting 64M vram for QXL device
uploaded to ppa:bderzhavets/test-deb2, ppa:bderzhavets/test-deb1

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package seabios - 0.6.2-0ubuntu2

---------------
seabios (0.6.2-0ubuntu2) precise; urgency=low

  * Add all patches up to commit 8e301472e324b6d6496d8b4ffc66863e99d7a505
    to match what is shipped with qemu-kvm. This includes the fix for a
    black screen when running kvm with -vga qxl. (LP: #823494)
  * debian/rules: address lintian warning:
    debian-rules-missing-recommended-target
 -- Serge Hallyn <email address hidden> Thu, 17 Nov 2011 12:31:22 -0600

Changed in seabios (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Tom Vaughan (tvaughan) wrote :

I still have this problem with seabios 0.6.2-0ubuntu2 on a completely up-to-date 12.04 x86_64.

Duplicates:
https://bugs.launchpad.net/ubuntu/+source/seabios/+bug/958549
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm-spice/+bug/970234

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

Thanks, Tom. If I understand right, the blank screen is not due to incompatibility with seabios and qemu-kvm, but some other bug. If we could find a seabios commit that fixes this without causing regressions with precise's qemu-kvm version that would be great.

Revision history for this message
MikeB (mikeb-timetrex) wrote :

A lot of other bugs similar to his are being marked as a duplicate of this one, and this one is marked as fixed, but it clearly isn't since many of the bug reports are all much newer than when this bug was fixed-released.

The amount of VRAM (64mb, 32mb, 8mb, etc...) does not correct this bug for me at all, my original bug report is posted here:

https://bugs.launchpad.net/ubuntu/+source/qemu-kvm-spice/+bug/987409

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@MikeB

Could you try PPA https://launchpad.net/~bderzhavets/+archive/lib-usbredir73
for spice/qxl W7 install. I just did it with no problems.
Qualification of bug as duplicate seems incorrect for me.

Revision history for this message
MikeB (mikeb-timetrex) wrote :

https://launchpad.net/~bderzhavets/+archive/lib-usbredir73 does resolve the blank screen problem, I can start my Windows7 guest with both VGA and QXL drivers using KVM-SPICE.

However when using QXL Windows hangs during startup. I tried using both 32 and 64mb VRAM for the QXL driver to no avail. This is likely a separate issue though.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

> I can start my Windows7 guest with both VGA and QXL drivers using KVM-SPICE.

Clean install via https://launchpad.net/~bderzhavets/+archive/lib-usbredir73 should not
have any KVM-SPICE. It installs QEMU_KVM 1.0 + USBREDIR ready to work with SPICE 0.10.1
on clean Ubuntu Precise 64-bit. Installation instructions presume clean instance of 12.04.

Revision history for this message
MikeB (mikeb-timetrex) wrote :

I apologize, I'm not using the KVM-SPICE binary anymore, just KVM with SPICE is what I meant.

However the packages from https://launchpad.net/~bderzhavets/+archive/lib-usbredir73 don't remove the "qemu-kvm-spice" package if its installed and I had one libvirt .XML file hardcoded to use the KVM-SPICE binary (due to another bug with that), so it didn't work until I removed that line from the .XML file. This may help someone else reading this bug report if they continue to have problems even after installing the lib-usbredir73 packages.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

If you made install as instructed, work just via /usr/bin/kvm. No dash spice is needed.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

> However the packages from https://launchpad.net/~bderzhavets/+archive/lib-usbredir73
> don't remove the "qemu-kvm-spice" package

That's a core issue. Sorry, but clean instance 12.04 is required.
Otherwise, you are getting mess hardly predictable to behave.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Mike,

Could you post :-

$ dpkg -l | grep spice

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.