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