Commit cb719383 authored by Anael Beutot's avatar Anael Beutot Committed by Antoine Millet
Browse files

Fixed clone job, delete MAC address from XML desc.

parent 8d338775
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -757,7 +757,9 @@ class CloneJob(BaseMigrationJob):

        vm_config = vm_config.replace('<name>%s</name>' % old_name,
                                      '<name>%s</name>' % name)
        vm_config = re.sub('(<uuid>.*?</uuid>\n)', '', vm_config)
        vm_config = re.sub('<uuid>.*?</uuid>\n', '', vm_config)
        # delete MAC address, then it will be regenerated by libvirt
        vm_config = re.sub('<mac .*?/>\n', '', vm_config)
        for old, new in old_new_name_mapping.iteritems():
            vm_config = vm_config.replace("='%s'" % old,
                                          "='%s'" % new)