문서의 이전 판입니다!
해당 문서는 KVM 에 배포할 redhat qcow guest image 생성하는 방법을 작성한 문서 입니다.
Red Hat Enterprise Linux KVM Guest Images 다운로드
# 참고 url : https://access.redhat.com/solutions/894123
KVM Guest Images 편집
패키지 설치 및 서비스 구동
# yum -y install libguestfs-tools # yum -y install guestfish # systemctl start libvirtd
guest image 편집
root 패스워드 변경
## rhel-server-7.9-x86_64-kvm.qcow2 이미지 있는 경로로 이동 후 작업 # virt-customize -a rhel-server-7.9-x86_64-kvm.qcow2 --root-password password:<패스워드 입력> [ 0.0] Examining the guest ... [ 5.3] Setting a random seed [ 5.4] Setting the machine ID in /etc/machine-id [ 5.4] Setting passwords [ 7.0] Finishing off
필요한 패키지 설치 방법
# virt-customize -a rhel-server-7.9-x86_64-kvm.qcow2 --install httpd,vim
기타 리눅스 설정 파일 수정 방법
## timezone 변경 방법 # virt-customize -a rhel-server-7.9-x86_64-kvm.qcow2 --run-command "rm -rf /etc/localtime" # virt-customize -a rhel-server-7.9-x86_64-kvm.qcow2 --run-command "ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime" ## repository 추가 방법 # virt-customize -a rhel-server-7.9-x86_64-kvm.qcow2 --copy-in [로컬파일]:[넣을 경로]