Xen to KVM 서버 이미지 변환 점검(Linux)

Prev Next

VPC 환경에서 이용 가능합니다.

Xen에서 KVM으로 서버 이미지 변환 중 오류가 발생했을 때 원본 서버 OS의 변환 적합성을 확인하는 방법과 결과에 따른 조치 방법을 안내합니다.

참고
  • 변환을 위한 Xen 서버 이미지를 생성 전 원본 서버를 검증해 주십시오.
  • Xen 가상 머신(VM) 변환의 유효성을 점검하려면 점검 스크립트를 먼저 설치해야 합니다.
  • 이 기능은 Xen 환경에서 Rocky Linux 8.10 및 Ubuntu 20.04 운영 체제만 지원됩니다.

VM을 점검하기 전에 실행해야 하는 사항은 다음과 같습니다.

OS별 주요 파일의 존재 여부를 확인하고 파일이 수정 가능한 상태인지 확인해 주십시오.

#  Rocky8.10
'/etc/yum.repos.d/Rocky-BaseOS.repo' '/etc/rc.d/rc.local' '/etc/default/grub' '/etc/sysconfig/network-scripts/ifcfg-eth0' '/etc/udev/rules.d' '/etc/fstab /etc/resolv.conf'
Plain text
# Ubuntu20.04
'/etc/apt/sources.list' '/etc/rc.local' '/etc/default/grub' '/etc/network/interfaces' '/etc/udev/rules.d' '/etc/fstab'
Plain text
  1. Repo URL인 http://repo.gov-ncloud.com/를 바라보는지 확인해 주십시오.
  2. VM 내부에 1MB 이상의 공간이 남아있는지 확인해 주십시오.
  3. /etc/fstab에 오류가 있는지 확인해 주십시오.

변환 대상 서버에서 점검 스크립트 x2k_validate를 다운로드해 주십시오.

주의

점검 스크립트는 변환 지원이 가능한 OS에서만 동작합니다.

  • 변환 지원 가능 OS: Rocky8.10, Ubuntu20.04
# root 계정이 아닌 경우 sudo로 진행
# wget http://init.gov-ncloud.com/server/linux/x2k-migration/x2k_validate
# chmod +x x2k_validate
Plain text

스크립트를 실행하여 원본 서버 OS의 변환 적합성을 점검한 결과에 따른 조치 방법을 안내합니다.

유효성 검증 결과가 정상(SUCCESS)으로 확인되면 점검 결과 문제가 없는 상태입니다.

  root@s1950d11189a:~# ./x2k_validate

  Fri 11 Apr 2025 05:10:33 PM KST
  Execute ./x2k_validate - start
  x2k convert for ubuntu 20.04 : v1.0.0-2025041102

  [OK] checkExistFile : /etc/apt/sources.list exists
  [OK] checkImmutable : /etc/apt/sources.list mutable
  [OK] checkExistFile : /etc/rc.local exists
  [OK] checkImmutable : /etc/rc.local mutable
  [OK] checkExistFile : /etc/default/grub xists
  [OK] checkImmutable : /etc/default/grub mutable
  [OK] checkExistFile : /etc/network/interfaces exists
  [OK] checkImmutable : /etc/network/interfaces mutable
  [OK] checkExistFile : /etc/udev/rules.d exists
  [OK] checkImmutable : /etc/udev/rules.d mutable
  [OK] checkExistFile : /etc/fstab exists
  [OK] checkImmutable : /etc/fstab mutable
  [OK] checkRepo : the repo url valid
  [OK] checkSpace : enough disk space
  [OK] checkFstab : fstab is valid

  Execute ./x2k_validate - end
  SUCCESS
Plain text

유효성 검증 결과 문제가 있을 경우, 문제별 결과 확인 및 조치 방법을 다음과 같습니다.

  1. checkRoot: Root user로 스크립트가 수행될 수 있도록 합니다.

    • FAIL 로그
      [FAIL] checkRoot : this script must be run as root or with 'sudo'
      
      Plain text
    • 작업 방법
      ncloud@s1950d11189a:~$ sudo ./x2k_validate
      
      Plain text
  2. SupportOS: 지원하는 OS 및 버전인지 확인해 주십시오.

    • FAIL 로그
      [FAIL] supportOS : unsupported OS Version
      
      Plain text
    • 실행 방법
      root@s1950d11189a:~# cat /etc/os-release
      
      Plain text
  3. checkExistFile: 설정 파일이 존재하는지 확인해 주십시오.

    • FAIL 로그
      [FAIL] checkExistFile : /etc/apt/sources.list does not exist
      
      Plain text
    • 확인 방법
      root@s1950d11189a:~# ls /etc/apt/sources.list
      ls: cannot access '/etc/apt/sources.list': No such file or directory
      
      Plain text
    • 조치 방법
      • base 이미지와 동일한 파일을 생성해 주십시오.
  4. checkRepo: 디폴트 레포 주소가 내부를 바라보는지 확인해 주십시오.

    • FAIL 로그
      [FAIL] checkRepo : /etc/apt/sources.list some repo urls are not valid
      
      Plain text
    • 확인 방법
      root@s1950d11189a:~# grep -v '^$\|^#' /etc/apt/sources.list |grep 'main restricted'
      deb http://repo.gov-ncloud.com/ubuntu focal main restricted
      deb http://repo.gov-ncloud.com/ubuntu focal-updates main restricted
      deb http://repo.gov-ncloud.com/ubuntu focal-backports main restricted universe multiverse
      deb http://repo.gov-ncloud.com/ubuntu focal-security main restricted
      
      Plain text
    • 조치 방법
      • source file을 열어 디폴트 레포 주소가 내부를 바라볼 수 있도록 수정해 주십시오.
      root@s1950d11189a:~# grep -v '^$\|^#' /etc/apt/sources.list |grep 'main restricted'
      deb http://repo.gov-ncloud.com/ubuntu focal main restricted
      deb http://repo.gov-ncloud.com/ubuntu focal-updates main restricted
      deb http://repo.gov-ncloud.com/ubuntu focal-backports main restricted universe multiverse
      deb http://repo.gov-ncloud.com/ubuntu focal-security main restricted
      
      Plain text
  5. checkSpace: 루트 파일 시스템에 1MB 이상의 용량이 남았는지 확인해 주십시오.

    • FAIL 로그
      [FAIL] checkSpace : not enough disk space
      
      Plain text
    • 확인 방법
      root@s1950d11189a:~# df |grep '/$'
      /dev/vda2       10215700 2688948   6986236  28% /
      
      Plain text
    • 조치 방법
      • 루트 파일 시스템의 용량이 1MB 이상이 될 수 있도록 불필요한 파일을 삭제해 주십시오.
  6. checkFstab: fstab 설정 파일 내에 추가 디스크를 제외하고 / 또는 /boot 의 정상 여부를 확인해 주십시오.

    • FAIL 로그
      [FAIL] checkFstab : fstab is not valid
      
      Plain text
    • 확인 방법
      • fstab 설정 파일 내에 추가 디스크를 제외하고 / 또는 /boot 의 정상 여부를 확인해 주십시오.
      root@s1950d11189a:~# findmnt --verify
      findmnt: /etc/fstab: parse error at line 10 -- ignored
      
      1 parse error, 0 errors, 0 warnings
      
      Plain text
    • 조치 방법
      • /etc/fstab를 수정하여 findmnt --verify 커맨드 수행 시 / 또는 /boot에 error가 없도록 해주십시오.
      root@s1950d11189a:~# findmnt --verify
      Success, no errors or warnings detected
      
      Plain text