Documentation survey

クローンクライアントの登録のトラブルシューティング

SUSE Multi-Linux Managerを使用して仮想マシンを管理している場合は、仮想マシンのクローンを作成すると役立つ場合があります。 クローンとは、既存のディスクの正確なコピーであるプライマリディスクを使用する仮想マシンのことです。

仮想マシンのクローンを作成すると時間を大幅に節約できますが、ディスク上の識別情報が重複しているために問題が発生する可能性があります。

すでに登録されているクライアントがある場合は、そのクライアントのクローンを作成してから、クローンを登録しようとすると、おそらく、SUSE Multi-Linux Managerでそれらを2つの別々のクライアントとして登録する必要があります。 ただし、元のクライアントとクローンのマシンIDが同じ場合、SUSE Multi-Linux Managerは両方のクライアントを1つのシステムとして登録し、既存のクライアントデータはクローンのデータで上書きされます。

これは、SUSE Multi-Linux Managerが2つの別のクライアントとして認識できるように、クローンのマシンIDを変更することで解決できます。

このプロシージャの各ステップはクローンクライアントで実行されます。 このプロシージャではSUSE Multi-Linux Managerに登録されたままである、元のクライアントを操作しません。

プロシージャ: 複製されたSaltクライアントでの重複するマシンIDを解決する
  1. Initial System Configuration

  2. クローンマシンで、ホスト名とIPアドレスを変更します。 /etc/hostsに加えられた変更と正しいホストエントリが含まれていることを確認します。

  3. Resolving Duplicate Machine IDs

  4. 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

クローン作成されたマシンにも/var/log/journal/にフォルダが存在する場合、新しいマシンIDに合わせて名前を変更する必要があります。 名前が一致しない場合、journalctlはログを取得できず、podman logsは何も表示しません。

+

mv /var/log/journal/* /var/log/journal/$(cat /etc/machine-id)
  1. 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
  2. Fixing Kernel Entries on Red Hat Enterprise Linux 8.10

  3. If you are cloning a Red Hat Enterprise Linux 8.10 server that will later be liberated to SUSE Liberty Linux, you must perform extra steps to fix the kernel configuration files.

    Red Hat Enterprise Linux uses the machine ID to generate kernel entries in /boot/loader/entries. Not performing these steps will result in a mix of old and new kernel entries after the liberation, as SUSE Liberty Linux kernels will create new entries instead of replacing the old ones.

  4. After changing the machine ID and before liberating, run:

    sudo rm -rf /boot/loader/entries/
    sudo  for ver in $(rpm -q kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n'); do echo "Reinstalling kernel $ver..."; sudo kernel-install add $ver /lib/modules/$ver; done
    sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

    For more information and example on liberating Red Hat Enterprise Linux 8.10 server, see Liberate Red Hat Enterprise Linux 8.10 with secureboot.

  5. Reconfiguring Salt Clients

  6. クライアントがまだ同じSaltクライアントIDを持っている場合は、各クライアントのminion_idファイルを削除します(FQDNはクライアントの再起動時に再生成されるときに使用されます)。 Salt Minionクライアントの場合:

    rm /etc/salt/minion_id
    rm -rf /etc/salt/pki

    Salt Bundleクライアントの場合:

    rm /etc/venv-salt-minion/minion_id
    rm -rf /etc/venv-salt-minion/pki
  7. オンボーディングページから受諾されたキーを削除し、SUSE Multi-Linux Managerからシステムプロファイルを削除して、次のコマンドを使用してクライアントを再起動します。 Salt Minionクライアントの場合:

    service salt-minion restart

    Salt Bundleクライアントの場合:

    service venv-salt-minion restart
  8. クライアントを再登録します。各クライアントは異なる/etc/machine-idを持つようになり、[システムの概要]ページに正しく表示されるはずです。