virtinst: set preserve when on_crash in s390x

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

Signed-off-by: Leno Hou <lenohou@gmail.com>
This commit is contained in:
Leno Hou 2016-05-11 01:36:45 +08:00 committed by Cole Robinson
parent 8b6c404305
commit 1ba524db04
3 changed files with 5 additions and 2 deletions

View File

@ -12,7 +12,7 @@
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<on_crash>preserve</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type="file" device="disk">

View File

@ -12,7 +12,7 @@
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<on_crash>preserve</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-s390x</emulator>
<disk type="file" device="disk">

View File

@ -358,6 +358,9 @@ class Guest(XMLBuilder):
if install:
self.on_reboot = "destroy"
self.on_crash = "destroy"
# on_crash=restart can cause reboot loops on s390x, so use preserve
elif self.os.is_s390x():
self.on_crash = "preserve"
self._set_osxml_defaults()