docs: def guest_deploy(self, userid, image_name, transportfiles=None,
                       remotehost=None, vdev=None):
          """ Deploy image and punch config driver to target """
          # (TODO: add the support of multiple disks deploy)
          msg = ('Start to deploy image %(img)s to guest %(vm)s'
                  % {'img': image_name, 'vm': userid})
          LOG.info(msg)
          image_file = '/'.join([self._get_image_path_by_name(image_name),
                                 CONF.zvm.user_root_vdev])
          # Unpack image file to root disk
          vdev = vdev or CONF.zvm.user_root_vdev
          cmd = ['sudo', '/opt/zthin/bin/unpackdiskimage', userid, vdev,
                 image_file]
          with zvmutils.expect_and_reraise_internal_error(modID='guest'):
              (rc, output) = zvmutils.execute(cmd)
          if rc != 0:
              err_msg = ("unpackdiskimage failed with return code: %d." % rc)
              err_output = ""
              output_lines = output.split('\n')
              for line in output_lines:
                  if line.__contains__("ERROR:"):
                      err_output += ("\\n" + line.strip())
              LOG.error(err_msg + err_output)
              raise exception.SDKGuestOperationError(rs=3, userid=userid,
                                                     unpack_rc=rc,
                                                     err=err_output)
  
          # Purge guest reader to clean dirty data
          rd = ("changevm %s purgerdr" % userid)
          action = "purge reader of '%s'" % userid
          with zvmutils.log_and_reraise_smt_request_failed(action):
              self._request(rd)
  
          # Punch transport files if specified
          if transportfiles:
              # Copy transport file to local
              msg = ('Start to send customized file to vm %s' % userid)
              LOG.info(msg)
  
              try:
                  tmp_trans_dir = tempfile.mkdtemp()
                  local_trans = '/'.join([tmp_trans_dir,
                                          os.path.basename(transportfiles)])
                  if remotehost:
                      cmd = ["/usr/bin/scp", "-B",
                             "-P", CONF.zvm.remotehost_sshd_port,
                             "-o StrictHostKeyChecking=no",
                             ("%s:%s" % (remotehost, transportfiles)),
                             local_trans]
                  else:
                      cmd = ["/usr/bin/cp", transportfiles, local_trans]
                  with zvmutils.expect_and_reraise_internal_error(modID='guest'):
                      (rc, output) = zvmutils.execute(cmd)
                  if rc != 0:
                      err_msg = ('copy config drive with command %(cmd)s '
                                 'failed with output: %(res)s' %
                                 {'cmd': str(cmd), 'res': output})
                      LOG.error(err_msg)
                      raise exception.SDKGuestOperationError(rs=4, userid=userid,
                                                             err_info=err_msg)
  
                  # Punch config drive to guest userid
                  rd = ("changevm %(uid)s punchfile %(file)s --class X" %
                        {'uid': userid, 'file': local_trans})
                  action = "punch config drive to userid '%s'" % userid
                  with zvmutils.log_and_reraise_smt_request_failed(action):
                      self._request(rd)
              finally:
                  # remove the local temp config drive folder
                  self._pathutils.clean_temp_folder(tmp_trans_dir)
          # Authorize iucv client
          self.guest_authorize_iucv_client(userid)
          # Update os version in guest metadata
          # TODO: may should append to old metadata, not replace
          image_info = self._ImageDbOperator.image_query_record(image_name)
          metadata = 'os_version=%s' % image_info[0]['imageosdistro']
          self._GuestDbOperator.update_guest_by_userid(userid, meta=metadata)
  
          msg = ('Deploy image %(img)s to guest %(vm)s disk %(vdev)s'
                 ' successfully' % {'img': image_name, 'vm': userid,
                                    'vdev': vdev})
          LOG.info(msg)