File cc38d566-exclude-Xen-dom0-from-libvirt-guests.patch of Package libvirt.6159

From cc38d5661ff11cbe749fa8932e74300f406a7780 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Fri, 7 Oct 2016 09:56:33 +0200
Subject: [PATCH] tools: Exclude Xen dom0 from libvirt-guests.sh list

With newer versions of libvirt Domain-0 is again visible in the list of
running guests but it should not be considered as a guest for shutdown
or suspend.

Signed-off-by Stefan Bader <stefan.bader@canonical.com>
---
 tools/libvirt-guests.sh.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
index 7380b4b80..791d9277b 100644
--- a/tools/libvirt-guests.sh.in
+++ b/tools/libvirt-guests.sh.in
@@ -121,7 +121,7 @@ list_guests() {
         return 1
     fi
 
-    echo $list
+    echo "$list" | grep -v 00000000-0000-0000-0000-000000000000
 }
 
 # guest_name URI UUID
@@ -539,7 +539,7 @@ gueststatus() {
     for uri in $URIS; do
         set +f
         echo "* $uri URI:"
-        retval run_virsh "$uri" list || echo
+        retval run_virsh "$uri" list | grep -v "Domain-0" || echo
     done
     set +f
 }
-- 
2.11.0