def METHOD_NAME(hostdev_dev):
    """
    Generate a migratable xml for the VM with hostdev device
    :param hostdev_dev: hostdev device object
    """
    remote_pwd = params.get("migrate_dest_pwd")
    remote_ip = params.get("migrate_dest_host")
    remote_user = params.get("remote_user", "root")
    guest_xml = vm_xml.VMXML.new_from_dumpxml(vm.name,
                                              options="--migratable")
    guest_xml.remove_all_device_by_type("hostdev")
    guest_xml.add_device(hostdev_dev)
    guest_xml.xmltreefile.write()
    tmp_dir = data_dir.get_tmp_dir()
    xmlfile = os.path.join(tmp_dir, "xml_file")
    shutil.copyfile(guest_xml.xml, xmlfile)
    remote_session.cmd("mkdir -p %s" % tmp_dir)
    remote.scp_to_remote(remote_ip, '22', remote_user, remote_pwd,
                         xmlfile, xmlfile, limit="",
                         log_filename=None, timeout=600,
                         interface=None)
    params["virsh_migrate_extra"] += "--xml %s" % xmlfile