Troubleshooting Registering Cloned Clients
If you are using SUSE Manager to manage virtual machines, you might find it useful to create clones of your VMs. A clone is a VM that uses a primary disk that is an exact copy of an existing disk.
While cloning VMs can save you a lot of time, the duplicated identifying information on the disk can sometimes cause problems.
If you have a client that is already registered, you create a clone of that client, and then try and register the clone, you probably want SUSE Manager to register them as two separate clients. However, if the machine ID in both the original client and the clone is the same, SUSE Manager registers both clients as one system, and the existing client data is overwritten with that of the clone.
This can be resolved by changing the machine ID of the clone, so that SUSE Manager recognizes them as two different clients.
Each step of this procedure is performed on the cloned client. This procedure does not manipulate the original client, which remains registered to SUSE Manager. |
-
On the cloned machine, change the hostname and IP addresses. Make sure
/etc/hosts
contains the changes you made and the correct host entries. -
For distributions that support systemd: If your machines have the same machine ID, as root, delete the files on each duplicated client and re-create it:
rm /etc/machine-id rm /var/lib/dbus/machine-id rm /var/lib/zypp/AnonymousUniqueId dbus-uuidgen --ensure systemd-machine-id-setup
-
For distributions that do not support systemd: As root, generate a machine ID from dbus:
rm /var/lib/dbus/machine-id rm /var/lib/zypp/AnonymousUniqueId dbus-uuidgen --ensure
-
If your clients still have the same Salt client ID, delete the
minion_id
file on each client (FQDN is used when it is regenerated on client restart). For Salt Minion clients:rm /etc/salt/minion_id rm -rf /etc/salt/pki
For Salt Bundle clients:
rm /etc/venv-salt-minion/minion_id rm -rf /etc/venv-salt-minion/pki
-
Delete accepted keys from the onboarding page and the system profile from SUSE Manager, and restart the client with:
service salt-minion restart
-
Re-register the clients. Each client now has a different
/etc/machine-id
and should be correctly displayed on theSystem Overview
page.
-
On the cloned machine, change the hostname and IP addresses. Make sure
/etc/hosts
contains the changes you made and the correct host entries. -
Stop the
rhnsd
daemon, on Red Hat Enterprise Linux Server 6 and SUSE Linux Enterprise 11 with:/etc/init.d/rhnsd stop
or, on newer systemd-based systems, with:
service rhnsd stop
-
Stop
osad
with:/etc/init.d/osad stop
or:
service osad stop
or:
rcosad stop
-
Remove the
osad
authentication configuration file and the system ID:rm -f /etc/sysconfig/rhn/{osad-auth.conf,systemid}
-
Delete the files containing the machine IDs:
-
SLES 12:
rm /etc/machine-id rm /var/lib/dbus/machine-id dbus-uuidgen --ensure systemd-machine-id-setup
-
SLES 11:
suse_register -E
-
-
Remove the credential files:
-
SLES clients:
rm -f /etc/zypp/credentials.d/{SCCcredentials,NCCcredentials}
-
Red Hat Enterprise Linux clients:
rm -f /etc/NCCcredentials
-
-
Re-run the bootstrap script. You should now see the cloned system in SUSE Manager without overriding the system it was cloned from.