Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

external-header-nav
keyboard_arrow_up
list Table of Contents
file_download PDF
keyboard_arrow_right

Migrate KVM to RHV

date_range 21-Dec-21

Starting in v16.2, Contrail Cloud now uses Red Hat Enterprise Virtualization (RHEV, or RHV) for the control host hypervisors. The jump host and overcloud computes will continue to use Kernel-based Virtual Machine (KVM).

Follow these steps to migrate the control host KVM to RHV:

Note:

Configuration changes to your overcloud-nics.yml file must be made at this point.

You must change the VM interface naming in your overcloud-nics.yml file before starting the steps below. The VM interface naming must be changed from emX to the enp(x+1)s0 naming structure. These interfaces include:

  • Controller_network_config
  • AppformixController_network_config

Your change will look similar to the example below:

content_copy zoom_out_map
- type: interface
  name: enp1s0
  use_dhcp: false

You can reference the samples provided in Configuration File Changes for more details.

  1. Deploy Red Hat Virtualization Manager (RHVM) from the jump host.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/install_rhvm.sh -d
  2. Log in to the RHV Manager Web UI to verify that RHVM deployed successfully. Your ability to access the web UI is verification of a successful RHV Manager deployment. To access the GUI, enter https://<jumphost fqdn>/ovirt-engine/ in your browser. The default user is admin, and the default password is c0ntrail123.
  3. Test NFS and back up the contrail configuration database onto the NFS storage.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/pre-contrail-cloud-upgrade-kvm2rhv.sh -d
  4. Migrate your control host. This will migrate a single node per script run.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/contrail-cloud-upgrade-kvm2rhv.sh -d
    This script will:
    • Perform the maintenance and backup of the openstack controller VM.
    • Re-image and reconfigure the control host.
    • Connects the VM to the RHVM and sets up VM storage.
    • Creates the OpenStack VM, k8s_host VM, and Contrail Insights VM and adds them to Ironic as resources.
    • Deploys the OpenStack VM from the backup.
  5. Run the upgrade script for each remaining control host, until all control hosts have been converted.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/contrail-cloud-upgrade-kvm2rhv.sh -d
  6. Run the post-migration script to perform cleanup, refresh Ironic configuration and facts, and disable maintenance mode.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/post-contrail-cloud-upgrade-kvm2rhv.sh -d
  7. Deploy the Kubernetes (k8s) clusters.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/k8s-cluster-deploy.sh -d

    This will:

    • Deploy RHEL8 onto the k8s_host VMs in each control host.
    • Deploy a Kubernetes cluster onto the set of k8s_host VMs.
  8. Find your overcloud stack ID.
    You will need your overcloud stack ID for setting up your NFS backup directory in the steps below. Run the following from the jump host:
    content_copy zoom_out_map
    ssh undercloud "source stackrc; openstack stack show overcloud -f value -c id"
  9. Mount the NFS backup directory on jump host.
    content_copy zoom_out_map
    mkdir -p /var/lib/contrail_cloud/nfs_mount
    sudo mount <ip/fqdn_of_nfs_server>:/<nfs_dir> /var/lib/contrail_cloud/nfs_mount
    ls -al /var/lib/contrail_cloud/nfs_mount/<your_overcloud_stack_id>/db-dump.json
    
  10. Deploy the Contrail cluster.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/k8s-tf-operator-deploy.sh -d -i /var/lib/contrail_cloud/nfs_mount/<your_overcloud_stack_id>/db-dump.json
  11. Unmount and remove your NFS directory.
    content_copy zoom_out_map
    sudo umount /var/lib/contrail_cloud/nfs_mount && rmdir /var/lib/contrail_cloud/nfs_mount
  12. Run the overcloud deployment to update OpenStack with the new Contrail virtual IP address values.
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/openstack-deploy.sh -d
  13. Run Contrail Insight deploy (if required for your environment).
    content_copy zoom_out_map
    /var/lib/contrail_cloud/scripts/contrail-insights-deploy.sh -d
  14. It is possible that the upgrade could interrupt some of the PCS (Pacemaker) resources. From one of the OpenStack controllers, run the following command to verify all PCS resources were properly started:
    content_copy zoom_out_map
    sudo pcs status
    1. Make sure any failed resources are started and stable. Cleanup any failed actions by running the following command:
      content_copy zoom_out_map
      sudo pcs resource cleanup
  15. Verify all Contrail networks, ports, policies, and configurations are correct. You can now manually remove the files from the NFS directory after you have verified a successful upgrade.
    content_copy zoom_out_map
    <ip/fqdn_of_nfs_server>:/<nfs_dir>/<your_overcloud_stack_id>
external-footer-nav