Migrating Managed Instances to OS Management Hub
Migrate OS Management managed instances to OS Management Hub using appropriate registration profiles. The migration assistant also supports bulk migration of instances to OS Management Hub.
- Prerequisites
-
- Create the necessary OS Management Hub resources and resolve any compatibility issues to ensure a successful migration. For more information, see Migration Workflow.
- Verify the instances are using Oracle Cloud Agent version 1.40 or later. OS Management Hub requires minimum Oracle Cloud Agent version 1.40. For instances using platform images released before April 2024, upgrade the Oracle Cloud Agent to 1.40 or later.
For simplicity and efficiency, we recommend that you use the migration assistant tool to perform this task. For more information, see Installing the Migration Assistant.
Using the Migration Assistant
Use the osms-to-osmh migrate managed-instance
command and required parameters to migrate OS Management managed instances to the OS Management Hub service.
It takes up to 20 minutes for the instance to unregister from OS Management and register with OS Management Hub as part of the migration process.
- Migrating an Instance
-
You can migrate an OS Management managed instance to OS Management Hub by specifying the OCID assigned to the instance.
For example:
osms-to-osmh migrate managed-instance --managed-instance-id ocid
The command first checks to see if the managed instances have already migrated over to OS Management Hub. If so, no further action is required. If not, the command then prompts you for the profile to use for registering the instance with OS Management Hub.
The following is sample output:
$ osms-to-osmh migrate managed-instance --managed-instance-id ocid1.instance.oc1..<unique_ID> Migrating instance: ocid1.instance.oc1..<unique_ID> Fetching compatible profiles for instance Available profiles: S.No. Name Profile Type ----- ------- -------------- 1 ol9-arm SOFTWARESOURCE Select a profile: 1 Migrate ol9-mi01 to OS Management Hub with ol9-arm? [y/n] y Attaching profile ol9-arm to ol9-mi01 Disabling OS Management Service Agent Enabling OS Management Hub Agent Registering instance with OS Management Hub.............. Instance migrated successfully
- Migrating Instances in Bulk
-
You can migrate multiple OS Management managed instances to OS Management Hub with the same profile by specifying a comma separated list of instance OCIDs and the profile OCID. You can bulk migrate up to 5 instances directly on the command line.
For example:
osms-to-osmh migrate managed-instance --managed-instance-id ocid1,ocid2,ocid3 --profile profile -y
If you have more than 5 instances to migrate or have instances using varying profiles, you can perform a bulk migration of OS Management managed instances to OS Management Hub using a JSON map. See Option Details for information about the JSON map file format.
For example:
osms-to-osmh migrate managed-instance --mi-profile-map file://json_file -y
Bulk migrations run in parallel. You can control the number of instances that migrate in parallel with the
--threads
option (the default is 3).The Status column changes as the instances goes through their migration phases. The following is sample output showing instances that are going through the validation stage of the migration.
OCID Status ------------------------------- ------------------------------------------------------ ocid1.instance.oc1..<unique_ID> Validating Instance (This might take up to 20 minutes) ocid1.instance.oc1..<unique_ID> Validating Instance (This might take up to 20 minutes) ocid1.instance.oc1..<unique_ID> Validating Instance (This might take up to 20 minutes)
When the bulk migration is done, the Status column updates to Done.
OCID Status ------------------------------- ------ ocid1.instance.oc1..<unique_ID> Done ocid1.instance.oc1..<unique_ID> Done ocid1.instance.oc1..<unique_ID> Done Successfully migrated 3 instances
Usage
osms-to-osmh [--threads number] migrate managed-instance --managed-instance-id ocid [--profile ocid
] [--mi-profile-map map] [-y | --yes] [ --help]
Option Details
Parameter | Description |
---|---|
--threads number |
Sets the number of instances to be migrated in parallel. The range is from 2 to 10 (the default is 3). |
--managed-instance-id |
Migrates the managed instance from OS Management to OS Management Hub. For ocid, specify the OCID assigned to the managed instance. Specify a comma separated list of OCIDs to migrate more than one managed instance. You can specify up to 5 instance OCIDs. |
--profile |
Specifies the registration profile to associate with the managed instances being migrated to OS Management Hub. For ocid, specify the OCID assigned to the profile. If this optional parameter isn't specified, the command prompts you to specify a profile. |
--mi-profile-map map |
Specifies JSON input for associating managed instances with profiles for batch migration, For map, specify a JSON string or file path to a JSON file. The JSON input format is as follows:
|
-y | --yes |
Proceeds with actions required to migrate the instance without prompting you for confirmation. |
--help |
Displays help information about the migration assistant command, such as the available options and the supported values for each option. |
Using the Console
For more information about how to enable and run plugins, see Managing Plugins with Oracle Cloud Agent.