[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 3/3] virsh: supports guest panicked



Add 'virsh domstate --reason' command is effective when domain crashed.

---
 tools/virsh-domain-monitor.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 5ed89d1..4bddefe 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -192,6 +192,8 @@ vshDomainStateReasonToString(int state, int reason)
             return N_("save canceled");
         case VIR_DOMAIN_RUNNING_WAKEUP:
             return N_("event wakeup");
+        case VIR_DOMAIN_RUNNING_CRASHED:
+            return N_("from crashed");
         case VIR_DOMAIN_RUNNING_UNKNOWN:
         case VIR_DOMAIN_RUNNING_LAST:
             ;
@@ -226,6 +228,8 @@ vshDomainStateReasonToString(int state, int reason)
             return N_("shutting down");
         case VIR_DOMAIN_PAUSED_SNAPSHOT:
             return N_("creating snapshot");
+        case VIR_DOMAIN_PAUSED_GUEST_PANICKED:
+            return N_("guest panicked");
         case VIR_DOMAIN_PAUSED_UNKNOWN:
         case VIR_DOMAIN_PAUSED_LAST:
             ;
@@ -236,6 +240,8 @@ vshDomainStateReasonToString(int state, int reason)
         switch ((virDomainShutdownReason) reason) {
         case VIR_DOMAIN_SHUTDOWN_USER:
             return N_("user");
+        case VIR_DOMAIN_SHUTDOWN_CRASHED:
+            return N_("crashed");
         case VIR_DOMAIN_SHUTDOWN_UNKNOWN:
         case VIR_DOMAIN_SHUTDOWN_LAST:
             ;
@@ -266,6 +272,8 @@ vshDomainStateReasonToString(int state, int reason)
 
     case VIR_DOMAIN_CRASHED:
         switch ((virDomainCrashedReason) reason) {
+        case VIR_DOMAIN_CRASHED_PANICKED:
+            return N_("panicked");
         case VIR_DOMAIN_CRASHED_UNKNOWN:
         case VIR_DOMAIN_CRASHED_LAST:
             ;
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]