디스크 이미지 파일 형식을 결정하는 방법: VMDK, VHD 또는 원시 파일 형식?

디스크 이미지 파일 형식을 결정하는 방법: VMDK, VHD 또는 원시 파일 형식?

디스크 이미지 파일의 형식을 결정할 수 있는 쉘 명령이 있습니까? 디스크 이미지 파일이 vmdk, vhd of raw 파일 형식 중 무엇인지 확인하고 싶습니다.

답변1

명령을 사용하여 가상 디스크 이미지의 형식을 결정할 수 있습니다 qemu-img info. 예를 들어:

# qemu-img info amzn2-kvm-2017.12.0.20171212.2-x86_64.xfs.gpt.qcow2 
image: amzn2-kvm-2017.12.0.20171212.2-x86_64.xfs.gpt.qcow2
file format: qcow2
virtual size: 25 GiB (26843545600 bytes)
disk size: 1.61 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false

qemu-img -h특정 버전에 지원되는 형식을 보려면 사용하세요 . 출력이 끝날 무렵에 나타납니다. 예를 들어:

Supported formats: blkdebug blklogwrites blkverify bochs cloop compress copy-on-read dmg file ftp ftps gluster host_cdrom host_device http https iscsi iser luks nbd nfs null-aio null-co nvme parallels qcow qcow2 qed quorum raw rbd replication ssh throttle vdi vhdx vmdk vpc vvfat

관련 정보