Migrate KVM CloudBoot Compute Resources

You can run a cold migration of virtual servers from CloudBoot compute resources based on CentOS 6 KVM to an environment running CentOS 7 KVM. 

Since the CloudBoot OS is loaded from the Control Panel server to the Compute Resources RAM and afterwards is booted, this document describes how to change the target Cloudboot OS. The cold migration procedure requires several changes in to the Control Panel DataBase and a reboot to load the new CloudBoot OS. OnApp recommends to stop all VMs before the upgrade to ensure that all Compute Resources will be upgraded after reboot avoiding mixed CloudBoot OS in the same CloudBoot Compute Resource Zone.



On this page:

Prerequisites


Ensure that CloudBoot Compute Resources are Compatible with CentOS 7

To start with, ensure that your existing CloudBoot compute resources are compatible with CentOS 7. For this purpose, you can create a staging CentOS 7 KVM compute zone with Integrated Storage and set up several test virtual servers in this zone.The compute resource hardware should be identical to the one used in the production environment.

After you setup the compute resource and attach it to the staging compute zone, run the following steps:

  1. Create an Integrated Storage Data Store, using similar StripeReplica, and Overcommit settings.

  2. Attach all the required resources, including network, data stores, IP list, etc.

  3. Create several virtual servers with configuration similar to the one on your production environment.

  4. Perform various operations on virtual servers to ensure that your compute resource works as expected.

In case you encounter any issues, contact OnApp Support for assistance.

Schedule Shutdown of all Virtual Servers in Production Environment

After ensuring that your existing CloudBoot compute resources are compatible with CentOS 7, you need to schedule a date when you can shut down all virtual servers that run in the production CentOS 6 KVM compute zone. 

To prepare the production CentOS 6 KVM compute zone for shutdown, create a backup of your Control Panel database. 

When you are ready, you can shut down virtual servers as follows: 

  1. Go to the Control Panel > CloudVirtual Servers menu. 
  2. Click a label of the target virtual server. Expand the Tools menu and click the Shutdown button.
  3. Repeate this action for each virtual server in the compute zone. 


Migrate CloudBoot OS


After all virtual servers are shut down, log in to your Control Panel database and update CloudBoot OS for CentOS 6 KVM compute resource in the compute zone.

Below, you can find the instructions on how you can update CloudBoot OS: 

  1. Find the database password by running the following command:

    cat /onapp/interface/config/database.yml |grep password
  2. Open the OnApp database in MySQL by running the next command:

    mysql -p 
    mysql> use onapp;
  3. Select the CentOS 6 KVM compute resources with the following command:

    mysql> select id,label,ip_address,hypervisor_group_id,hypervisor_type,cloud_boot_os from hypervisors where hypervisor_type = "kvm";
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    | id | label              | ip_address   | hypervisor_group_id | hypervisor_type | cloud_boot_os |
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    |  2 | LVIS-KVM-HV1-f0-30 | 192.168.1.30 |                  48 | kvm             | centos6       |
    |  4 | LVIS-KVM-HV2-84-31 | 192.168.1.31 |                  48 | kvm             | centos6       |
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    2 rows in set (0.00 sec)
  4. Update the CloudBoot OS on selected compute resources in the compute zone with the next command:

    mysql> update hypervisors set cloud_boot_os="centos7" where hypervisor_type = "kvm" and hypervisor_group_id = 48;  (where 48 is you Compute Resource Zone ID)
    Query OK, 2 rows affected (0.03 sec)
    Rows matched: 2  Changed: 2  Warnings: 0
  5. Check the result by running the following command:

    mysql> select id,label,ip_address,hypervisor_group_id,hypervisor_type,cloud_boot_os from hypervisors where hypervisor_type = "kvm";
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    | id | label              | ip_address   | hypervisor_group_id | hypervisor_type | cloud_boot_os |
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    |  2 | LVIS-KVM-HV1-f0-30 | 192.168.1.30 |                  48 | kvm             | centos7       |
    |  4 | LVIS-KVM-HV2-84-31 | 192.168.1.31 |                  48 | kvm             | centos7       |
    +----+--------------------+--------------+---------------------+-----------------+---------------+
    2 rows in set (0.00 sec)


Update Control Panel Settings


When the CloudBoot OS is migrated, you need to update the Control Panel configuration as follows: 

  1. Go to the Control Panel > AdminSettings > Configuration menu. 
  2. Click the Save Configuration button. 
  3. Wait for the UpdateStorageConfig transactions to be completed. 


Reboot Compute Resources


Next, you need to check the state of your compute resources and reboot them: 

  1. Log in to each compute resource and check it for the degraded vdisks. 

    Alternatively, you can check the disks health at the Integrated Storage Diagnostics page. It is recommended to fix all issues that you encounter in Diagnostics before rebooting compute resources.

  2. Reboot the target compute resources. Wait for the compute resource to come back online and check whether all previous nodes are online and healthy. 
  3. Check the Diagnostics page for possible degraded vdisks and nodes. Fix all issues that you encounter in Diagnostics. 

In case nodes won’t come up online for a compute resource:

  1. Go to the AdminSettings > Compute Resources > Hypervisor > Manage Devices > Edit Configuration page.
  2. Assign a new SCSI identifier (drive) to the Integrated Storage.
  3. Reboot the compute resource. 
  4. Wait for the compute resource to come back online and check whether all previous nodes are online and healthy. 
  5. Check the Diagnostics page for possible degraded vdisks and nodes. Fix all issues that you encounter in Diagnostics.   


Power On Virtual Servers 


At this point, virtual servers data should be migrated to CentOS 7 KVM compute resource. To make sure that you have no connectivity issues, run Network Health Check

If everything works as expected, start up your virtual servers in the migrated CentOS 7 KVM compute resource zone.