1835f6802SDirk Vogt 2835f6802SDirk Vogt#------------------------------------------------------------------------------ 3*0a6a1f1dSLionel Sambuc# $File: virtual,v 1.6 2014/05/07 21:25:41 christos Exp $ 4835f6802SDirk Vogt# From: James Nobis <quel@quelrod.net> 5835f6802SDirk Vogt# Microsoft hard disk images for: 6835f6802SDirk Vogt# Virtual Server 7835f6802SDirk Vogt# Virtual PC 8835f6802SDirk Vogt# http://technet.microsoft.com/en-us/virtualserver/bb676673.aspx 9835f6802SDirk Vogt# .vhd 10835f6802SDirk Vogt0 string conectix Microsoft Disk Image, Virtual Server or Virtual PC 11835f6802SDirk Vogt 12*0a6a1f1dSLionel Sambuc# libvirt 13*0a6a1f1dSLionel Sambuc# From: Philipp Hahn <hahn@univention.de> 14*0a6a1f1dSLionel Sambuc0 string LibvirtQemudSave Libvirt QEMU Suspend Image 15*0a6a1f1dSLionel Sambuc>0x10 lelong x \b, version %u 16*0a6a1f1dSLionel Sambuc>0x14 lelong x \b, XML length %u 17*0a6a1f1dSLionel Sambuc>0x18 lelong 1 \b, running 18*0a6a1f1dSLionel Sambuc>0x1c lelong 1 \b, compressed 19*0a6a1f1dSLionel Sambuc 20*0a6a1f1dSLionel Sambuc0 string LibvirtQemudPart Libvirt QEMU partial Suspend Image 21*0a6a1f1dSLionel Sambuc# From: Alex Beregszaszi <alex@fsn.hu> 22*0a6a1f1dSLionel Sambuc0 string/b COWD VMWare3 23*0a6a1f1dSLionel Sambuc>4 byte 3 disk image 24*0a6a1f1dSLionel Sambuc>>32 lelong x (%d/ 25*0a6a1f1dSLionel Sambuc>>36 lelong x \b%d/ 26*0a6a1f1dSLionel Sambuc>>40 lelong x \b%d) 27*0a6a1f1dSLionel Sambuc>4 byte 2 undoable disk image 28*0a6a1f1dSLionel Sambuc>>32 string >\0 (%s) 29*0a6a1f1dSLionel Sambuc 30*0a6a1f1dSLionel Sambuc0 string/b VMDK VMware4 disk image 31*0a6a1f1dSLionel Sambuc0 string/b KDMV VMware4 disk image 32*0a6a1f1dSLionel Sambuc 33*0a6a1f1dSLionel Sambuc#-------------------------------------------------------------------- 34*0a6a1f1dSLionel Sambuc# Qemu Emulator Images 35*0a6a1f1dSLionel Sambuc# Lines written by Friedrich Schwittay (f.schwittay@yousable.de) 36*0a6a1f1dSLionel Sambuc# Updated by Adam Buchbinder (adam.buchbinder@gmail.com) 37*0a6a1f1dSLionel Sambuc# Made by reading sources, reading documentation, and doing trial and error 38*0a6a1f1dSLionel Sambuc# on existing QCOW files 39*0a6a1f1dSLionel Sambuc0 string/b QFI\xFB QEMU QCOW Image 40*0a6a1f1dSLionel Sambuc 41*0a6a1f1dSLionel Sambuc# Uncomment the following line to display Magic (only used for debugging 42*0a6a1f1dSLionel Sambuc# this magic number) 43*0a6a1f1dSLionel Sambuc#>0 string/b x , Magic: %s 44*0a6a1f1dSLionel Sambuc 45*0a6a1f1dSLionel Sambuc# There are currently 2 Versions: "1" and "2". 46*0a6a1f1dSLionel Sambuc# http://www.gnome.org/~markmc/qcow-image-format-version-1.html 47*0a6a1f1dSLionel Sambuc>4 belong 1 (v1) 48*0a6a1f1dSLionel Sambuc 49*0a6a1f1dSLionel Sambuc# Using the existence of the Backing File Offset to determine whether 50*0a6a1f1dSLionel Sambuc# to read Backing File Information 51*0a6a1f1dSLionel Sambuc>>12 belong >0 \b, has backing file ( 52*0a6a1f1dSLionel Sambuc# Note that this isn't a null-terminated string; the length is actually 53*0a6a1f1dSLionel Sambuc# (16.L). Assuming a null-terminated string happens to work usually, but it 54*0a6a1f1dSLionel Sambuc# may spew junk until it reaches a \0 in some cases. 55*0a6a1f1dSLionel Sambuc>>>(12.L) string >\0 \bpath %s 56*0a6a1f1dSLionel Sambuc 57*0a6a1f1dSLionel Sambuc# Modification time of the Backing File 58*0a6a1f1dSLionel Sambuc# Really useful if you want to know if your backing 59*0a6a1f1dSLionel Sambuc# file is still usable together with this image 60*0a6a1f1dSLionel Sambuc>>>>20 bedate >0 \b, mtime %s) 61*0a6a1f1dSLionel Sambuc>>>>20 default x \b) 62*0a6a1f1dSLionel Sambuc 63*0a6a1f1dSLionel Sambuc# Size is stored in bytes in a big-endian u64. 64*0a6a1f1dSLionel Sambuc>>24 bequad x \b, %lld bytes 65*0a6a1f1dSLionel Sambuc 66*0a6a1f1dSLionel Sambuc# 1 for AES encryption, 0 for none. 67*0a6a1f1dSLionel Sambuc>>36 belong 1 \b, AES-encrypted 68*0a6a1f1dSLionel Sambuc 69*0a6a1f1dSLionel Sambuc# http://www.gnome.org/~markmc/qcow-image-format.html 70*0a6a1f1dSLionel Sambuc>4 belong 2 (v2) 71*0a6a1f1dSLionel Sambuc# Using the existence of the Backing File Offset to determine whether 72*0a6a1f1dSLionel Sambuc# to read Backing File Information 73*0a6a1f1dSLionel Sambuc>>8 bequad >0 \b, has backing file 74*0a6a1f1dSLionel Sambuc# Note that this isn't a null-terminated string; the length is actually 75*0a6a1f1dSLionel Sambuc# (16.L). Assuming a null-terminated string happens to work usually, but it 76*0a6a1f1dSLionel Sambuc# may spew junk until it reaches a \0 in some cases. Also, since there's no 77*0a6a1f1dSLionel Sambuc# .Q modifier, we just use the bottom four bytes as an offset. Note that if 78*0a6a1f1dSLionel Sambuc# the file is over 4G, and the backing file path is stored after the first 4G, 79*0a6a1f1dSLionel Sambuc# the wrong filename will be printed. (This should be (8.Q), when that syntax 80*0a6a1f1dSLionel Sambuc# is introduced.) 81*0a6a1f1dSLionel Sambuc>>>(12.L) string >\0 (path %s) 82*0a6a1f1dSLionel Sambuc>>24 bequad x \b, %lld bytes 83*0a6a1f1dSLionel Sambuc>>32 belong 1 \b, AES-encrypted 84*0a6a1f1dSLionel Sambuc 85*0a6a1f1dSLionel Sambuc>4 belong 3 (v3) 86*0a6a1f1dSLionel Sambuc# Using the existence of the Backing File Offset to determine whether 87*0a6a1f1dSLionel Sambuc# to read Backing File Information 88*0a6a1f1dSLionel Sambuc>>8 bequad >0 \b, has backing file 89*0a6a1f1dSLionel Sambuc# Note that this isn't a null-terminated string; the length is actually 90*0a6a1f1dSLionel Sambuc# (16.L). Assuming a null-terminated string happens to work usually, but it 91*0a6a1f1dSLionel Sambuc# may spew junk until it reaches a \0 in some cases. Also, since there's no 92*0a6a1f1dSLionel Sambuc# .Q modifier, we just use the bottom four bytes as an offset. Note that if 93*0a6a1f1dSLionel Sambuc# the file is over 4G, and the backing file path is stored after the first 4G, 94*0a6a1f1dSLionel Sambuc# the wrong filename will be printed. (This should be (8.Q), when that syntax 95*0a6a1f1dSLionel Sambuc# is introduced.) 96*0a6a1f1dSLionel Sambuc>>>(12.L) string >\0 (path %s) 97*0a6a1f1dSLionel Sambuc>>24 bequad x \b, %lld bytes 98*0a6a1f1dSLionel Sambuc>>32 belong 1 \b, AES-encrypted 99*0a6a1f1dSLionel Sambuc 100*0a6a1f1dSLionel Sambuc>4 default x (unknown version) 101*0a6a1f1dSLionel Sambuc 102*0a6a1f1dSLionel Sambuc0 string/b QEVM QEMU suspend to disk image 103*0a6a1f1dSLionel Sambuc 104*0a6a1f1dSLionel Sambuc# QEMU QED Image 105*0a6a1f1dSLionel Sambuc# http://wiki.qemu.org/Features/QED/Specification 106*0a6a1f1dSLionel Sambuc0 string/b QED\0 QEMU QED Image 107*0a6a1f1dSLionel Sambuc 108*0a6a1f1dSLionel Sambuc# VDI Image 109835f6802SDirk Vogt# Sun xVM VirtualBox Disk Image 11008ff44c4SLionel Sambuc# From: Richard W.M. Jones <rich@annexia.org> 11108ff44c4SLionel Sambuc# VirtualBox Disk Image 11208ff44c4SLionel Sambuc0x40 ulelong 0xbeda107f VirtualBox Disk Image 11308ff44c4SLionel Sambuc>0x44 uleshort >0 \b, major %u 11408ff44c4SLionel Sambuc>0x46 uleshort >0 \b, minor %u 115*0a6a1f1dSLionel Sambuc>0 string >\0 (%s) 116*0a6a1f1dSLionel Sambuc>368 lequad x \b, %lld bytes 117*0a6a1f1dSLionel Sambuc 118*0a6a1f1dSLionel Sambuc0 string/b Bochs\ Virtual\ HD\ Image Bochs disk image, 119*0a6a1f1dSLionel Sambuc>32 string x type %s, 120*0a6a1f1dSLionel Sambuc>48 string x subtype %s 121*0a6a1f1dSLionel Sambuc 122*0a6a1f1dSLionel Sambuc0 lelong 0x02468ace Bochs Sparse disk image 123*0a6a1f1dSLionel Sambuc 124