5.4.3. 사용자 이미지 설치
사용자 이미지를 구성한 다음 이미지를 이미지 서비스(glance)에 업로드합니다.
사전 요구 사항
- 베어 메탈 프로비저닝 서비스가 포함된 성공적인 오버클라우드 배포. 자세한 내용은 3장. 베어 메탈 프로비저닝 서비스를 사용하여 IPv4 오버클라우드 배포 또는 4장. 베어 메탈 프로비저닝 서비스를 사용하여 IPv6 오버클라우드 배포 을 참조하십시오.
절차
- 고객 포털에서 Red Hat Enterprise Linux KVM 게스트 이미지를 다운로드합니다.
다운로드한 이미지로
DIB_LOCAL_IMAGE를 정의합니다.$ export DIB_LOCAL_IMAGE=rhel-8.0-x86_64-kvm.qcow2등록 정보를 설정합니다. Red Hat 고객 포털을 사용하는 경우 다음 정보를 구성해야 합니다.
$ export REG_USER='USER_NAME' $ export REG_PASSWORD='PASSWORD' $ export REG_AUTO_ATTACH=true $ export REG_METHOD=portal $ export https_proxy='IP_address:port' (if applicable) $ export http_proxy='IP_address:port' (if applicable)Red Hat Satellite를 사용하는 경우 다음 정보를 구성해야 합니다.
$ export REG_USER='USER_NAME' $ export REG_PASSWORD='PASSWORD' $ export REG_SAT_URL='<SATELLITE URL>' $ export REG_ORG='<SATELLITE ORG>' $ export REG_ENV='<SATELLITE ENV>' $ export REG_METHOD=<METHOD>오프라인 리포지토리가 있는 경우 DIB_YUM_REPO_CONF를 로컬 리포지토리 구성으로 정의할 수 있습니다.
$ export DIB_YUM_REPO_CONF=<path-to-local-repository-config-file>diskimage-builder도구를 사용하여 사용자 이미지를 생성합니다.$ disk-image-create rhel8 baremetal -o rhel-image이 명령은 커널을
rhel-image.vmlinuz로 추출하고 초기 램디스크를rhel-image.initrd로 추출합니다.이미지를 이미지 서비스에 업로드합니다.
$ KERNEL_ID=$(openstack image create \ --file rhel-image.vmlinuz --public \ --container-format aki --disk-format aki \ -f value -c id rhel-image.vmlinuz) $ RAMDISK_ID=$(openstack image create \ --file rhel-image.initrd --public \ --container-format ari --disk-format ari \ -f value -c id rhel-image.initrd) $ openstack image create \ --file rhel-image.qcow2 --public \ --container-format bare \ --disk-format qcow2 \ --property kernel_id=$KERNEL_ID \ --property ramdisk_id=$RAMDISK_ID \ rhel-image