Proxmox VE: 복제된 VM을 활용하여 복구하기
node1을 강제로 shutdown시켜 node2에서 복제된 VM을 실행시켜보겠습니다. Proxmox VM document의 절차를 따라 복구 테스트를 진행했습니다.
- VM의 환경설정 파일은
/etc/pve/nodes/node*/qemu-server/
디렉토리에 저장되어 있습니다. node1과 node2의 환경설정 파일을 확인해 보겠습니다.root@node1:~# ls -al /etc/pve/nodes/node*/qemu-server/* -rw-r----- 1 root www-data 429 Feb 10 11:11 /etc/pve/nodes/node1/qemu-server/100.conf
root@node2:~# ls -al /etc/pve/nodes/node*/qemu-server/* -rw-r----- 1 root www-data 429 Feb 10 11:11 /etc/pve/nodes/node1/qemu-server/100.conf
- node1을 poweroff 명령어로 강제 종료시키겠습니다. node1의 Web console을 사용할 수 없기 때문에 node2의 Web console로 접속합니다.
pvecm status
명령어로 클러스터의 상태를 확인한 후,pvecm expected 1
명령어로 Proxmox VE 클러스터에서 정족(quorum) 요구 노드 수를 일시적으로 “1”로 변경합니다.root@node2:/etc/pve/nodes# pvecm status Cluster information ------------------- Name: kvmcluster Config Version: 2 Transport: knet Secure auth: on Quorum information ------------------ Date: Mon Feb 10 14:36:02 2025 Quorum provider: corosync_votequorum Nodes: 1 Node ID: 0x00000002 Ring ID: 2.d Quorate: No Votequorum information ---------------------- Expected votes: 2 Highest expected: 2 Total votes: 1 Quorum: 2 Activity blocked Flags: Membership information ---------------------- Nodeid Votes Name 0x00000002 1 192.168.100.142 (local) root@node2:/etc/pve/nodes# pvecm expected 1 root@node2:/etc/pve/nodes# pvecm status Cluster information ------------------- Name: kvmcluster Config Version: 2 Transport: knet Secure auth: on Quorum information ------------------ Date: Mon Feb 10 14:36:31 2025 Quorum provider: corosync_votequorum Nodes: 1 Node ID: 0x00000002 Ring ID: 2.d Quorate: Yes Votequorum information ---------------------- Expected votes: 1 Highest expected: 1 Total votes: 1 Quorum: 1 Flags: Quorate Membership information ---------------------- Nodeid Votes Name 0x00000002 1 192.168.100.142 (local)
- node2를 ssh로 접속하여 node1의 VM:100 환경설정 파일을 node2로 이동시켜야 합니다.
root@node2:/etc/pve/nodes# mv /etc/pve/nodes/node1/qemu-server/100.conf /etc/pve/nodes/node2/qemu-server/100.conf
qm start
명령어로 VM:100을 시작합니다.root@node2:/etc/pve/nodes# qm start 100
- node2의 웹 콘솔에서 VM:100이 정상적으로 작동하는 것을 확인할 수 있습니다.