문서의 이전 판입니다!
RHEL7 kvm qcow 이미지 설정
- rhel7 kvm image download
qcow 이미지 다운로드 : https://access.redhat.com/solutions/894123
- qcow 이미지 편집을 위한 패키지 설치
# yum -y install libguestfs-tools ## 이미 실행중인 kvm 이미지를 편집하기 위해서는 아래 패키지도 설치 해야 한다. # yum -y install guestfish
- qcow 이미지 설정 하기
1. root 패스워드 변경하기
# 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
2. 설정 파일 변경하기
<WRAP>
<code bash>
# guestfish --rw -a rhel-server-7.9-x86_64-kvm.qcow2
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: ‘help’ for help on commands
‘man’ to read the manual
‘quit’ to quit the shell
><fs> run
><fs> list-filesystems
/dev/sda1: xfs
><fs> mount /dev/sda1 /
><fs> vi /etc/sysconfig/selinux
><fs> sh 'rm -f /etc/localtime'
><fs> sh 'ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime'
><fs> umount /
><fs> exit
</WRAP>