I tried to create a custom module to create a custom configuration for Magento 2 data migration tool, like this:


<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_migration" setup_version="1.0.0">
        <module name="Magento_DataMigrationTool"/>


    "name": "vendor/module-migration",
    "description": "Providing config for migration",
    "config": {
        "sort-packages": true
    "require": {
        "magento/framework": "*",
        "magento/data-migration-tool": "*"
    "type": "magento2-module",
    "autoload": {
        "files": [
        "psr-4": {
            "Vendor\\Migration\\": ""
    "version": "1.0.0"





when I run the migration, I got the following error:

php bin/magento migrate:settings -r -a app/code/Vendor/Migration/etc/opensource-to-opensource/

Invalid map filename: /var/www/M2/vendor/magento/data-migration-tool/app/code/Vendor/Migration/etc/opensource-to-opensource/

it seems it still call the vendor module path as a prefix

1 Answer 1


The problem is that the rootDir in vendor/magento/data-migration-tool/src/Migration/Reader/Settings.php is set to vendor/magento/data-migration-tool/ :

$rootDir = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR;

You can override the validate() function in your Vendor/Migration module to set the rootDir to your module's directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.