Chapter 2. Installation

The installation phase requires the following stages:

  • Prerequisites: Installing and configuring the Red Hat environment
  • Creating the RHV conversion host(s)
  • Configuring the RHV conversion host(s)
  • Configuring the maximum number of concurrent migrations (optional, only supported for SSH transformation)

2.1. Prerequisites

Before migration, your environment must have the following prerequisites:

Target datastore size
The target datastore must have sufficient space for the virtual machines that will be migrated.
BIOS settings of hosts
The BIOS settings of the physical hosts should be set for optimal performance, rather than power-saving, according to the vendor’s recommendations. Where applicable, the C1E halt state should be disabled.
Red Hat Virtualization Manager 4.2.4 or later installed
See the Red Hat Virtualization Planning and Prerequisites Guide and Installing the Red Hat Virtualization Manager.
Red Hat Virtualization Hosts 4.2.4 or RHEL 7.5 hosts or later installed
See Installing Red Hat Virtualization Host or Installing Red Hat Enterprise Linux Hosts.
Network

The VMware network must be extended to the RHV environment.

Important

The network configuration must not be changed in any way during the migration. IP addresses, VLANs, and other network configurations must be the same, before and after migration, because the conversion process preserves the source virtual machine MAC addresses.

Ports

The following ports must be enabled:

  • 22 - SSH
  • 443 - CloudForms, Red Hat Virtualization Manager, and VDDK
  • 902 - CloudForms to VMware
  • 5480 - virt-v2v to vCenter

For more information, see Ports used by Red Hat CloudForms Management Engine 5.1 and above.

Data and ISO storage domains attached to the RHV data center

See Storage in the Red Hat Virtualization Administration Guide.

Note

IMS only supports shared storage, such as NFS, iSCSI, or FCP. Local storage is not supported.

VirtIO and Guest Tool images uploaded to the ISO storage domain

See Uploading the VirtIO and Guest Tool Image Files to an ISO Storage Domain.

Note

The VirtIO image file name must include the version number: virtio-win-version.iso.

Red Hat CloudForms 4.6.4 or later installed
See Installing Red Hat CloudForms on Red Hat Virtualization.
VMware and RHV environments added to CloudForms
See VMware vCenter Providers and Red Hat Virtualization Providers.
Virtual machine names checked
Virtual machine names may contain only upper- or lower-case letters, numbers, underscores (_), hyphens (-), or periods (.). Special characters and spaces are not permitted.
RHV hosts authenticated
See Authenticating Red Hat Virtualization Hosts.
VMware hosts authenticated
See Authenticating VMware vCenter Hosts.
RHV conversion hosts created and configured
See Section 2.2, “RHV Conversion Hosts”.

2.2. RHV Conversion Hosts

All the virtual machines that are specified in a migration plan are migrated at the same time. Therefore, the number of RHV conversion hosts that you create depends on the number of virtual machines you intend to migrate. Red Hat recommends configuring the RHV conversion hosts on physical machines, not nested virtual machines.

Each conversion host is limited to 10 concurrent migrations, unless you change the default value.

Important

The maximum number of concurrent virtual machine migrations per conversion host is 10, for VDDK transformation, and 20, for SSH transformation. The SSH transformation limitation applies only to Red Hat Virtualization 4.2.5, not to later versions.

Multiple conversion hosts are recommended, even for smaller migrations, for load-balancing purposes. The number of virtual machines that you can migrate at the same time depends on your infrastructure capabilities. Each migration requires a certain amount of network bandwidth, I/O throughput, and processing power for the conversion process. You should test your environment to understand how many migrations can occur simultaneously without negative effects.

Datapath Transformation Options: VDDK or SSH

Select the best datapath transformation option for your environment, either VDDK or SSH:

VDDK
  • Recommended because it is approximately twice as fast as SSH
  • Compiled with nbdkit to provide direct connectivity to the virtual machine disks
  • VDDK package must be downloaded
  • Conversion host configuration requires a location
  • Each conversion host supports only 10 concurrent migrations
SSH
  • Does not require additional downloads, packages, tools, or compilation
  • RHV and VMware environments must share SSH keys
  • SSH access must be enabled on ESXi hosts
  • Slower than VDDK
  • Suitable for larger scale migrations than VDDK

2.2.1. Creating and Configuring RHV Conversion Hosts for VDDK Transformation

Create and configure RHV conversion hosts for VDDK transformation:

  1. Log in to the VMware VDDK Documentation site and download the latest VDDK package (for example, VMware-vix-disklib-6.5.3-8315684.x86_64.tar.gz) to your local machine.
  2. Using SCP, copy the VDDK package to /var/www/html on the Manager machine.
  3. Go to the Ansible conversion hosts playbooks directory on the Manager machine:

    # cd /usr/share/ovirt-ansible-v2v-conversion-host/playbooks/
  4. Create a conversion_hosts_inventory.yml inventory file with the following variables:

    all:
      hosts:
        host1.example.com:
        host2.example.com:
      vars:
        ansible_ssh_private_key_file: /etc/pki/ovirt-engine/keys/engine_id_rsa
        v2v_vddk_package_name: VMware-vix-disklib-version.x86_64.tar.gz
        v2v_vddk_package_url: http://Manager_FQDN/VMware-vix-disklib-version.x86_64.tar.gz
  5. Enable the conversion hosts:

    # ansible-playbook -i conversion_hosts_inventory.yml conversion_host_enable.yml
    Note

    The Ansible role checks for the presence of the RHV guest tools ISO image in the ISO storage domain. This image is used to migrate Windows virtual machines.

  6. Verify that the conversion hosts are enabled:

    # ansible-playbook -i conversion_hosts_inventory.yml conversion_host_check.yml
Note

If you upgrade your RHV environment, you must run the conversion_host_enable playbook again, with the option -e v2v_vddk_override=true, to update the IMS packages.

After creating the RHV conversion hosts, you must configure them in CloudForms. See Section 2.2.3, “Configuring RHV Conversion Hosts in CloudForms”.

2.2.2. Creating and Configuring RHV Conversion Hosts for SSH Transformation

Create and configure RHV conversion hosts for SSH transformation:

  1. Go to the Ansible conversion hosts playbooks directory on the Manager machine:

    # cd /usr/share/ovirt-ansible-v2v-conversion-host/playbooks/
  2. Create a conversion_hosts_inventory.yml inventory file with the following variables:

    all:
      hosts:
        host1.example.com:
        host2.example.com:
      vars:
        ansible_ssh_private_key_file: /etc/pki/ovirt-engine/keys/engine_id_rsa
  3. Enable the conversion hosts:

    # ansible-playbook -i conversion_hosts_inventory.yml conversion_host_enable.yml
    Note

    The Ansible role checks for the presence of the RHV guest tools ISO image in the ISO storage domain. This image is used to migrate Windows virtual machines.

  4. Verify that the conversion hosts are enabled:

    # ansible-playbook -i conversion_hosts_inventory.yml conversion_host_check.yml
  5. Enable SSH on all the VMware hypervisors. See Enable SSH from the vSphere Web Client for details.

    Note

    If you created the RHV conversion hosts manually, without using the ovirt-ansible-v2v-conversion-host role, you must create the key pairs on each conversion host for the vdsm user:

    # install -o vdsm -g kvm -m 0700 -d /var/lib/vdsm/.ssh
    # ssh-keygen -t rsa -N '' -C "vdsm@hostname" -f /var/lib/vdsm/.ssh/id_rsa
    # chown vdsm:kvm /var/lib/vdsm/.ssh/id_rsa
  6. Copy the SSH keys to the VMware hypervisors:

    # ssh root@esx1.example.com sh -c 'cat >> /etc/ssh/keys-root/authorized_keys' < /var/lib/vdsm/.ssh/id_rsa.pub
    Note

    This step ensures that each conversion host has the SSH key of the ESXi host in its known_hosts file.

  7. Validate the configuration by connecting to the VMware hypervisor using ssh-agent, the program that virt-v2v uses to connect to the hypervisor:

    # sudo -u vdsm ssh-agent
    SSH_AUTH_SOCK=/tmp/ssh-Gi2oSn44DHNL/agent.65904; export SSH_AUTH_SOCK;
    SSH_AGENT_PID=65905; export SSH_AGENT_PID;
    echo Agent pid 65905;
    
    # sudo -u vdsm SSH_AUTH_SOCK=/tmp/ssh-Gi2oSn44DHNL/agent.65904 ssh-add
    # sudo -u vdsm \
        SSH_AUTH_SOCK=/tmp/ssh-Gi2oSn44DHNL/agent.65904 ssh root@esx1.example.com

    If the connection is successful, the RHV conversion host is correctly configured for SSH transformation.

Note

If you are using SSSD with single sign-on, see Troubleshooting for additional information.

After creating the RHV conversion hosts, you must configure them in CloudForms. See Section 2.2.3, “Configuring RHV Conversion Hosts in CloudForms”.

Additional resources

2.2.3. Configuring RHV Conversion Hosts in CloudForms

Configure the RHV conversion hosts in CloudForms:

  1. Click ComputeInfrastructureHosts and select a Red Hat Virtualization Host.
  2. Click the Policy drop-down button and select Edit Tags.
  3. Select V2V - Transformation Host from the tag drop-down list and t as the assigned value.
  4. Select V2V - Transformation Method from the tag drop-down list and either VDDK or SSH as the assigned value. See Datapath Transformation Options: VDDK vs. SSH for more information.
  5. Click Save.
  6. Select the same host, click the Configuration drop-down button, and select Edit this item.
  7. In the Default tab of the Endpoints section, enter the Username root and the password.
  8. Click Validate. If a success message is displayed, click Save.

Conversion Host Properties

Conversion host properties

2.2.4. Configuring the Maximum Number of Concurrent Migrations

The default limit for concurrent migrations is 10 for a conversion host and 10 for a provider. You can change this value by setting the Max Transformation Runners attribute for the conversion host or for the provider, or both. The limit that is set for the provider has priority over the limit set for the conversion host. For example, if you set the number of concurrent migrations to 20 at the provider level, while having 3 conversion hosts, the number of concurrent migrations is limited to 20 because the provider’s setting overrides the conversion hosts' setting.

Important

The maximum number of concurrent virtual machine migrations per conversion host is 10, for VDDK transformation, and 20, for SSH transformation. The SSH transformation limitation applies only to Red Hat Virtualization 4.2.5, not to later versions.

The following examples show how to set Max Transformation Runners using the Rails console on the CloudForms appliance.

To set Max Transformation Runners for the conversion host host1.example.com to 20:

# vmdb
# rails console
irb(main):001:0> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
irb(main):002:0> $evm.vmdb(:host).find_by(:name => "host1.example.com").custom_set("Max Transformation Runners", 20)

To set Max Transformation Runners for the provider My RHV to 30:

# vmdb
# rails console
irb(main):001:0> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
irb(main):002:0> $evm.vmdb(:ext_management_system).find_by(:name => "My RHV").custom_set("Max Transformation Runners", 30)

The following examples show how to get the current configuration of Max Transformation Runners using the custom_get method. This method returns either the current configuration value or nil, if the value has not been set.

To get the configuration of Max Transformation Runners for conversion host host1.example.com:

# vmdb
# rails console
irb(main):001:0> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
irb(main):002:0> $evm.vmdb(:host).find_by(:name => "host1.example.com").custom_get("Max Transformation Runners")

To get the configuration of Max Transformation Runners for provider My RHV:

# vmdb
# rails console
irb(main):001:0> $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
irb(main):002:0> $evm.vmdb(:ext_management_system).find_by(:name => "My RHV").custom_get("Max Transformation Runners")