<div dir="ltr">On Wed, May 11, 2016 at 12:22 AM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 05/10/2016 12:16 PM, Leno Hou wrote:<br>
> On Tue, May 10, 2016 at 11:48 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a><br>
</span><div><div class="h5">> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>> wrote:<br>
><br>
>     On 05/10/2016 09:24 AM, Leno Hou wrote:<br>
>     > When booting from empty disk image or none bootdev, its leads<br>
>     > system IPL enter into infinite loop with message on s390x.<br>
>     > This patch sets preserve when on_crash to avoid the loop.<br>
>     ><br>
><br>
>     Is this correct behavior, or is this a qemu or guest OS bug? If it's something<br>
>     that's going to be fixed eventually I'd rather not add it to virtinst. Is<br>
>     there a bug report somewhere I can look at?<br>
><br>
><br>
><br>
> described in below.<br>
><br>
> 1. qemu-img create -f qcow2 /var/lib/libvirt/images/sle.qcow2 20G<br>
><br>
> 2. cat sle1.xml<br>
> [root@ltczhp20 ~]# cat sle.xml<br>
>   .....<br>
>   <os><br>
>     <type arch='s390x' machine='s390-ccw-virtio-2.6'>hvm</type><br>
>     <boot dev='hd'/><br>
>   </os><br>
>   <clock offset='utc'/><br>
>   <on_poweroff>destroy</on_poweroff><br>
>   <on_reboot>restart</on_reboot><br>
>   <on_crash>restart</on_crash><br>
>   <devices><br>
>     <emulator>/usr/bin/qemu-kvm</emulator><br>
>     <disk type='file' device='disk'><br>
>       <driver name='qemu' type='qcow2'/><br>
>       <source file='/var/lib/libvirt/images/sle.qcow2'/><br>
>       <target dev='vda' bus='virtio'/><br>
>       <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/><br>
>     </disk><br>
>     <disk type='file' device='cdrom'><br>
>       <driver name='qemu' type='raw'/><br>
>       <target dev='sda' bus='scsi'/><br>
>       <readonly/><br>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
>     </disk><br>
>    ......<br>
><br>
> 3. virsh create sle1.xml<br>
><br>
> 4. virsh start sle1 --console<br>
><br>
> infinite loop message:<br>
><br>
> ....                                                                                                                                                        Using guessed DASD geometry.<br>
> Using ECKD scheme (block size  4096), CDL<br>
> ! No zIPL section in IPL2 record. !<br>
><br>
> .........<br>
><br>
<br>
</div></div>Right, but that seems like a bug in the guest, or in the firmware, etc. I<br>
generally don't like to add config workarounds to virtinst to work around a<br>
bug. Has that issue been reported anywhere?<br></blockquote><div> </div><div>There are 2 issues has been reported in LTC-Bugzilla.</div><div><br></div><div>[1] <a href="https://bugzilla.linux.ibm.com/show_bug.cgi?id=139293" style="color:rgb(0,85,170);text-decoration:none;font-family:Segoe,'Segoe UI','Helvetica Neue',Verdana,sans-serif;font-size:13px">crash of guest, hangs virt-manager on host</a><br></div><div>[2] <a href="https://bugzilla.linux.ibm.com/show_bug.cgi?id=139387" style="font-size:13px;color:rgb(0,85,170);text-decoration:none;font-family:Segoe,'Segoe UI','Helvetica Neue',Verdana,sans-serif">Canceling out of virt-install from initial install pane puts guest being created into infinite loop.</a></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Or is the infinite loop that the VM just keeps crashing and rebooting? In that<br>
case the behavior actually seems correct.<br>
<br></blockquote><div><br></div><div>The qemu maintainer says:</div><div><br></div><div><pre class="" id="comment_text_1" style="font-size:1.2em;margin-top:0px;margin-bottom:0px;white-space:pre-wrap;width:50em;color:rgb(0,0,0)">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.</pre></div><div><pre class="" id="comment_text_1" style="font-size:1.2em;margin-top:0px;margin-bottom:0px;white-space:pre-wrap;width:50em;color:rgb(0,0,0)">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)</pre><pre class="" id="comment_text_1" style="font-size:1.2em;margin-top:0px;margin-bottom:0px;white-space:pre-wrap;width:50em;color:rgb(0,0,0)"><br></pre></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(Though honestly I kind of question if we should be setting on_crash=reboot as<br>
the default anyways. I don't think it affected us with qemu much since it<br>
didn't have any sort of crash detection for a long time, but maybe we should<br>
revisit)<br>
<span class=""><font color="#888888"><br>
- Cole<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">So this should be fixed in qemu or virt-manager ? </div><div class="gmail_extra"><br></div><div class="gmail_extra">-Leno Hou</div></div>