Migrating existing clients to Red Hat Satellite 6
Hello all,
I am trying to migrate my existing RedHat Servers from Classic to Satellite.
I was able to get the Satellite server up and running and subscriptions attached etc.
However I am following this Red Hat Article https://access.redhat.com/solutions/1233443 to do the migration, however it is failing.
When I run the command 'rhn-migrate-classic-to-rhsm' I get this error message as follows:
'Could not read legacy system id at /etc/sysconfig/rhn/systemid'
I am using Satellite 6.2. When I navigate to /etc/sysconfig/rhn there is no file called systemid. I searched the entire hard disk and no file by that name.
Could anyone shed some light on this as to what is going wrong please.
any help would be greatly appreciated.
Regards,
Patrick
Responses
My first question would be, are you certain they are in fact registered through RHN classic?
Please check out the following to help you Determine if system is using RHN Classic or RHSM for updates
It is totally possible the systemid file is damaged or corrupt. While you can use rhn-migrate-classic-to-rhsm to migrate clients from Classic to Satellite 6.2, we strongly prefer that you use bootstrap.py (documented in Red Hat Satellite 6.2 Feature Overview: Importing Existing Hosts via the Bootstrap Script.
This would allow you many more options during the migration, include the option to just 'disable all the RHN components, ignore the busted systemid file and register the system to Satellite 6'
Example:
./bootstrap.py -l admin \
-s satellite.example.com \
-o "Red Hat" \
-L RDU \
-g "RHEL7/Crash" \
-a ak-Reg_To_Crash \
--skip prereq-update --skip migration
Note: bootstrap has a great deal of options, so check out the doc, and comment here if you need an additional assist.
You are correct. Bootstrap.py would need to be run on each system you own. It does support RHEL5 (when we wrote it, RHEL5 was in production phase 3, and Satellite 6 still supports it as a client). Now that RHEL5 is in the Extended Lifecycle Phase, you'll have to decide whether it makes sense to migrate them to Satellite 6. Even if you arent actively managing or patching the systems, there is some merit in moving them over. (Inventory primarily). If you choose to do it, they are supported on the platform. (No new errata is released for RHEL5 unless you have an ELS subscription)
Regarding the manifest, it is effectively a digitally signed document which contains
- a listing of subscriptions which you have designated for usage on premise in your Satellite.
- a listing of which repositories on the Content Delivery Network you are allowed to synchronize (which varies by the subscriptions you've purchased)
- Entitlement Certificates (X.509 certificates) which actually grant access to the content.
The manifest has a lot more data in it, but that is the most important. As Satellite can be used completely disconnected (as in no connection to the Internet), we need a means to say 'this is what content & subscriptions this Satellite is allowed to have, and here is how you access it). The manifest provides that.
The bootstrap script, by default wants to install the katello-agent package on the client as that is used by Satellite for a number of host management functions. It is expected that one of the repositories that the system uses provides it. Looking at your output I can see that the rhel-7-server-satellite-tools-6.2-rpms repo is not enabled. You can do one of the following:
- Enable the repo on your activation key so that when you register systems, the repo is enabled. Do this via Content->Activation Keys-> $YOUR_AK -> Product Content, and set the Satellite Tools to Enabled: yes
- Enable the repo when running bootstrap.py. Do this via the
--enablereposswitch, such as--enablerepos=rhel-7-server-satellite-tools-6.2-rpms - Omit installing the katello-agent. Do this via the
--skipswitch, such as--skip katello-agent
After that re-run the bootstrap script.
Hi Rich, Is there any way to write some Ansible playbook to migrate the existing host to SAT 6 from SAT 5?
Hello Patrick,
I'm not sure, it will works, but will try.
Run below command for enable repo,
subscription-manager repos --enable=rhel-*-satellite-tools-*-rpms
then try manually to install katello,
yum -y install katello-agent
Patrick,
It looks like you have a mismatch between your server version and release version. Your Line:
.../rhel/server/6/7.3/x86_64/...
If you look closely your server version is '6', but your $releasever is set as '7.3'. I'm not sure what caused this, but it can't find the repository because that specific combination (RHEL 6, version 7.3) doesn't exist and therefore it can't find the patches.
Fixing this is relatively simple:
# subscription-manager release --set=(releasever)
Where releasever is most likely '6Server' (case-sensitive).
To view all the available options for your system, enter the following:
# subscription-manager release --list
Please note that your /etc/yum.repos.d/redhat.repo file should contain two variables in the url like so:
baseurl = https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/6/$releasever/$basearch/rhn-tools/os
There are some cases where it is hard-coded to a specific release version (6Server or 7Server), but I don't believe that's the case here.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
