Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2177636

Summary: BIOS serial console output not visible after upgrade and change to PCI
Product: Red Hat Enterprise Linux 9 Reporter: Robin Hack <rhack>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: PCI QA Contact: liunana <nanliu>
Status: CLOSED NOTABUG Docs Contact:
Severity: unspecified    
Priority: unspecified CC: gveitmic, jinzhao, juzhang, nanliu, virt-maint
Version: 9.2Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-12 08:42:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
libvirt xml file of virtual machine none

Description Robin Hack 2023-03-13 08:34:39 UTC
Created attachment 1950168 [details]
libvirt xml file of virtual machine

Description of problem:
After upgrade of rhel9.1 machine, and after bug:
https://bugzilla.redhat.com/show_bug.cgi?id=2177628

I changed settings of virtual machines to be:
 <type arch='x86_64' machine='pc-q35-rhel9.0.0'>hvm</type>

and:

 <controller type='pci' index='0' model='pcie-root'>
and in snippet
    <serial type='tcp'>
      <source mode='connect' host='127.0.0.1' service='52450' tls='no'/>
      <protocol type='raw'/>
      <target type='pci-serial' port='1'>
        <model name='pci-serial'/>
      </target>
      <alias name='serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </serial>

<target type='isa-serial' port='1'>
 <model name='isa-serial'/>
</target>

has been changed to:

<target type='pci-serial' port='1'>
 <model name='pci-serial'/>
</target>

Switch for bios serial console is enabled:
  <os>
    <type arch='x86_64' machine='pc-q35-rhel9.0.0'>hvm</type>
    <bios useserial='yes'/>
  </os>



Version-Release number of selected component (if applicable):
qemu-kvm-7.0.0-13.el9_1.2.x86_64

How reproducible:
always after upgrade

Steps to Reproduce:
1. upgrade rhel machine
2. use provided xml file
3. start machine

Actual results:
no bios output found

Expected results:
bios output found in logs - maybe I'm doing something wrong?

Additional info:
libvirt xml file is attached

Comment 1 Robin Hack 2023-03-13 08:39:03 UTC
Additional info:
machine is scheduled via beaker with
elevator=noop console=tty0 console=ttyS0 
CLI passed to kernel

Comment 2 Robin Hack 2023-03-13 11:40:48 UTC
To be clear.
By update/upgrade rhel machine I just mean:
dnf upgrade on freshly installed system.

And I'm not able to see BIOS output when isa or pci console were used.
Maybe I'm doing something wrong, but it's basic scenario:
grap old libvirtxml files from rhel7 and put them on freshly installed rhel9 machine.

Only linux kernel output is visible on serial console for my for now.

Comment 3 Min Deng 2023-03-13 12:17:27 UTC
(In reply to Robin Hack from comment #2)
> To be clear.
> By update/upgrade rhel machine I just mean:
> dnf upgrade on freshly installed system.
> 
> And I'm not able to see BIOS output when isa or pci console were used.
> Maybe I'm doing something wrong, but it's basic scenario:
> grap old libvirtxml files from rhel7 and put them on freshly installed rhel9
> machine.
> 
> Only linux kernel output is visible on serial console for my for now.

Hi Robin,
It looks like it's not directly related with Stable Guest ABI so I involve x86 feature owner, thanks !

Hi NaNa,
Could you please help to check "pci-serial" ? Thank you.
Min

Comment 7 liunana 2023-04-12 04:24:41 UTC
(In reply to Robin Hack from comment #6)
> Hello.
> 
> Just notes from gchat:
> 
> I tested 2 scenarios:
> 
> 1) plain xml file provided here (just with disk path modification) - works
> for me. I'm able to see grub menu and kernel messages - works via virsh
> console
> 2) hybrid approach: I modified my xml configuration with:
> 
> <serial type="pty">
> <source path="/dev/pts/2"/>
> <target type="isa-serial" port="0">
> <model name="isa-serial"/>
> </target>
> <alias name="serial0"/>
> </serial>
> <console type="pty" tty="/dev/pts/2">
> <source path="/dev/pts/2"/>
> <target type="serial" port="0"/>
> <alias name="serial0"/>
> </console>
> 
> and it again works for me via virsh console. I'm able to see PXE boot, grub
> menu etc...
> 
> However, I really need to see whole output via tcp console.



Hi Robin,

I checked your serial port xml configution, and it works well once I change the port value from '1' to '0' on rhel91 host and rhel93 host.
And I find the libvirt serial port xml documents here: https://libvirt.org/formatdomain.html#serial-port


Could you try this to check if it works for you?
If so I think maybe this shouldn't be an issue. Thanks.


Best regards 
Nana

Comment 10 liunana 2023-04-12 08:42:04 UTC
After dicussion with Robin on gchat, this should be one configuration issue.
And we need to set the console port value to '0' since system will send the bios log to the ttyS0 default.


Closed this bug as NOTBUG, thanks.