RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1358728 - Migration failed when the secondary video devices have different ram/vram sizes.
Summary: Migration failed when the secondary video devices have different ram/vram sizes.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 11:41 UTC by Fangge Jin
Modified: 2016-11-03 18:50 UTC (History)
6 users (show)

Fixed In Version: libvirt-2.0.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:50:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-07-21 11:41:00 UTC
Description of problem:
Guest has three video devices, and the vram or ram size of the second video and the third video are not equal. Start the guest, and migration will fail:
# virsh migrate rhel7.2 qemu+ssh://hp-dl385g7-06.lab.eng.pek2.redhat.com/system --live --verbose
error: internal error: qemu unexpectedly closed the monitor: 2016-07-20T09:17:43.220520Z qemu-kvm: Length mismatch: 0000:00:09.0/qxl.vram: 0x2000000 in != 0x4000000: Invalid argument
2016-07-20T09:17:43.221314Z qemu-kvm: error while loading state for instance 0x0 of device 'ram'
2016-07-20T09:17:43.222751Z qemu-kvm: load of migration failed: Invalid argument

Version-Release number of selected component:
libvirt-2.0.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a guest with three videos, and set different ram or vram size for the second video and the third video:
# virsh dumpxml rhel7.2 --inactive
...
    <video>
      <model type='qxl' ram='1048576' vram='16384' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**32768**' vgamem='8192' heads='3'/>  
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**65536**' vgamem='8192' heads='7'/>  
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </video>
...

2.Start guest
# virsh start rhel7.2

3.Check live vram/ram size, find that the value of the second video devices becomes 65536:
# virsh dumpxml rhel7.2
...
    <video>
      <model type='qxl' ram='524288' vram='16384' vgamem='16384' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='8192'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='8192'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </video>
...

4.Do migration and failed.

Actual results:
Migration failed

Expected results:
Migration can succeed

Additional info:
1)
The qemu command line on source host:
-device qxl-vga,id=video0,ram_size=1073741824,vram_size=16777216,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x2 -device qxl,id=video1,ram_size=67108864,vram_size=33554432,vram64_size_mb=0,vgamem_mb=8,bus=pci.0,addr=0x9 -device qxl,id=video2,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=8,bus=pci.0,addr=0xb

2)
The qemu command line on target host:
-device qxl-vga,id=video0,ram_size=536870912,vram_size=16777216,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x2 -device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=8,bus=pci.0,addr=0x9 -device qxl,id=video2,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=8,bus=pci.0,addr=0xb

3)
I tried several times, and found that the vram/ram size of the second video device is always adjusted to the vram/ram value of the third video device

Comment 2 Pavel Hrdina 2016-07-25 14:25:21 UTC
Upstream commit:

commit 4a585a884fc8cfd11f6206cd6f1a7db824395e86
Author: Pavel Hrdina <phrdina>
Date:   Mon Jul 25 10:47:00 2016 +0200

    qemu_monitor_json: add support to search QOM device path by device alias

Comment 5 yafu 2016-08-17 04:20:50 UTC
Can reproduce this BZ with libvirt-2.0.0-2.el7.x86_64.

Verified pass with libvirt-2.0.0-5.el7.x86_64.
Test steps:
1. Prepare a guest with three videos, and set different ram or vram size for the second video and the third video:
# virsh dumpxml rhel7.2 --inactive
...
    <video>
      <model type='qxl' ram='1048576' vram='16384' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**32768**' vgamem='8192' heads='3'/>  
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**65536**' vgamem='8192' heads='7'/>  
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </video>
...

2.Start guest
# virsh start rhel7.2

3.Check live vram/ram size, find all the value of video devices are not changes:
# virsh dumpxml rhel7.2
...
    <video>
      <model type='qxl' ram='524288' vram='16384' vgamem='16384' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**32768**' vgamem='8192'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='**65536**' vgamem='8192'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </video>
...

4.Do migration,migration complete correctly and guest works well after migration:
#virsh migrate rhel7.2 qemu+ssh://10.66.144.76/system --live --verbose
Migration: [100 %]


5.Also try four video devices with different ram/vram size, all the value of video devices are not changed when start the guest.

Comment 7 errata-xmlrpc 2016-11-03 18:50:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


Note You need to log in before you can comment on or make changes to this bug.