Esempio n. 1
0
    def validate_cpu(self):
        logging.info("Checking CPU compatibility")

        logging.info("\t`- Dumping CPU info")
        req = criu_req.make_cpuinfo_dump_req(self.htype, self.img)
        resp = self.criu_connection.send_req(req)
        if not resp.success:
            raise Exception("Can't dump cpuinfo")

        logging.info("\t`- Sending CPU info")
        self.img.send_cpuinfo(self.target_host, self.connection.mem_sk)

        logging.info("\t`- Checking CPU info")
        if not self.target_host.check_cpuinfo():
            raise Exception("CPUs mismatch")
Esempio n. 2
0
	def validate_cpu(self):
		logging.info("Checking CPU compatibility")

		logging.info("\t`- Dumping CPU info")
		req = criu_req.make_cpuinfo_dump_req(self.htype, self.img)
		resp = self.criu_connection.send_req(req)
		if not resp.success:
			raise Exception("Can't dump cpuinfo")

		logging.info("\t`- Sending CPU info")
		self.img.send_cpuinfo(self.target_host, self.connection.mem_sk)

		logging.info("\t`- Checking CPU info")
		if not self.target_host.check_cpuinfo():
			raise Exception("CPUs mismatch")
Esempio n. 3
0
	def __validate_cpu(self):
		if self.__skip_cpu_check or self.__force:
			return
		logging.info("Checking CPU compatibility")

		logging.info("\t`- Dumping CPU info")
		req = criu_req.make_cpuinfo_dump_req(self.img)
		resp = self.criu_connection.send_req(req)
		if resp.HasField('cr_errno') and (resp.cr_errno == errno.ENOTSUP):
			logging.info("\t`- Dumping CPU info not supported")
			self.__force = True
			return
		if not resp.success:
			raise Exception("Can't dump cpuinfo")

		logging.info("\t`- Sending CPU info")
		self.img.send_cpuinfo(self.target_host, self.connection.mem_sk)

		logging.info("\t`- Checking CPU info")
		if not self.target_host.check_cpuinfo():
			raise Exception("CPUs mismatch")
	def __validate_cpu(self):
		if self.__skip_cpu_check or self.__force:
			return
		logging.info("Checking CPU compatibility")

		logging.info("\t`- Dumping CPU info")
		req = criu_req.make_cpuinfo_dump_req(self.img)
		resp = self.criu_connection.send_req(req)
		if resp.HasField('cr_errno') and (resp.cr_errno == errno.ENOTSUP):
			logging.info("\t`- Dumping CPU info not supported")
			self.__force = True
			return
		if not resp.success:
			raise Exception("Can't dump cpuinfo")

		logging.info("\t`- Sending CPU info")
		self.img.send_cpuinfo(self.target_host, self.connection.mem_sk)

		logging.info("\t`- Checking CPU info")
		if not self.target_host.check_cpuinfo():
			raise Exception("CPUs mismatch")