Skip to content

How to Migrate a Machine Between DRP Endpoints

This guide explains how to use the migrate-machine workflow to move a machine from one Digital Rebar Provision (DRP) endpoint to another, including prerequisites, required parameters, and special considerations for ESXi systems.

Overview

The migrate-machine workflow automates the process of transferring a machine object and updating its agent configuration to point to a new DRP endpoint. This is useful for data center migrations, environment promotions, or disaster recovery scenarios.

For an explanation see Machine Migration Between DRP Endpoints: An Explanation.

Prerequisites

Before starting the migration, ensure the following:

  • Both the source and destination DRP endpoints are accessible.
  • The following contexts are configured and available on both endpoints:
  • drpcli-runner
  • ansible-runner
  • You have authentication tokens for both the source and destination endpoints with appropriate permissions.

Step-by-Step Instructions

1. Gather Required Parameters

You will need:

  • migrate-machine/new-drp-server-api-url:
    The URL of the destination DRP endpoint (e.g., https://newdrp.example.com:8092).
  • migrate-machine/new-drp-server-token:
    A token for the destination endpoint that can create a machine migrateTicket.
    Tip: Generate this token using drpcli users token on the new endpoint.

2. (Optional) Set Advanced Parameters

  • migrate-machine/skip-machine-migration:
    Set to true to skip migrating the machine object (useful if you have already manually migrated the object and only need to update the agent).
  • migrate-machine/skip-machine-destroy:
    Set to true to keep the machine object on the old endpoint after migration.
    Default: false (the object will be removed).
  • migrate-machine/old-drp-server-token:
    Token for the source endpoint, required only if you want to destroy the old machine object.

3. (Do Not Modify) Internal Parameters

These parameters are managed automatically by the workflow:

  • migrate-machine/esxi-ssh-priv-key
  • migrate-machine/esxi-ssh-pub-key

Special Considerations for ESXi Machines

ESXi systems do not support the standard drpcli agent. For these systems:

  • Ensure SSH (sshd) is enabled and root key authentication is configured.
  • The workflow will:
  • Start sshd if needed.
  • Backup existing SSH configuration.
  • Install a temporary SSH key for migration.
  • After migration, clean up by restoring the original configuration and removing the temporary key.
  • If sshd was not originally enabled, it will be stopped and disabled after migration.

Troubleshooting

  • Missing Contexts:
    If migration fails, verify that the required contexts (drpcli-runner, ansible-runner) are available and functional on both endpoints.
  • Authentication Errors:
    Ensure tokens have the correct permissions for machine migration and (if needed) deletion.
  • ESXi SSH Issues:
    Confirm SSH access to the ESXi host as root with the correct keys.

Summary

By following this guide, you can reliably migrate machines between DRP endpoints using the migrate-machine workflow. Always verify prerequisites and parameters before starting the migration to ensure a smooth process.