def generate_clone_path_name(self, origpath, newname=None): cd = self.clone_design if not newname: newname = cd.clone_name clone_path = CloneManager.generate_clone_disk_path(origpath, cd, newname=newname) return clone_path
def _async_clone(self, asyncjob): newconn = None try: self.orig_vm.set_cloning(True) # Open a seperate connection to install on since this is async logging.debug("Threading off connection to clone VM.") newconn = util.dup_conn(self.conn).vmm meter = asyncjob.get_meter() self.clone_design.orig_connection = newconn for d in self.clone_design.clone_virtual_disks: d.conn = newconn self.clone_design.setup() CloneManager.start_duplicate(self.clone_design, meter) finally: self.orig_vm.set_cloning(False)