[virt-tools-list] [PATCH v3 2/6] Set default action in case of on_crash as destroy

Mikhail Feoktistov mfeoktistov at virtuozzo.com
Tue Feb 21 14:27:56 UTC 2017


Virtuozzo hypervisor doesn't support restart on_crash for containers.
Also for common qemu usage it's not going to have any functional difference.
---
 virtinst/guest.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/virtinst/guest.py b/virtinst/guest.py
index 7d3fb9d..5b8bc7b 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -198,7 +198,7 @@ class Guest(XMLBuilder):
     on_poweroff = XMLProperty("./on_poweroff",
                               default_cb=lambda s: "destroy")
     on_reboot = XMLProperty("./on_reboot", default_cb=lambda s: "restart")
-    on_crash = XMLProperty("./on_crash", default_cb=lambda s: "restart")
+    on_crash = XMLProperty("./on_crash", default_cb=lambda s: "destroy")
     on_lockfailure = XMLProperty("./on_lockfailure")
 
     seclabels = XMLChildProperty(Seclabel)
@@ -352,7 +352,6 @@ class Guest(XMLBuilder):
 
         if install:
             self.on_reboot = "destroy"
-            self.on_crash = "destroy"
         elif self.os.is_s390x():
             # on_crash=restart can cause reboot loops on s390x,
             # so use preserve
-- 
2.9.3




More information about the virt-tools-list mailing list