[PATCH v4 3/5] virsh: supports guest panicked

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]