Bug 2219538

Summary: The guest crashed when only starting with one unbootable disk
Product: Red Hat Enterprise Linux 9 Reporter: Meina Li <meili>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
libvirt sub component: Storage QA Contact: virt-qe-z
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: low CC: pkrempa, smitterl, thuth, virt-maint
Version: 9.3Keywords: Automation, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-04 09:37:33 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
the xml of guest
none
the guest log
none
the libvirtd log none

Description Meina Li 2023-07-04 08:10:44 UTC
Created attachment 1973947 [details]
the xml of guest

Created attachment 1973947 [details]
the xml of guest

Description of problem:
According to https://bugzilla.redhat.com/show_bug.cgi?id=2214147#c3 and https://bugzilla.redhat.com/show_bug.cgi?id=2214147#c4:
The guest crashed when only starting with one unbootable disk

Version-Release number of selected component (if applicable):
libvirt-9.5.0-0rc1.1.el9.s390x
qemu-kvm-8.0.0-5.el9.s390x

How reproducible:
100%

Steps to Reproduce:
1. Prepare a block disk by using scsi_debug or targetcli.
# modprobe scsi_debug dev_size_mb=500
# lsscsi
[0:0:0:0]    disk    Linux    scsi_debug       0191  /dev/sda 
2. Edit the guest only with block disk.
# virsh dumpxml rhel --xpath //disk
<disk type="block" device="disk">
  <driver name="qemu" type="raw"/>
  <source dev="/dev/sda"/>
  <target dev="vdb" bus="virtio"/>
  <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0000"/>
</disk>
3. Start the guest.
# virsh start rhel
Domain 'rhel' started
# virsh list --all
 Id   Name             State
---------------------------------
 -    rhel   shut off

or
1. Create a qcow2 file
qemu-img create -f qcow2 /var/lib/avocado/data/avocado-vt/images/vdb.qcow2 100M
2. Define the guest with below disk config xml:
<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/avocado/data/avocado-vt/images/vdb.qcow2'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
</disk>
3. Start the guest
# virsh start avocado-vt-vm1
Domain 'avocado-vt-vm1' started
4. Check the guest status
# virsh list --all
 Id   Name             State
---------------------------------
 -    avocado-vt-vm1   shut off


Actual results:
The guest crashed

Expected results:
The guest need to be running

Additional info:
Check all the related log in attachment

Comment 1 Meina Li 2023-07-04 08:11:42 UTC
Created attachment 1973948 [details]
the guest log

Comment 2 Meina Li 2023-07-04 08:12:28 UTC
Created attachment 1973949 [details]
the libvirtd log

Comment 3 Peter Krempa 2023-07-04 08:22:55 UTC
The guest firmware initiates a panic of the VM:

2023-07-04 07:28:33.514+0000: panic s390: core='0' psw-mask='0x0002000180000000' psw-addr='0x0000000000000000' reason='disabled-wait'

Which leads to the termination of the VM. I think this is desired behaviour since it's done by the firmware. I guess the only remedy is to disable the panic device if possible.

I think this is NOTABUG on s390x

Comment 4 Thomas Huth 2023-07-04 09:37:33 UTC
Yes, this is expected (and wanted) behavior on s390x - the firmware panics if it can't boot, since there is no way to proceed any further. Thus closing as NOTABUG.