[virt-tools-list] [PATCH 2/3] inspection: Don't recursively try to inspect guestfs-* temporary VMs.
Richard W.M. Jones
rjones at redhat.com
Fri Jun 28 16:57:04 UTC 2013
From: "Richard W.M. Jones" <rjones at 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
--
1.8.2.1
More information about the virt-tools-list
mailing list