How to distinguish between virtual disk image formats?

Posted by Jakub Žitný on Server Fault See other posts from Server Fault or by Jakub Žitný
Published on 2012-12-09T15:58:35Z Indexed on 2012/12/09 17:05 UTC
Read the original article Hit count: 353

Filed under:
|
|
|
|

There is huge number of different formats for virtual storage files for desktop and server purposes (vmdk, qcow2, vdi, vdk, etc.). I'm writing a little script for manipulating them and would like the script to be able to distinguish between them.

Of course, it can be done via extension, but I want this to be more reliable. I tried commands file or qemu-img, but the results are not quite clear. Any idea improving my methods?

© Server Fault or respective owner

Related posts about virtualization

Related posts about images