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 1369633 - Virtio-gpu should be supported as secondary gpu in libvirt
Summary: Virtio-gpu should be supported as secondary gpu in libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: zhe peng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-24 03:19 UTC by Guo, Zhiyi
Modified: 2017-08-01 23:53 UTC (History)
11 users (show)

Fixed In Version: libvirt-2.5.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:11:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Guo, Zhiyi 2016-08-24 03:19:29 UTC
Description of problem:
Virtio-gpu should be supported as secondary gpu in libvirt

Version-Release number of selected component (if applicable):
libvirt: libvirt-2.0.0-5.el7.x86_64
qemu-kvm-rhev:qemu-kvm-rhev-2.6.0-21.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.guest xml:
# cat virtiovga.xml 
<domain type="kvm">
  <name>rhel7.2</name>
  <uuid>70433aaf-752b-43e7-8c09-38d856bb24be</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch="x86_64">hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="custom" match="exact">
    <model>Haswell-noTSX</model>
  </cpu>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/rhel73.qcow2"/>
      <target dev="vda" bus="virtio"/>
    </disk>
    <controller type="usb" index="0" model="ich9-ehci1"/>
    <controller type="usb" index="0" model="ich9-uhci1">
      <master startport="0"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci2">
      <master startport="2"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci3">
      <master startport="4"/>
    </controller>
    <interface type="bridge">
      <source bridge="br0"/>
      <mac address="52:54:00:ae:39:82"/>
      <model type="virtio"/>
    </interface>
    <input type="tablet" bus="usb"/>
	<graphics type='spice' port='-1' autoport='yes'>
    		<channel name='main' mode='insecure'/>
    		<channel name='record' mode='insecure'/>
    		<image compression='auto_glz'/>
    		<streaming mode='filter'/>
    		<clipboard copypaste='no'/>
    		<mouse mode='client'/>
    		<filetransfer enable='no'/>
  	</graphics>
    <console type="pty"/>
    <channel type="unix">
      <source mode="bind"/>
      <target type="virtio" name="org.qemu.guest_agent.0"/>
    </channel>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <sound model="ich6"/>
    <video>
      <model type="virtio" primary="yes"/>
    </video>
    <video>
      <model type="virtio" primary="no"/>
    </video>
    <redirdev bus="usb" type="spicevmc"/>
    <redirdev bus="usb" type="spicevmc"/>
  </devices>
</domain>

2.
# virsh create virtiovga.xml 
error: Failed to create domain from virtiovga.xml
error: unsupported configuration: non-primary video device must be type of 'qxl'
3.

Actual results:
non-primary video device only support qxl

Expected results:
non-primary video device also support virtio-gpu

Additional info:

Comment 2 Pavel Hrdina 2016-10-12 15:49:58 UTC
Upstream commit:

commit fb8f3b1c22c8f272bb9a47e8f8915acc3cfb47f1
Author: Pavel Hrdina <phrdina>
Date:   Mon Oct 10 20:19:06 2016 +0200

    qemu_command: add support to use virtio as secondary video device

v2.3.0-106-gfb8f3b1

Comment 4 zhe peng 2017-03-10 07:48:55 UTC
verified with build:
libvirt-3.1.0-2.el7.x86_64

step:
1. use description xml to create a guest

2.# virsh create virtio.xml 
Domain rhel7.3 created from virtio.xml

check guest xml:
....
 <video>
      <model type='virtio' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='virtio' heads='1'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </video>
....

check qemu cmd line:
...
-device virtio-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-gpu-pci,id=video1,bus=pci.0,addr=0x9
...

move to verified.

Comment 5 errata-xmlrpc 2017-08-01 17:11:42 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://access.redhat.com/errata/RHEA-2017:1846

Comment 6 errata-xmlrpc 2017-08-01 23:53:19 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://access.redhat.com/errata/RHEA-2017:1846


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