inspection: Don't recursively try to inspect guestfs-* temporary VMs.

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).
This commit is contained in:
Richard W.M. Jones 2013-06-28 17:57:04 +01:00 committed by Cole Robinson
parent 367041a8d7
commit ab312910f2

View File

@ -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