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 1456882 - qemu-kvm-rhev: Can't control pl011 serial console instantiation
Summary: qemu-kvm-rhev: Can't control pl011 serial console instantiation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: aarch64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew Jones
QA Contact: Sitong Liu
URL:
Whiteboard:
Depends On:
Blocks: 1173755 1435681
TreeView+ depends on / blocked
 
Reported: 2017-05-30 15:28 UTC by Andrea Bolognani
Modified: 2017-09-04 11:40 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1435681
Environment:
Last Closed: 2017-09-04 11:40:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrea Bolognani 2017-05-30 15:28:10 UTC
+++ This bug was initially created as a clone of Bug #1435681 +++

Configuring a libvirt guest with

  <console type='pty'>
    <log file='...'/>
  </console>

fails on aarch64 with

  error: unsupported configuration: logfile not supported
         in this QEMU binary

The underlying issue is that, unlike what happens for x86
and ppc64, the guest-side serial console (pl011) is
instantiated implicitly, even when -nodefaults is used, so
libvirt doesn't have a way to assign it a chardev with the
logfile property configured.

---

A way to work around the issue is to use the VirtIO-based
console instead:

  <console type='pty'>
    <log file='...'/>
    <target type='virtio'/>
  </console>

However, that has its own drawbacks, such as not being able
to access early boot or even the bootloader.

Comment 3 Andrew Jones 2017-06-14 07:56:22 UTC
Bumping to 7.5. There's a workaround that can be used for now, which is to use virtio-console.

Comment 4 Andrew Jones 2017-06-22 15:29:10 UTC
I guess this should already work by adding the following to the QEMU command line. Is that sufficient?

	-add-fd set=0,fd=$FD_ID \
	-chardev stdio,id=chardev0,logfile=/dev/fdset/0,logappend=on \
	-serial chardev:chardev0 $FD_ID>>my_logfile

Replacing stdio with pty should also work.

Comment 5 Andrea Bolognani 2017-06-25 02:30:25 UTC
(In reply to Andrew Jones from comment #4)
> I guess this should already work by adding the following to the QEMU command
> line. Is that sufficient?
> 
> 	-add-fd set=0,fd=$FD_ID \
> 	-chardev stdio,id=chardev0,logfile=/dev/fdset/0,logappend=on \
> 	-serial chardev:chardev0 $FD_ID>>my_logfile
> 
> Replacing stdio with pty should also work.

Currently we generate

  -add-fd set=0,fd=$FD_ID \
  -chardev pty,id=charserial0,logfile=/dev/fdset/0,logappend=on \
  -device isa-serial,chardev=charserial0,id=serial0

eg. we use -device to create the device explicitly. Of
course that doesn't work because isa-serial can't be used
on aarch64, but s/isa-serial/virtconsole/ for example does.

Will

  -serial chardev:chardev0

control the implicity pl011 instead? If that's the case,
we might have a winner.

I'll give it a go tomorrow.

Comment 6 Andrew Jones 2017-06-26 06:09:32 UTC
(In reply to Andrea Bolognani from comment #5)
> (In reply to Andrew Jones from comment #4)
> > I guess this should already work by adding the following to the QEMU command
> > line. Is that sufficient?
> > 
> > 	-add-fd set=0,fd=$FD_ID \
> > 	-chardev stdio,id=chardev0,logfile=/dev/fdset/0,logappend=on \
> > 	-serial chardev:chardev0 $FD_ID>>my_logfile
> > 
> > Replacing stdio with pty should also work.
> 
> Currently we generate
> 
>   -add-fd set=0,fd=$FD_ID \
>   -chardev pty,id=charserial0,logfile=/dev/fdset/0,logappend=on \
>   -device isa-serial,chardev=charserial0,id=serial0
> 
> eg. we use -device to create the device explicitly. Of
> course that doesn't work because isa-serial can't be used
> on aarch64,

Right, it would need to be '-device pl011', which won't work, because that
device isn't user creatable.

> but s/isa-serial/virtconsole/ for example does.

But virtconsole won't be available to the guest for early output.

> 
> Will
> 
>   -serial chardev:chardev0
> 
> control the implicity pl011 instead? If that's the case,
> we might have a winner.

Nope, one pl011 will be created automatically just like always, i.e. still not user controllable. However, if the problem is enabling the logfile feature for that single, automatic serial console, then I think we just need do apply the chardev magic above.

Comment 7 Andrea Bolognani 2017-09-04 11:23:15 UTC
Since Bug 1435681 has been addressed, I think we can safely
close this one now.


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