def __init__(self, p_type, connection): self.connection = connection self.target_host = xem_rpc_client.rpc_proxy(self.connection.rpc_sk) logging.info("Setting up local") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk) self.img = images.phaul_images("dmp") self.htype = htype.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs(self.connection.fs_sk) if not self.fs: raise Exception("No FS driver found") self.pid = self.htype.root_task_pid() self.pre_dump = PRE_DUMP_AUTO_DETECT logging.info("Setting up remote") self.target_host.setup(p_type)
def __init__(self, p_type, dst_id, mode, connection): self.__mode = mode self.connection = connection self.target_host = xem_rpc_client.rpc_proxy(self.connection.rpc_sk) logging.info("Setting up local") self.htype = htype.get_src(p_type) if not self.htype: raise Exception("No htype driver found") self.fs = self.htype.get_fs(self.connection.fdfs) if not self.fs: raise Exception("No FS driver found") self.img = None self.criu_connection = None if is_live_mode(self.__mode): self.img = images.phaul_images("dmp") self.criu_connection = criu_api.criu_conn(self.connection.mem_sk) logging.info("Setting up remote") p_dst_type = (p_type[0], dst_id if dst_id else p_type[1]) self.target_host.setup(p_dst_type, mode)