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 1487499 - Libvirt tries to create a wrong QEMU device for the <parallel> XML tag on s390x
Summary: Libvirt tries to create a wrong QEMU device for the <parallel> XML tag on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: s390x
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-01 05:51 UTC by Thomas Huth
Modified: 2018-04-10 10:56 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.8.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:55:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1449265 0 high CLOSED Libvirt uses a bad QEMU device for the <serial> XML tag on s390x 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2018:0704 0 None None None 2018-04-10 10:56:40 UTC

Internal Links: 1449265

Description Thomas Huth 2017-09-01 05:51:13 UTC
Description of problem:
When adding the <parallel> tag to the XML definition of a KVM guest on s390x, libvirt translates this into a "isa-parallel" device when starting QEMU. Since this device does not exist in the s390x version of QEMU, the guest can not be launched.

Version-Release number of selected component (if applicable):
libvirt-3.2.0-20.el7a.s390x
qemu-kvm-2.9.0-22.el7a.s390x

How reproducible:
100%

Steps to Reproduce:
1. Install qemu-kvm and libvirt on a s390x system
2. Create a guest definition that contains a <parallel> tag, for example:

<domain type="kvm">
  <name>guest</name>
  <memory>786432</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch="s390x" machine="s390-ccw-virtio">hvm</type>
    <boot dev="hd"/>
  </os>
  <clock offset="utc"/>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/guest.qcow2"/>
      <target dev="sda" bus="scsi"/>
    </disk>
    <interface type="bridge">
      <source bridge="virbr0"/>
      <model type="virtio"/>
    </interface>
    <parallel type='pty'/>
    <console type="pty"/>
  </devices>
</domain>

3. Start the guest with "virsh start guest"

Actual results:
error: Failed to start domain guest
error: internal error: qemu unexpectedly closed the monitor: 2017-09-01T05:35:23.648470Z qemu-kvm: -chardev pty,id=charparallel0: char device redirected to /dev/pts/1 (label charparallel0)
2017-09-01T05:35:23.648555Z qemu-kvm: -chardev pty,id=charconsole0: char device redirected to /dev/pts/2 (label charconsole0)
2017-09-01T05:35:23.667744Z qemu-kvm: -device isa-parallel,chardev=charparallel0,id=parallel0: 'isa-parallel' is not a valid device model name

Expected results:
Since there are no parallel ports on s390x, I'd rather expect libvirt to refuse the <parallel> tag right from the start here instead of trying to run QEMU with a "isa-parallel" device.

Additional info:
This is slightly related to bug 1449265 (where the same problems occurs with the <serial> tag).

Comment 1 Thomas Huth 2017-09-01 18:32:36 UTC
FWIW: The same problem exists on ppc64, too.

Comment 2 Michal Privoznik 2017-09-21 11:08:46 UTC
I've just pushed the patches upstream:

commit cf4acafe8b03595163e0e06f1e906f9a46d852fd
Author:     Pino Toscano <ptoscano>
AuthorDate: Thu Sep 7 14:19:40 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Sep 21 13:05:14 2017 +0200

    qemu: reject parallel ports for pseries machines
    
    They are simply not supported on that machine type.
    
    Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1487499
    
    Signed-off-by: Pino Toscano <ptoscano>

commit 02b1908de6e8303e325336277fd9cebba5d6d50d
Author:     Pino Toscano <ptoscano>
AuthorDate: Thu Sep 7 14:19:39 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Sep 21 13:05:14 2017 +0200

    qemu: reject parallel ports for s390 archs
    
    They are simply not supported on those architectures.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1487499
    
    Signed-off-by: Pino Toscano <ptoscano>

commit 2c79a2b26ccac60042fa355c59882520e65f3f8b
Author:     Pino Toscano <ptoscano>
AuthorDate: Thu Sep 7 14:19:38 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Sep 21 13:05:14 2017 +0200

    qemu: pass the virDomainDef to qemuDomainChrDefValidate
    
    This will be used to improve the validation for this type of devices.
    
    The former @def parameter is renamed to @dev, leaving @def for the
    virDomainDef (following the style used elsewhere).
    
    Signed-off-by: Pino Toscano <ptoscano>

commit 85afb126ad235e9b22d570751fd5eb0aed1eaabe
Author:     Pino Toscano <ptoscano>
AuthorDate: Thu Sep 7 14:19:37 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Sep 21 13:05:14 2017 +0200

    tests: qemuxml2argv: fail also on unexpected pass
    
    If a test expects either a parse error or a failure but then there is
    neither a parse error nor a failure, then properly mark the test as
    failing, instead of failing later on (e.g. trying to open a
    non-existing .args file).
    
    Signed-off-by: Pino Toscano <ptoscano>

commit 4673999d0f725844aebebaf161eefaf6a7e54e17
Author:     Pino Toscano <ptoscano>
AuthorDate: Thu Sep 7 14:19:36 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Sep 21 13:05:14 2017 +0200

    tests: qemuxml2argv: fix expected type for usb-bus-missing
    
    The guest of usb-bus-missing does not cause a parse error, but a
    validation issue -- hence, switch from DO_TEST_PARSE_ERROR to
    DO_TEST_FAILURE.
    
    Fixes commit b003b9781b6ae633cfe4fdf6b9620ca246fa2432.
    
    Signed-off-by: Pino Toscano <ptoscano>

v3.7.0-145-gcf4acafe8

Comment 4 Dan Zheng 2017-12-15 07:57:19 UTC
Test packages:
libvirt-3.9.0-5.el7.s390x
qemu-kvm-ma-2.10.0-11.el7.s390x


Add <parallel type='pty'/> to the guest and save.
# virsh edit vm1
error: unsupported configuration: parallel ports are not supported
Failed. Try again? [y,n,i,f,?]:

Comment 8 errata-xmlrpc 2018-04-10 10:55:31 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-2018:0704


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