[libvirt] [PATCH 2/2] tools: Exclude Xen dom0 from libvirt-guests.sh list

Eric Blake eblake at redhat.com
Fri Oct 7 19:05:58 UTC 2016


On 10/07/2016 02:56 AM, Stefan Bader wrote:
> 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 at canonical.com>
> ---
>  tools/libvirt-guests.sh.in | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ACK.

> 
> diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
> index 7380b4b..791d927 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
>  }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161007/264743c7/attachment-0001.sig>


More information about the libvir-list mailing list