본문 바로가기
놀기/qemu

qcow2 / raw 간의 image 변환

by Hi~ 2022. 8. 10.

 

qemu-img 설치

$ sudo apt install qemu-img

 

qcow2 → raw 변환

$ qemu-img convert -f qcow2 -O raw image.qcow2 image.img

 

raw → qcow2 변환

$ qemu-img convert -f raw -O qcow2 image.img image.qcow2

 

raw / qcow2 파일 정보 (image partition 구성에 따라 다를 수 있음)

$ file image.qcow2
image.qcow2: QEMU QCOW2 Image (v3), 17179869184 bytes
$ file image.img
image.img: DOS/MBR boot sector; partition 1 : ID=0x83, active, start-CHS (0x0,32,33), end-CHS (0x1f,26,59), startsector 2048, 497664 sectors; partition 2 : ID=0x83, start-CHS (0x1f,26,60), end-CHS (0x3ff,254,63), startsector 499712, 31537152 sectors; partition 3 : ID=0x5, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 32038910, 1513474 sectors

댓글