[virt-tools-list] [PATCH v1] virtinst: set preserve when on_crash in s390x

Cole Robinson crobinso at redhat.com
Tue May 10 16:55:33 UTC 2016


On 05/10/2016 12:41 PM, Leno Hou wrote:
> On Wed, May 11, 2016 at 12:22 AM, Cole Robinson <crobinso at redhat.com
> <mailto:crobinso at redhat.com>> wrote:
> 
>     On 05/10/2016 12:16 PM, Leno Hou wrote:
>     > On Tue, May 10, 2016 at 11:48 PM, Cole Robinson <crobinso at redhat.com <mailto:crobinso at redhat.com>
>     > <mailto:crobinso at redhat.com <mailto:crobinso at redhat.com>>> wrote:
>     >
>     >     On 05/10/2016 09:24 AM, Leno Hou wrote:
>     >     > When booting from empty disk image or none bootdev, its leads
>     >     > system IPL enter into infinite loop with message on s390x.
>     >     > This patch sets preserve when on_crash to avoid the loop.
>     >     >
>     >
>     >     Is this correct behavior, or is this a qemu or guest OS bug? If it's
>     something
>     >     that's going to be fixed eventually I'd rather not add it to
>     virtinst. Is
>     >     there a bug report somewhere I can look at?
>     >
>     >
>     >
>     > described in below.
>     >
>     > 1. qemu-img create -f qcow2 /var/lib/libvirt/images/sle.qcow2 20G
>     >
>     > 2. cat sle1.xml
>     > [root at ltczhp20 ~]# cat sle.xml
>     >   .....
>     >   <os>
>     >     <type arch='s390x' machine='s390-ccw-virtio-2.6'>hvm</type>
>     >     <boot dev='hd'/>
>     >   </os>
>     >   <clock offset='utc'/>
>     >   <on_poweroff>destroy</on_poweroff>
>     >   <on_reboot>restart</on_reboot>
>     >   <on_crash>restart</on_crash>
>     >   <devices>
>     >     <emulator>/usr/bin/qemu-kvm</emulator>
>     >     <disk type='file' device='disk'>
>     >       <driver name='qemu' type='qcow2'/>
>     >       <source file='/var/lib/libvirt/images/sle.qcow2'/>
>     >       <target dev='vda' bus='virtio'/>
>     >       <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
>     >     </disk>
>     >     <disk type='file' device='cdrom'>
>     >       <driver name='qemu' type='raw'/>
>     >       <target dev='sda' bus='scsi'/>
>     >       <readonly/>
>     >       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     >     </disk>
>     >    ......
>     >
>     > 3. virsh create sle1.xml
>     >
>     > 4. virsh start sle1 --console
>     >
>     > infinite loop message:
>     >
>     > ....                                                                   
>                                                                              
>               Using guessed DASD geometry.
>     > Using ECKD scheme (block size  4096), CDL
>     > ! No zIPL section in IPL2 record. !
>     >
>     > .........
>     >
> 
>     Right, but that seems like a bug in the guest, or in the firmware, etc. I
>     generally don't like to add config workarounds to virtinst to work around a
>     bug. Has that issue been reported anywhere?
> 
>  
> There are 2 issues has been reported in LTC-Bugzilla.
> 
> [1] crash of guest, hangs virt-manager on host
> <https://bugzilla.linux.ibm.com/show_bug.cgi?id=139293>
> [2] Canceling out of virt-install from initial install pane puts guest being
> created into infinite loop.
> <https://bugzilla.linux.ibm.com/show_bug.cgi?id=139387>
> 
>  
> 
> 
>     Or is the infinite loop that the VM just keeps crashing and rebooting? In that
>     case the behavior actually seems correct.
> 
> 
> The qemu maintainer says:
> 
> the disk  image is empty.
> The boot code tries to detect several things and finally uses the ECKD scheme which also fails.
> It then loads a disabled  wait PSW (--> crashed)
> now libvirt restarts the guest as defined in the xml.
> 
> So please change 
>   <on_crash>restart</on_crash>
> to
>   <on_crash>preserve</on_crash>
> to avoid the loop.
> (This should never  be restart on s390 unless you really know what you are doing)
> 
> 
> 
>     (Though honestly I kind of question if we should be setting on_crash=reboot as
>     the default anyways. I don't think it affected us with qemu much since it
>     didn't have any sort of crash detection for a long time, but maybe we should
>     revisit)
> 
>     - Cole
> 
> 
> So this should be fixed in qemu or virt-manager ? 

Okay, those comments helped, I'll okay with the change. Please update the
patch to add a comment to the code like

# on_crash=restart can cause reboot loops on s390x, so use preserve

Also, you need to do python setup.py test --regenerate-output as well

Thanks,
Cole




More information about the virt-tools-list mailing list