Documentation survey

문제 해결 복제된 클라이언트 등록

SUSE Multi-Linux Manager를 사용하여 가상 머신을 관리하는 경우 VM의 클론을 생성하는 것이 유용할 수 있습니다. 클론은 기존 디스크의 복사본인 기본 디스크를 사용하는 VM입니다.

VM을 복제하면 시간을 크게 절약할 수 있지만, 디스크에 중복된 식별 정보가 있으면 문제가 발생할 수 있습니다.

이미 등록된 클라이언트가 있는 경우 해당 클라이언트의 클론을 생성한 후 클론을 등록하고, SUSE Multi-Linux Manager를 두 개의 개별 클라이언트로 등록하고자 할 수 있습니다. 그러나 원본 클라이언트와 클론의 머신 ID가 동일한 경우 SUSE Multi-Linux Manager는 두 클라이언트를 하나의 시스템으로 등록하고 기존 클라이언트 데이터를 클론의 데이터로 덮어씁니다.

이는 SUSE Multi-Linux Manager가 클론을 서로 다른 클라이언트 두 개로 인식하도록 클론의 머신 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 미니언 클라이언트의 경우는 다음과 같습니다.

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

    Salt 번들 클라이언트의 경우 다음과 같습니다.

    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 번들 클라이언트의 경우 다음과 같습니다.

    service venv-salt-minion restart
  8. 클라이언트를 다시 등록합니다. 이제 각 클라이언트는 서로 다른 /etc/machine-id를 가지며, 시스템 개요 페이지에 올바르게 표시되어야 합니다.