Environment
Cloudboot XEN hypervisors
Question
How can I upgrade CentOS 5 XEN 3 Compute Resources to CentOS 6 XEN 4 Compute Resources?
Answer
It’s not possible to upgrade the OS of Compute Resource, but it is possible to Cold Migrate Virtual Servers to CentOS 6 XEN 4 Compute Resources. This is done by rebooting the Compute Resource into another ramdisk that has the updated CentOS version.
Question
How can I Cold migrate Virtual Servers from CentOS 5 XEN 3 to CentOS 6 XEN 4 Compute Resources?
Answer
Phase 1.
Ensure that your existing Compute Resources are compatible with CentOS 6.
We suggest to create a staging CentOS 6 XEN 4 Hypervisor Zone with Integrated Storage and create several test Virtual Servers on it. The hypervisor hardware should be identical to the one used in the production environment.
After you set up the Hypervisor and attach it to the staging Hypervisor Zone:
-
Create an Integrated Storage DataStore, use similar Stripe, Replica and Overcommit settings.
-
Attach all resources, including network, datastores, ip list, etc.
-
Start by creating several Virtual Servers with similar configuration as on your production XEN 3 environment.
-
Perform various Virtual Server operations to ensure that your hypervisor is working as expected.
-
In case you encounter any issue, you can contact OnApp Support team for help.
Phase 2.
Schedule a time frame when you can shutdown all of the Virtual Servers on the production XEN 3 Hypervisor Zone.
After you finish testing the staging XEN 4 Hypervisor Zone, prepare the production XEN 3 Hypervisor Zone for shutdown:
-
Backup your Control Panel Database.
-
Go to the Control Panel and Shutdown each Virtual Server.
Phase 3.
Perform CloudBoot OS Migration.
- After all Virtual Servers are shutdown, login to your Control Panel Database.
- You need to update the CloudBoot OS for CentOS 5 XEN 3 hypervisors in one Zone.
- Here is an example how to do this:
Find the database password:
cat /onapp/interface/config/database.yml |grep password |
Open the onapp database in MySQL:
mysql -p mysql> use onapp; Select the CentOS 5 XEN 3 Hypervisors: mysql> select id,label,ip_address,hypervisor_group_id,hypervisor_type,cloud_boot_os from hypervisors where hypervisor_type = "xen"; +----+--------------------+--------------+---------------------+-----------------+---------------+ | id | label | ip_address | hypervisor_group_id | hypervisor_type | cloud_boot_os | +----+--------------------+--------------+---------------------+-----------------+---------------+ | 2 | LVIS-XEN-HV1-f0-30 | 192.168.1.30 | 48 | xen | centos5 | | 4 | LVIS-XEN-HV2-84-31 | 192.168.1.31 | 48 | xen | centos5 | +----+--------------------+--------------+---------------------+-----------------+---------------+ 2 rows in set (0.00 sec) Update the CloudBoot OS on the Selected Hypervisors in the Compute Resource Zone: mysql> update hypervisors set cloud_boot_os="centos6" where hypervisor_type = "xen" 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 Check the result: mysql> select id,label,ip_address,hypervisor_group_id,hypervisor_type,cloud_boot_os from hypervisors where hypervisor_type = "xen"; +----+--------------------+--------------+---------------------+-----------------+---------------+ | id | label | ip_address | hypervisor_group_id | hypervisor_type | cloud_boot_os | +----+--------------------+--------------+---------------------+-----------------+---------------+ | 2 | LVIS-XEN-HV1-f0-30 | 192.168.1.30 | 48 | xen | centos6 | | 4 | LVIS-XEN-HV2-84-31 | 192.168.1.31 | 48 | xen | centos6 | +----+--------------------+--------------+---------------------+-----------------+---------------+ 2 rows in set (0.00 sec) |
Update Control Panel Settings:
- Go to Control Panel -> Dashboard -> Settings -> Configuration.
- Press “Save Configuration”.
- Wait of the “UpdateStorageConfig” transactions to finish.
Phase 4.
Reboot the Compute Resource.
-
Login to each of the hypervisors and check for degraded Vdisks or check via the Integrated Storage Diagnostic UI.
-
It’s recommended to repair all issues that you encounter in the Diagnostic UI.
-
Reboot the target hypervisors.
-
Wait for the hypervisors to come online and check if all previous nodes appear online and are healthy
-
Check the Diagnostic UI for possible degraded Vdisks and nodes. Repair all issues that you encounter in the Diagnostic UI.
In case the nodes don't come up online, perform the following for each hypervisor:
-
Go to Settings -> Compute Resources -> Hypervisor -> Manage Devices -> Edit Configuration.
-
Assign the new SCSI identifier (drives) to the Integrated Storage.
-
Reboot the hypervisor.
-
Wait for the hypervisor to come online and check if all previous nodes appear online and are healthy
-
Check the Diagnostic UI for possible degraded Vdisks and nodes. Repair all issues that you encounter in the Diagnostic UI
Phase 5.
For the moment, the data of virtual servers should be migrated to CentOS 6 XEN 4 Compute Resource.
Perform a network Diagnostics Sequence to make sure you have no connectivity issues.
Start by Powering On all Virtual Servers on the migrated XEN 4 Compute Resource Zone.
Migration should be finished at this point.