Este conteúdo não está disponível no idioma selecionado.

Chapter 4. Configuring AAP to launch a migration


Configure Ansible Automation Platform (AAP) to launch a migration.

Prerequisites

  • You have deployed your conversion host.
  • You have the IP address and hostname for your conversion host.
  • You have the user, public, and private key SSH access to the conversion host.

4.1. Ansible YAML files for migration

Prepare the Ansible YAML files the you use with the Ansible job template.

myvars.yml

# if you run the migration from an Ansible Execution Environment (AEE)
# set this to true:
runner_from_aee: true

# osm working directory:
os_migrate_vmw_data_dir: /opt/os-migrate
copy_openstack_credentials_to_conv_host: false

# Re-use an already deployed conversion host:
already_deploy_conversion_host: true

# If no mapped network then set the openstack network:
openstack_private_network: 81cc01d2-5e47-4fad-b387-32686ec71fa4 
1


# Security groups for the instance:
security_groups: ab7e2b1a-b9d3-4d31-9d2a-bab63f823243 
2

use_existing_flavor: true
# key pair name, could be left blank
ssh_key_name: default
# network settings for openstack:
os_migrate_create_network_port: true
copy_metadata_to_conv_host: true
used_mapped_networks: false

vms_list:
  - VM1
  - VM2
  - My_VM
  - Windows_VM
  - RHEL9_VM
  - Accounting_VM
  - ... 
3

1
Replace the example network ID here with your RHOSO network ID.
2
Replace the example security group here with your security groups.
3
Replace the example VM names here with the names of the VMs that you want to migrate.

secrets.yml

# VMware parameters:
esxi_hostname: 10.0.0.7
vcenter_hostname: 10.0.0.7
vcenter_username: root
vcenter_password: root
vcenter_datacenter: Datacenter 
1


os_cloud_environ: psi-rhos-upgrades-ci
dst_cloud:
  auth:
    auth_url: https://keystone-public-openstack.apps.ocp-4-16.standalone
    username: admin
    project_id: xyz
    project_name: admin
    user_domain_name: Default
    password: openstack
  region_name: regionOne
  interface: public
  insecure: true
  identity_api_version: 3 
2

1
Replace the example values here with the values from your VMware environment.
2
Replace the example values here with the values from your RHOSO environment.

4.2. Creating credentials for AAP

Create credentials in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Infrastructure, Credentials.
  2. Click Create Credentials.
  3. Set the following parameters:

    Name: Bastion key
    Credential Type: Machine
    Username: cloud-user
    SSH Private Key: key image
  4. Click Create Credential.

4.3. Creating an inventory for AAP

Create an inventory in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Infrastructure, Inventories.
  2. Click Create Inventory, Create Inventory.
  3. Set the following parameters:

    Name: Conversion Host Inventory
    Organization: Default
  4. Click Create Inventory.

4.4. Creating hosts for AAP

Create hosts in Ansible Automation Platform (AAP).

Procedure

  1. Create the conversion host:

    1. From the navigation panel, select Automation Execution, Infrastructure, Hosts.
    2. Click Create Host.
    3. Set the following parameters:

      Name: conversion_host
      Inventory: Conversion Host Inventory
      Variables:
      ansible_ssh_user: cloud-user
      ansible_host: <IP_or_hostname> 
      1
      1
      Replace <IP_or_hostname> with the IP address or hostname of your Ansible host.
    4. Click Create Host.
  2. Create the migrator host.

    1. From the navigation panel, select Automation Execution, Infrastructure, Hosts.
    2. Click Create Host.
    3. Set the following parameters:

      Name: migrator
      Inventory: Conversion Host Inventory
      Variables:
      ansible_connection: local
      ansible_python_interpreter: '{{ ansible_playbook_python }}'
    4. Click Create Host.

4.5. Creating an execution environment

Create an execution environment in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Infrastructure, Execution Environments.
  2. Click Create Execution Environment.
  3. Set the following parameters:

    Name: VMware migration toolkit Execution Environment
    Image: <insert the image that pushed to a repository when you built automation execution environment image>
    • Click Create Execution Environment.

4.6. Creating a project

Create a project in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Projects.
  2. Click Create Project
  3. Set the following parameters:

    Name: VMware migration toolkit project
    Organization: Default
    Execution Environment: VMware migration toolkit Execution Environment Environment
    Source Control Type: Git
    Source Control URL: https://github.com/os-migrate/vmware-migration-kit
    tag:"v2.1.0"
  4. Click Create Project.

4.7. Configuring the job template

Configure the job template in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Templates.
  2. Click Create Template, Create Job Template
  3. Set the following parameters:

    Name: Migration
    Inventory: Conversion Host Inventory
    Project: VMware migration toolkit project
    Playbook: playbooks/migration.yml
    Execution Environment: vmware migration toolkit Execution Environment
    Credentials: Bastion key
    Extra Variables: <Add your extra variables here, such as myvars.yml and secrets.yml>
  4. Click Create Job Template.

4.8. Launching the migration using execution

Launch the migration in Ansible Automation Platform (AAP).

Procedure

  1. From the navigation panel, select Automation Execution, Templates.
  2. Locate the Migration Job template.
  3. Click the rocket icon to launch the migration.

4.9. Configuring migration to run from local shared NFS

To migrate from a local shared Network File System (NFS), you can mount the NFS storage on the conversion host when the VMware virtual machines are located on an NFS datastore that is accessible to the conversion host. This enables the conversion host to directly consume VMware virtual machine disks (vmdk) from the local NFS mount, which can eliminate unnecessary data detours and reduce the migration network footprint and I/O latency.

Note

Only cold migration is supported.

Procedure

  1. Set the path to the NFS mount point on the conversion host in your vars file or playbook by using the Ansible variable import_workloads_local_disk_path:

    import_workloads_local_disk_path: "/srv/nfs"
  2. Run the migration.
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo