Guestfish로 OpenStack Instance 수정
OpenStack Instance의 UUID를 확인 후 nova stop 한 다음 아래와 같이 진행
해당 UUID이 Instance에 있는 disk파일을 수정
[root@compute1]# guestfish --rw -a ./disk
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
[STEP 1]
> run
[STEP 2]
> list-filesystems
/dev/sda1: xfs
/dev/centos/root: xfs
/dev/centos/swap: swap
[STEP 3]
> mount /dev/sda1 /
[STEP 4]
> vi /etc/rc.local
libguestfs: error: download: /etc/rc.local: No such file or directory
* STEP 3에서 mount /dev/sda1 /는 root device가 아니기 때문에 해당하는 파일 확인할 수 없습니다.
[STEP 5]
> mount /dev/centos/root /
> ls /
.local
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
[STEP 6]
> vi /etc/rc.d/rc.local
> quit
[root@compute1#
* /etc/rc.local은 /etc/rc.d/rc.local의 link 정보이다.
* 원하는 내용을 수정 후 에 다시 저장한다.
* 이와 동일하게 boot device를 mount하여 grub파일을 수정해서 테스트 할 수 있다.
Guestfish로 OpenStack Instance 작업 종료 후 nova start로 해당 VM을 start한 다음
변경 여부 확인한다.
'Openstack' 카테고리의 다른 글
Host Reboot and virsh shutdown in OpenStack (0) | 2020.05.06 |
---|---|
OpenStack OverCommit for CPU/MEM (0) | 2020.05.04 |
OpenStack Quota Set --cores (0) | 2020.05.04 |
OpenStack CPU Pinning NUMA flavor (0) | 2020.03.11 |