1. qemu -net nic,vlan=0,macaddr=00:FF:5F:E3:8F:8A,model=e1000 -net tap,vlan=0,ifname=virt38F8A,script=/etc/qemu-ifup -monitor unix:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.monitor,server,nowait -serial file:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.serial -vnc unix:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.vnc -usb -k en-us -name 38F8A -pidfile /VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.pid -daemonize -smp 4 -m 4096 -drive file=/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/218.236.115.207_vm38F8A.qcow2,if=ide,index=0,media=disk,boot=on -boot c
2. qemu -net nic,vlan=0,macaddr=00:FF:5F:E3:8F:8A,model=e1000 -net tap,vlan=0,ifname=virt38F8A,script=/etc/qemu-ifup -monitor unix:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.monitor,server,nowait -serial file:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.serial -vnc unix:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.vnc -usb -k en-us -name 38F8A -pidfile /VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.pid -daemonize -smp 4 -m 4096 -drive file=/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/2009-02-13-14-59.qcow2,if=ide,index=0,media=disk,boot=on -boot c
3. qemu-img commit -f qcow2 2009-02-13-14-43.qcow2
4. kill -9 `ps axu|grep qemu|awk -F " " {'print $2'}`
# 이미지 축소 복사
qemu-img convert -c 원본 이미지 -O qcow2 백업 이미지
# 증분 백업
qemu-img create -b 218.236.115.207_vm38F8A.qcow2 -f qcow2 test.qcow2
1. 원본을 create 를 이용해서 백업용 이미지 생성
2. 원본을 수정후 commit
3. 원본 복구
# 복사본을 테스트 마다 새로 생성
원본서버(on)commit 원본서버(off)commit 가상서버(on)commit 가상서버(off)commit
원본 서버 원본데이터복사 이상없음
가상서버 변화 없음 원본데이터복사
# 복사본을 2개 만들경우
commit(우선)
test(변경전) 원본복구안됨(test 이미지도 삭제 이미지로 변경됨)
test2(변경후(데이터 삭제))
==================================
# 복사본을 만들때 원본 데이터 수정후 가상서버 정지!
monitor
socat - UNIX-CONNECT:/VM_DISK_IMG/HDs/218.236.115.207_vm38F8A/vnc/vm38F8A.monitor
#!/bin/sh
a=1
while :
do
b=`expr $a \+ 1`
mkdir -p /home/test$b
if [ $a == 10 ]; then
exit
fi
a=${b}
done
댓글 없음:
댓글 쓰기