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.
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:
Create an Integrated Storage Data Store, using similar Stripe, Replica, and Overcommit settings.
Attach all the required resources, including network, data stores, IP list, etc.
Create several virtual servers with configuration similar to the one on your production environment.
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:
- Go to the Control Panel > Cloud > Virtual Servers menu.
- Click a label of the target virtual server. Expand the Actions menu, point to Power, and click the Shut down Virtual Server button.
- Repeat 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:
Find the database password by running the following command:
cat /onapp/interface/config/database.yml |grep password
CODEOpen the OnApp database in MySQL by running the next command:
mysql -p mysql> use onapp;
CODESelect 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";
CODE+----+--------------------+--------------+---------------------+-----------------+---------------+ | 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)
CODEUpdate 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)
CODEQuery OK, 2 rows affected (0.03 sec) Rows matched: 2 Changed: 2 Warnings: 0
CODECheck 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";
CODE+----+--------------------+--------------+---------------------+-----------------+---------------+ | 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)
CODE
Update Control Panel Settings
When the CloudBoot OS is migrated, you need to update the Control Panel configuration as follows:
- Go to the Control Panel > Admin > Settings > Configuration menu.
- Click the Save Configuration button.
- 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:
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.
- Reboot the target compute resources. Wait for the compute resource to come back online and check whether all previous nodes are online and healthy.
- 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:
- Go to the Admin > Settings > Compute Resources > Hypervisor > Manage Devices > Edit Configuration page.
- Assign a new SCSI identifier (drive) to the Integrated Storage.
- Reboot the compute resource.
- Wait for the compute resource to come back online and check whether all previous nodes are online and healthy.
- 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.