인생은 다 그런거야

사랑과 배려, 그리고..,

당신을 진심으로 초대합니다.

카테고리 없음

QEMU에서 이미지 변환 방법

인생은 다 그런거야 2010. 1. 24. 21:54

 

The QCOW2 Image Format

 

 

QEMU가상화 소프트웨어 가운데 하나다. Fabrice Bellard가 만들었으며 x86 이외의 기종을 위해 만들어진 소프트웨어 스택 전체를 가상머신 위에서 실행할 수 있다는 특징이 있다. 동적 변환기(Portable dynamic translation)를 사용한다. 

 

간혹 QEMU를 사용하여 이미지를 가상화 하여 실행하다 보면 이미지를 필요로 할 경우에 변환하여 사용하고 싶을때가 있는데 이때 qemu-img의 이미지 변환 프로그램을 사용하면 된다. 가상 이미지 파일(VHD)을 다루는 WinMount의 프로그램을 이용하여 활용할 수도 있다.

 

 

 

 

The QCOW image format is one of the disk image formats supported by the QEMU processor emulator. It is a representation of a fixed size block device in a file. Benefits it offers over using raw dump representation include:

 

  1. Smaller file size, even on filesystems which don't support holes (i.e. sparse files)
  2. Copy-on-write support, where the image only represents changes made to an underlying disk image
  3. Snapshot support, where the image can contain multiple snapshots of the images history
  4. Optional zlib based compression
  5. Optional AES encryption

 

The qemu-img command is the most common way of manipulating these images e.g.

 

QEMU의 이미지 생성 유틸리티인 이미지 변환 프로그램(qemu-img)를 사용하여 test.qcow2의 qcow2 이미지 형식과 용량 크기는 4기가를 만드는 예제이다.

 

qemu-img create -f qcow2 test.qcow2 4G

Formating 'test.qcow2', fmt=qcow2, size=4194304 kB

 

 

새로 만들어진 test.qcow2의 이미지 형식을 test.img라는 새로운 이미지 형식으로 변환한다. 

qemu-img convert test.qcow2 -O raw test.img