]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: Exclude Xen dom0 from libvirt-guests.sh list
authorStefan Bader <stefan.bader@canonical.com>
Fri, 7 Oct 2016 07:56:33 +0000 (09:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 10 Oct 2016 08:52:08 +0000 (16:52 +0800)
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

index 7380b4b809b78ebdbc566974747b84f8877c7659..791d9277b5e7ad61418e339d4bdefb2153c81359 100644 (file)
@@ -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
 }