File virtinst-git-mac-prefix.diff of Package virt-manager

Subject: CloneManager: Use correct mac prefix when cloning KVM guests
From: Cole Robinson crobinso@redhat.com Fri Oct 14 15:18:18 2011 -0400
Date: Fri Oct 14 15:18:18 2011 -0400:
Git: 8060feeb26be4cd0ab36feca88e8a92db54b09e2


Index: virtinst-0.600.0/virtinst/CloneManager.py
===================================================================
--- virtinst-0.600.0.orig/virtinst/CloneManager.py
+++ virtinst-0.600.0/virtinst/CloneManager.py
@@ -437,7 +437,6 @@ class CloneDesign(object):
         # We simply edit the original VM xml in place
         doc = libxml2.parseDoc(self._clone_xml)
         ctx = doc.xpathNewContext()
-        typ = ctx.xpathEval("/domain")[0].prop("type")
 
         # changing name
         node = ctx.xpathEval("/domain/name")
@@ -465,7 +464,7 @@ class CloneDesign(object):
                 mac = self._clone_mac[i - 1]
             except Exception:
                 while 1:
-                    mac = _util.randomMAC(typ)
+                    mac = _util.randomMAC(self.original_conn.getType().lower())
                     dummy, msg = self._check_mac(mac)
                     if msg is not None:
                         continue
openSUSE Build Service is sponsored by