Chapter 12. Migrating from RHN to RHSM
Warning
Warning
Procedure 12.1. Upgrading the Satellite 5 Database Schema
- On the Satellite 5 server, list packages for which updates are applicable.
# yum check-update
If there is an update pending for thesatellite-schemapackage, complete the procedure detailed in How to upgrade the database schema of a Red Hat Satellite 5 server.
Procedure 12.2. Removing the Satellite 5 Subscription from Red Hat Network
- Open a web browser, log into the Red Hat Customer Portal, click Subscriptions, click Satellite in the list of Subscription Management Applications, then click on the Satellite tab.
- Find the desired Satellite instance in the list, and click on the host name.

Figure 12.1. Details of the Satellite 5 Subscription
- Click the check box beside the Red Hat Satellite subscription to be migrated, click , then click to confirm.
Warning
Remove only the Red Hat Satellite subscription. All other subscriptions must remain.The successful removal of the Red Hat Satellite subscription is confirmed by the message: The subscription(s) you selected have been removed. - In the Version drop-down list, select the version of Satellite 5 which you are currently running.
- Click and save the certificate file locally.The Satellite 5 entitlement certificate, contained in the file downloaded, is required in Procedure 12.3, “ Migrating the Satellite 5 Registration ”.
Procedure 12.3. Migrating the Satellite 5 Registration
- Record the Red Hat Network username which was used to register the Red Hat Enterprise Linux instance. This username and its password is required by the migration script.
# grep -A1 name\>username /etc/sysconfig/rhn/systemid
In this example, the username isadmin@example.com.<name>username</name> <value><string>admin@example.com</string></value>
- On the Satellite 5 server, ensure that all packages are current.
# yum update
- Confirm the version of the
spacewalk-backendpackage is at version2.0.3-42or higher.Note
If this is the Managed DB host, skip this step.# rpm -q spacewalk-backend spacewalk-backend-2.0.3-42.el6sat.noarch
Warning
If version 2.0.3-42 (or higher) ofspacewalk-backendpackage is not available, or cannot be installed, do NOT proceed with the migration. Contact Red Hat Support for assistance. - Install the packages
subscription-managerandsubscription-manager-migration.Thesubscription-manager-migrationpackage contains the Satellite 5 subscription script.# yum install subscription-manager # yum install subscription-manager-migration
- Run the Satellite 5 Red Hat Network to Red Hat Subscription Manager migration script.
# rhn-migrate-classic-to-rhsm Legacy username: Red Hat Network username Legacy password: Red Hat Network password
TheLegacy usernameandLegacy passwordare the same credentials which were used to register the server to Red Hat Network. The username was obtained in the prior step.Example output fromrhn-migrate-classic-to-rhsm.Retrieving existing legacy subscription information... +-----------------------------------------------------+ System is currently subscribed to these legacy channels: +-----------------------------------------------------+ rhel-x86_64-server-6 redhat-rhn-satellite-5.7-server-x86_64-6 +-----------------------------------------------------+ Installing product certificates for these legacy channels: +-----------------------------------------------------+ rhel-x86_64-server-6 redhat-rhn-satellite-5.7-server-x86_64-6 Product certificates installed successfully to /etc/pki/product. Preparing to unregister system from legacy server... System successfully unregistered from legacy server. Attempting to register system to destination server... Registering to: subscription.rhsm.redhat.com:443/subscription The system has been registered with ID: 284e025c-4a60-4084-b49c-4cb26fd7cf93 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed Product Name: Red Hat Satellite Status: Subscribed System 'satellite.example.com' successfully registered.
The messageSystem 'satellite.example.com' successfully registered.confirms that the Satellite 5 system's migration to Red Hat Subscription Manager has been successful. In this example, the Satellite 5 server has been given a Red Hat Subscription Management UUID of284e025c-4a60-4084-b49c-4cb26fd7cf93. - Disable all repositories.
# subscription-manager repos --disable '*'
- Enable only the following repositories.For Red Hat Enterprise Linux 6
# subscription-manager repos --enable rhel-6-server-rpms # subscription-manager repos --enable rhel-6-server-satellite-5.7-rpms
For Red Hat Enterprise Linux 5# subscription-manager repos --enable rhel-5-server-rpms # subscription-manager repos --enable rhel-5-server-satellite-5.7-rpms
- Reactivate the Satellite 5 instance.
Note
If this is the Managed DB host, skip this step.Therhn-satellite-activatecommand requires the certificate downloaded in Procedure 12.2, “ Removing the Satellite 5 Subscription from Red Hat Network ”. In this example, the certificate was saved in fileSatellite-57.cert.# rhn-satellite-activate -vvv --rhn-cert=Satellite-57.cert RHN_PARENT: satellite.rhn.redhat.com
When the Satellite Server is reactivated, you may see the following error message. This is expected, and can be safely ignored, because thesystemidfile is the Red Hat Network system ID. The system ID file is deleted when the host's registration is migrated to Red Hat Subscription Manager.ERROR: Server not registered? No systemid: /etc/sysconfig/rhn/systemid
- If Satellite is installed on Red Hat Enterprise Linux 6, optionally remove the packages which were previously used to communicate with Red Hat Network.
Warning
Do not remove the packages if Satellite is installed on Red Hat Enterprise Linux 5. Removing these packages from Red Hat Enterprise Linux 5 will result in the failure of Satellite.# yum remove yum-rhn-plugin rhn-check rhn-setup rhnsd

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.