Hi, This patch adds mac address confliction check for following case on virt-clone. hostA:aa:bb:cc:dd:ee:ff hostB:Aa:Bb:Cc:Dd:Ee:Ff(planned cloning guest) This patch stops cloning for above case, because of MAC address confliction. Signed-off-by: Shigeki Sakamoto <fj0588di@xxxxxxxxxxxxxxxxx> Thanks, Shigeki Sakamoto. ---------------------------------------------------------------------- diff -r 219bd66150dd virtinst/CloneManager.py --- a/virtinst/CloneManager.py Fri Sep 28 12:33:09 2007 -0400 +++ b/virtinst/CloneManager.py Tue Oct 02 15:17:44 2007 +0900 @@ -422,12 +422,14 @@ class CloneDesign(object): except: continue ctx = doc.xpathNewContext() + mac_index = (str(doc).upper()).find(mac.upper()) + if mac_index == -1: + continue + mac_comp = str(doc)[mac_index:mac_index+17] try: try: count += ctx.xpathEval("count(/domain/devices/interface/mac[@address='%s'])" - % mac.upper()) - count += ctx.xpathEval("count(/domain/devices/interface/mac[@address='%s'])" - % mac.lower()) + % mac_comp) except: continue finally: _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools