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

Re: [virt-tools-list] [PATCH 2/3] inspection: Don't recursively try to inspect guestfs-* temporary VMs.



On 06/28/2013 12:57 PM, Richard W.M. Jones wrote:
> From: "Richard W.M. Jones" <rjones redhat com>
> 
> This is a hack.  Should libvirt have a way to mark these VMs?
> 
> Note you'll only come across this problem if you run virt-manager as
> root with libguestfs >= 1.20 on Fedora >= 18 (libguestfs using libvirt).
> ---
>  virtManager/inspection.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/virtManager/inspection.py b/virtManager/inspection.py
> index b3c9235..eb50a95 100644
> --- a/virtManager/inspection.py
> +++ b/virtManager/inspection.py
> @@ -21,6 +21,7 @@ from Queue import Queue, Empty
>  from threading import Thread
>  import logging
>  import os
> +import re
>  
>  from guestfs import GuestFS  # pylint: disable=F0401
>  
> @@ -144,6 +145,11 @@ class vmmInspection(vmmGObject):
>                                        prettyvm)
>  
>      def _process(self, conn, vm, vmuuid):
> +        if re.search(r"^guestfs-", vm.get_name()):
> +            logging.debug("ignore libvirt/guestfs temporary VM %s",
> +                          vm.get_name())
> +            return
> +
>          g = GuestFS()
>          prettyvm = conn.get_uri() + ":" + vm.get_name()
>          ignore = vmuuid
> 

Pushed this one.

Thanks,
Cole


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