1rhn-migrate-classic-to-rhsm(8) Migration Tool rhn-migrate-classic-to-rhsm(8)
2
3
4
6 rhn-migrate-classic-to-rhsm - Migrates a system profile from Red Hat
7 Network Classic Hosted to Customer Portal Subscription Management
8 (hosted) or Subscription Asset Manager (on-premise).
9
10
12 rhn-migrate-classic-to-rhsm [--force] | [--no-auto] [--keep] | [--ser‐
13 vicelevel=SERVICE_LEVEL] | [--remove-rhn-packages] | [--destination-
14 url=URL] | [--legacy-user=LEGACY_USER] | [--legacy-pass‐
15 word=LEGACY_PASSWORD] | [--destination-user=DESTINATION_USER] | [--des‐
16 tination-password=DESTINATION_PASSWORD] | [--org=ORG] | [--environ‐
17 ment=ENVIRONMENT] | [--no-proxy] [--activation-key=ACTIVATION_KEY] |
18 [--help]
19
20
22 rhn-migrate-classic-to-rhsm migrates a system profile which is regis‐
23 tered with Red Hat Network Classic to Customer Portal Subscription Man‐
24 agement. This is intended for migrating from the host service, not for
25 migrating from a Satellite system.
26
27
28 This script migrates configuration, from a channel-based subscription
29 framework to a certificate-based subscription framework. While the rhn-
30 migrate-classic-to-rhsm script performs the migration operation, the
31 data used to map the channels to the corresponding product certificates
32 is defined in the subscription-manager-migration-data package. The sub‐
33 scription-manager-migration-data package must be installed before the
34 rhn-migrate-classic-to-rhsm script can be run successfully.
35
36
38 Access to support and updates for products is determined through sub‐
39 scriptions. Subscriptions are attached to a system, which means that
40 the system has the right to install and update a product with full sup‐
41 port. Subscriptions for an entire account are tracked through a sub‐
42 scription management service.
43
44
45 With the channel-based framework, a subscription management service was
46 either an on-premise Satellite or hosted Red Hat Network Classic. With
47 the new certificate-based subscriptions, the subscription management
48 service is either Customer Portal Subscription Management or Subscrip‐
49 tion Asset Manager. The differences between the two types of subscrip‐
50 tion management services are described in this Knowledgebase article:
51 <https://access.redhat.com/knowledge/articles/63269>
52
53
54 The system registers with the subscription management service and
55 receives an inventory ID number. When subscriptions are attached to a
56 system, that association is noted in the subscription management ser‐
57 vice.
58
59
60 Registering with a subscription management service is exclusive. If a
61 system is registered with Red Hat Network Classic, it cannot simultane‐
62 ously be registered with Customer Portal Subscription Management. The
63 rhn-migrate-classic-to-rhsm tool is provided specifically so that there
64 is a way to transition from the deprecated Red Hat Network Classic to
65 Customer Portal Subscription Management or an on-premise Subscription
66 Asset Manager.
67
68
70 -h, --help
71 Prints the specific help information for the given command.
72
73
74 -f, --force
75 Ignore channels not available through Customer Portal Subscrip‐
76 tion Management (or Subscription Asset Manager). The channels in
77 Red Hat Network Classic are mapped to the product certificates
78 used by the Customer Portal Subscription Management. However,
79 not every channel has a certificate mapping, which can cause
80 errors during migration. Using this option skips any channels
81 which are not mapped to Customer Portal Subscription Management.
82
83
84 -n, --no-auto
85 Deletes the system from Red Hat Network Classic and registers it
86 to Customer Portal Subscription Management, but does not attach
87 any subscriptions to the system.
88
89
90 -s SERVICE_LEVEL, --servicelevel=SERVICE_LEVEL
91 Sets a preferred service level for the system, such as premium
92 or standard. This service-level preference is then used as one
93 of the criteria for auto-attaching subscriptions to the system.
94
95
96 --remove-rhn-packages
97 After unregistering from Red Hat Network Classic, remove legacy
98 packages: osad, rhn-check, rhn-client-tools, rhncfg, rhncfg-
99 actions, rhncfg-client, rhncfg-management, rhn-setup, rhnpush,
100 rhnsd, spacewalk-abrt, spacewalk-oscap, yum-rhn-plugin. Once
101 unregistered from Red Hat Network Classic, they are no longer
102 needed. Once packages are removed, subsequent attempts to
103 migrate will be blocked with a message indicating "Perhaps this
104 script was already executed with --remove-rhn-packages?".
105 --remove-rhn-packages cannot be used with --keep, since it does
106 not make sense to keep a system registered without the tooling.
107
108
109 --org=ORG
110 Sets the organization within the account structure to which to
111 register the system. Every account is divided into subgroups
112 called organizations, which represent some kind of organiza‐
113 tional or logical division in the infrastructure. Organizations
114 are further divided into environments, which organize content
115 streams.
116
117
118 --environment=ENVIRONMENT
119 Sets which environment within the organization the system
120 belongs to. Every account is divided into subgroups called orga‐
121 nizations, which are further divided into environments Environ‐
122 ments define different content streams.
123
124
125 --activation-key=ACTIVATION_KEY
126 Sets an activation key to use during registration to the sub‐
127 scription management service. Use of an activation key requires
128 the user to supply the organization that the system will be reg‐
129 istered to. This option may be supplied multiple times.
130
131
132 --keep Leaves the system profile on the legacy system. Normally the
133 system profile on the legacy system is deleted.
134
135
136 --no-proxy
137 Disables or ignores any previous RHN proxy settings when migrat‐
138 ing to the new subscription management service.
139
140
141 --legacy-user=LEGACY_USER
142 Specifies the user name on the legacy server.
143
144
145 --legacy-password=LEGACY_PASSWORD
146 Specifies the password for the user on the legacy server.
147
148
149 --destination-url=URL
150 Specifies the URL of the subscription management service to
151 which to register the system. This is used for environments
152 which have an on-premise subscription management service such as
153 Subscription Asset Manager. If no URL is given, the migration
154 tool uses the Customer Portal Subscription Management Service.
155
156
157 --destination-user=DESTINATION_USER
158 Specifies the user name on the destination server.
159
160
161 --destination-password=DESTINATION_PASSWORD
162 Specifies the password for the user on the destination server.
163
164
166 The migration process moves the system from the inventory in one sub‐
167 scription management service (Red Hat Network Classic) to the new sub‐
168 scription management service (Customer Portal Subscription Management),
169 and then re-applies the subscriptions to the system. The script runs
170 through these steps:
171
172
173 1. Authenticate to both Red Hat Network Classic and Customer
174 Portal Subscription Management to verify the account settings.
175
176
177 2. Get a channel list for the system.
178
179
180 3. Match each channel to a corresponding certificate map.
181
182
183 4. Copy over the product certificates for the old channels.
184
185
186 5. Unregister from Red Hat Network Classic.
187
188
189 6. Stop and disable legacy services: osad, rhnsd.
190
191
192 7. Register with Customer Portal Subscription Management and
193 auto-attach the best-matched subscriptions.
194
195
196 After migration, the system facts maintained by Subscription Manager
197 display what script was used for migration and what the previous system
198 ID was.
199 [root@server ~]# subscription-manager facts --list | grep migr
200 migration.classic_system_id: 09876
201 migration.migrated_from: rhn_hosted_classic
202 migration.migration_date: 2012-09-14T14:55:29.280519
203
204
205
206 MIGRATION AND AUTOSUBSCRIBE
207 The rhn-migrate-classic-to-rhsm tool, by default, auto-attaches the
208 best-matching subscriptions to the system. This allows migrations to be
209 automated.
210 [root@server ~]# rhn-migrate-classic-to-rhsm
211 Legacy username: jsmith@rhn.example.com
212 Legacy password:
213
214 Retrieving existing legacy subscription information...
215
216 +-----------------------------------------------------+
217 System is currently subscribed to these legacy channels:
218 +-----------------------------------------------------+
219 rhel-x86_64-server-6
220
221 +-----------------------------------------------------+
222 Installing product certificates for these legacy channels:
223 +-----------------------------------------------------+
224 rhel-x86_64-server-6
225
226 Product certificates installed successfully to /etc/pki/product.
227
228 Preparing to unregister system from legacy server...
229 System successfully unregistered from legacy server.
230
231 Attempting to register system to destination server...
232 The system has been registered with ID: e6876d95-3564-4506-a44e-cb0c1b651434
233
234 Installed Product Current Status:
235 Product Name: Red Hat Enterprise Linux Server
236 Status: Subscribed
237
238 System 'jsmith.rhn.example.com' successfully registered.
239
240
241 The script prompts for a username and password to use to register the
242 system; this same account is used to authenticate with both Red Hat
243 Network Classic and Customer Portal Subscription Management.
244
245
246 Optionally, the --servicelevel argument sets an SLA preference to use
247 with the system. The SLA associated with a subscription is then evalu‐
248 ated when determining what subscriptions to auto-attach to the system,
249 along with other factors like installed products, existing channel
250 assignments, and architecture.
251
252 [root@server ~]# rhn-migrate-classic-to-rhsm --servicelevel=premium
253 Legacy username: jsmith@rhn.example.com
254 Legacy password:
255
256
257 MIGRATION TO ON-PREMISE SERVICES
258 The rhn-migrate-classic-to-rhsm tool migrates the system to Customer
259 Portal Subscription Management (hosted) services by default. This uses
260 the default configuration for Subscription Manager, which points to the
261 subscription management services for the Customer Portal. For infra‐
262 structures which have an on-premise subscription management service
263 such as Subscription Asset Manager, this configuration can be changed
264 so that the migration process registers the systems to the on-premise
265 subscription management service and attaches the appropriate subscrip‐
266 tions.
267
268
269 This is done by using the --destination-url option, which specifies the
270 URL of the on-premise service. In this case, the authorization creden‐
271 tials must also be given for the on-premise subscription management
272 service account (which is independent of the RHN classic account).
273
274 [root@server ~]# rhn-migrate-classic-to-rhsm --destination-url=sam.example.com
275 Legacy username: jsmith@rhn.example.com
276 Legacy password:
277 Destination username: jsmith@sam.example.com
278 Destination password:
279
280
282 /etc/sysconfig/rhn/systemid
283 The digital server ID for this machine if the system has been
284 registered with Red Hat Network Classic. This file does not
285 exist otherwise.
286
287
288 /etc/sysconfig/rhn/up2date
289 The common configuration file used by RHN client programs.
290
291
292 /var/log/rhsm/rhsm.log
293 The Subscription Manager log file. This contains any errors reg‐
294 istering the system to Customer Portal Subscription Management
295 or with attaching subscriptions to the system.
296
297
298 subscription-manager-migration-data.rpm
299 The package which contains the mappings for the migration script
300 to migrate channels to the appropriate product certificates.
301
302
304 install-num-migrate-to-rhsm(8), subscription-manager(8).
305
306
307
309 Deon Lackey <dlackey@redhat.com>, Paresh Mutha <pmutha@redhat.com>,
310 Mark Huth <mhuth@redhat.com>, Tasos Papaioannou <tpapaioa@redhat.com>
311
312
314 This script is part of the Red Hat Subscription Manager tool. Report
315 bugs to <http://bugzilla.redhat.com>, using the Red Hat Enterprise
316 Linux product and the subscription-manager component.
317
318
320 Copyright © 2012 Red Hat, Inc.
321
322
323 This is free software; see the source for copying conditions. There is
324 NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
325 PURPOSE.
326
327
328
329 rhn-migrate-classic-to-rhsm(8)