Difference between revisions of "Unit VirtualDisk"

From Ultibo.org
Jump to: navigation, search
Line 10: Line 10:
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Virtual disk specific constants ''' <code> VIRTUAL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>VIRTUAL_DEVICE_DESCRIPTION = 'Virtual Disk Device';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>VIRTUAL_CONTROLLER_DESCRIPTION = 'Virtual Disk Controller';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Virtual flag contants''' <code> virtualFlag* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>virtualFlagNone = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>virtualFlagFixed = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>virtualFlagDynamic = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>virtualFlagBase = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>virtualFlagDelta = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>virtualFlagDevice = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>virtualFlagSplit = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware constants''' <code> vmware* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareFileExtension = '.vmdk';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vmwareFileMask = '*.vmdk';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vmwareNoParentCID = $FFFFFFFF;</code>
 +
| not($00000000)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vmwareSparseMagicNumber = $564d444b;</code>
 +
| 'VMDK'
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vmwareEsxSparseMagicNumber = $44574f43;</code>
 +
| 'COWD'
 +
|-
 +
| <code>vmwareEsxSparseMaxParentLength = 1024;</code>
 +
| COWDISK_MAX_PARENT_FILELEN
 +
|-
 +
| <code>vmwareEsxSparseMaxNameLength = 60;</code>
 +
| COWDISK_MAX_NAME_LEN
 +
|-
 +
| <code>vmwareEsxSparseMaxDescriptionLength = 512;</code>
 +
| COWDISK_MAX_DESC_LEN
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vmwareSectorSize = 512;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware disk type constants''' <code> vmware*DiskType </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareMaxDiskType = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vmwareDiskTypeNone = 0;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware descriptor tag constants''' <code> vmwareTag* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareTagDisk = 'Disk DescriptorFile';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vmwareTagVersion = 'version';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagCID = 'CID';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagParentCID = 'parentCID';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagCreateType = 'createType';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagExtent = 'Extent Description';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagDatabase = 'The Disk Data Base';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagDDB = 'DDB';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagAdapter = 'ddb.adapterType';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagSectors = 'ddb.geometry.sectors';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagHeads = 'ddb.geometry.heads';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagCylinders = 'ddb.geometry.cylinders';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareTagParentHint = 'parentFileNameHint';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware create type constants''' <code> vmwareCreateType_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareMaxCreateType = 11;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vmwareCreateType_monolithicSparse = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_vmfsSparse = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_monolithicFlat = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_vmfs = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_twoGbMaxExtentSparse = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_twoGbMaxExtentFlat = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_fullDevice = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_vmfsRaw = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_partitionedDevice = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_vmfsRawDeviceMap = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_vmfsPassthroughRawDeviceMap = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCreateType_streamOptimized = 11;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware access type constants''' <code> vmwareAccessType_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareMaxAccessType = 2;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vmwareAccessType_RW = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareAccessType_RDONLY = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareAccessType_NOACCESS = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware extent type constants''' <code> vmwareExtentType_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareMaxExtentType = 6;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vmwareExtentType_FLAT = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_SPARSE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_ZERO = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_VMFS = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_VMFSSPARSE = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_VMFSRDM = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareExtentType_VMFSRAW = 6;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware disk flag constants''' <code> vmwareFlag* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareFlagValidTest = $00000001;</code>
 +
| bit 0: valid new line detection test
 +
|-
 +
| <code>vmwareFlagRedundantGrain = $00000002;</code>
 +
| bit 1: redundant grain table will be used
 +
|-
 +
| <code>vmwareFlagGrainCompressed = $00010000;</code>
 +
| bit 16: the grains are compressed. The type of compression is described by compressAlgorithm
 +
|-
 +
| <code>vmwareFlagLBAMarkers = $00020000;</code>
 +
| bit 17: there are markers in the virtual disk to identify every block of metadata or data and the markers for the virtual machine data contain a LBA
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VMware compression type constants''' <code> vmwareCompression* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vmwareCompressionNone = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vmwareCompressionDeflate = 1;</code>
 +
| The deflate algorithm is described in RFC 1951
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC constants''' <code> vpc* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcFileExtension = '.vhd';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcUndoExtension = '.vud';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcFileMask = '*.vhd';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcUndoMask = '*.vud';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcSplitMask = '*.v??';</code>
 +
| .v01, v02 etc up to 64
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcFooterCookie = 'conectix';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDynamicCookie = 'cxsparse';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcMaxDiskExtents = 64;</code>
 +
| Maximum number of 4GB split files in a disk image
 +
|-
 +
| <code>vpcExtentMaxSize = 4294967296;</code>
 +
| Maximum size of s split file (4GB)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcUnixTimeOffset = 946684800;</code>
 +
| Offset from 1/1/1970 to 1/1/2000
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcFooterVersion = $00010000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDynamicVersion = $00010000;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcSectorSize = 512;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcUnallocatedBlock = $FFFFFFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcFixedDiskTableOffset = $FFFFFFFFFFFFFFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDynamicDiskDataOffset = $FFFFFFFFFFFFFFFF;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcMaxBlockGroup = $FF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcBlockGroupMask = $FF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcBlockGroupOffset = $100;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC disk type constants''' <code> vpcDiskType* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcMaxDiskType = 6;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vpcDiskTypeNone = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeReserved1 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeFixed = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeDynamic = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeDifferencing = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeReserved2 = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcDiskTypeReserved3 = 6;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC feature constants''' <code> vpcFeature* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcFeatureNone = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcFeatureTemporary = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcFeatureReserved = $00000002;</code>
 +
| This bit must always be set to 1
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC creator host OS constants''' <code> vpcCreator* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcCreatorWindows = $5769326B;</code>
 +
| Wi2k
 +
|-
 +
| <code>vpcCreatorMacintosh = $4D616320;</code>
 +
| Mac
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC platform code constants''' <code> vpcPlatform* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcPlatformNone = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vpcPlatformWi2r = $57693272;</code>
 +
| Wi2r deprecated
 +
|-
 +
| <code>vpcPlatformWi2k = $5769326B;</code>
 +
| Wi2k deprecated
 +
|-
 +
| <code>vpcPlatformW2ru = $57327275;</code>
 +
| W2ru Unicode pathname (UTF-16) on Windows relative to the differencing disk pathname
 +
|-
 +
| <code>vpcPlatformW2ku = $57326B75;</code>
 +
| W2ku Absolute Unicode (UTF-16) pathname on Windows
 +
|-
 +
| <code>vpcPlatformMac = $4D616320;</code>
 +
| Mac OS alias stored as a blob
 +
|-
 +
| <code>vpcPlatformMacX = $4D616358;</code>
 +
| MacX A file URL with UTF-8 encoding conforming to RFC 2396
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VPC bitmap mask constants''' <code> vpcBitmapMask* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vpcBitmapMaskBits = 32;</code>
 +
| LongWord Bitmap Masks
 +
|-
 +
| <code>vpcBitmapMaskNone = $00000000;</code>
 +
| LongWord (Used for fast counting of free blocks)
 +
|-
 +
| <code>vpcBitmapMaskAll = $FFFFFFFF;</code>
 +
| LongWord (Used for fast counting of used blocks)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>vpcBitmapMasks:array[0..31] of LongWord = (</code>
 +
|-
 +
|colspan="2"|<code>$00000001,$00000002,$00000004,$00000008,$00000010,$00000020,$00000040,$00000080,</code>
 +
|-
 +
|colspan="2"|<code>$00000100,$00000200,$00000400,$00000800,$00001000,$00002000,$00004000,$00008000,</code>
 +
|-
 +
|colspan="2"|<code>$00010000,$00020000,$00040000,$00080000,$00100000,$00200000,$00400000,$00800000,</code>
 +
|-
 +
|colspan="2"|<code>$01000000,$02000000,$04000000,$08000000,$10000000,$20000000,$40000000,$80000000);</code>
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vpcBitmapMasks:array[0..31] of LongWord = (</code>
 +
| Ordered to allow for big endian bitmap
 +
|-
 +
|colspan="2"|<code>$00000080,$00000040,$00000020,$00000010,$00000008,$00000004,$00000002,$00000001,</code>
 +
|-
 +
|colspan="2"|<code>$00008000,$00004000,$00002000,$00001000,$00000800,$00000400,$00000200,$00000100,</code>
 +
|-
 +
|colspan="2"|<code>$00800000,$00400000,$00200000,$00100000,$00080000,$00040000,$00020000,$00010000,</code>
 +
|-
 +
|colspan="2"|<code>$80000000,$40000000,$20000000,$10000000,$08000000,$04000000,$02000000,$01000000);</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VirtualBox constants''' <code> vbox* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vboxFileExtension = '.vdi';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vboxDiskBanner = '<<< Sun xVM VirtualBox Disk Image >>>';</code>
 +
| Plus a LF character in some images (#10)
 +
|-
 +
| <code>vboxDiskVersion = $00010001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDiskSignature = $BEDA107F;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vboxFileMask = '*.vdi';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxPathMask = '*.*';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDeltaPath = '..\Machines\';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxParentPath = '..\..\..\VDI\';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxNewParentPath = '..\..\..\HardDisks\';</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxSnapshotPath = '\Snapshots\';</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>vboxUnallocatedBlock = $FFFFFFFF;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VirtualBox disk type constants''' <code> vboxDiskType* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vboxMaxDiskType = 4;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>vboxDiskTypeNone = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDiskTypeDynamic = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDiskTypeStatic = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDiskTypeUnknown = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>vboxDiskTypeDifferencing = 4;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''VirtualBox disk flag constants''' <code> vboxDiskFlags* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>vboxDiskFlagsNone = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===

Revision as of 04:12, 16 December 2016

Return to Unit Reference


Description


To be documented

Constants



Virtual disk specific constants VIRTUAL_*
VIRTUAL_DEVICE_DESCRIPTION = 'Virtual Disk Device';  
VIRTUAL_CONTROLLER_DESCRIPTION = 'Virtual Disk Controller';  


Virtual flag contants virtualFlag*
virtualFlagNone = $00000000;  
virtualFlagFixed = $00000001;  
virtualFlagDynamic = $00000002;  
virtualFlagBase = $00000004;  
virtualFlagDelta = $00000008;  
virtualFlagDevice = $00000010;  
virtualFlagSplit = $00000020;  


VMware constants vmware*
vmwareFileExtension = '.vmdk';  
 
vmwareFileMask = '*.vmdk';  
 
vmwareNoParentCID = $FFFFFFFF; not($00000000)
 
vmwareSparseMagicNumber = $564d444b; 'VMDK'
 
vmwareEsxSparseMagicNumber = $44574f43; 'COWD'
vmwareEsxSparseMaxParentLength = 1024; COWDISK_MAX_PARENT_FILELEN
vmwareEsxSparseMaxNameLength = 60; COWDISK_MAX_NAME_LEN
vmwareEsxSparseMaxDescriptionLength = 512; COWDISK_MAX_DESC_LEN
 
vmwareSectorSize = 512;  


VMware disk type constants vmware*DiskType
vmwareMaxDiskType = 0;  
vmwareDiskTypeNone = 0;  


VMware descriptor tag constants vmwareTag*
vmwareTagDisk = 'Disk DescriptorFile';  
vmwareTagVersion = 'version';  
vmwareTagCID = 'CID';  
vmwareTagParentCID = 'parentCID';  
vmwareTagCreateType = 'createType';  
vmwareTagExtent = 'Extent Description';  
vmwareTagDatabase = 'The Disk Data Base';  
vmwareTagDDB = 'DDB';  
vmwareTagAdapter = 'ddb.adapterType';  
vmwareTagSectors = 'ddb.geometry.sectors';  
vmwareTagHeads = 'ddb.geometry.heads';  
vmwareTagCylinders = 'ddb.geometry.cylinders';  
vmwareTagParentHint = 'parentFileNameHint';  


VMware create type constants vmwareCreateType_*
vmwareMaxCreateType = 11;  
vmwareCreateType_monolithicSparse = 0;  
vmwareCreateType_vmfsSparse = 1;  
vmwareCreateType_monolithicFlat = 2;  
vmwareCreateType_vmfs = 3;  
vmwareCreateType_twoGbMaxExtentSparse = 4;  
vmwareCreateType_twoGbMaxExtentFlat = 5;  
vmwareCreateType_fullDevice = 6;  
vmwareCreateType_vmfsRaw = 7;  
vmwareCreateType_partitionedDevice = 8;  
vmwareCreateType_vmfsRawDeviceMap = 9;  
vmwareCreateType_vmfsPassthroughRawDeviceMap = 10;  
vmwareCreateType_streamOptimized = 11;  


VMware access type constants vmwareAccessType_*
vmwareMaxAccessType = 2;  
vmwareAccessType_RW = 0;  
vmwareAccessType_RDONLY = 1;  
vmwareAccessType_NOACCESS = 2;  


VMware extent type constants vmwareExtentType_*
vmwareMaxExtentType = 6;  
vmwareExtentType_FLAT = 0;  
vmwareExtentType_SPARSE = 1;  
vmwareExtentType_ZERO = 2;  
vmwareExtentType_VMFS = 3;  
vmwareExtentType_VMFSSPARSE = 4;  
vmwareExtentType_VMFSRDM = 5;  
vmwareExtentType_VMFSRAW = 6;  


VMware disk flag constants vmwareFlag*
vmwareFlagValidTest = $00000001; bit 0: valid new line detection test
vmwareFlagRedundantGrain = $00000002; bit 1: redundant grain table will be used
vmwareFlagGrainCompressed = $00010000; bit 16: the grains are compressed. The type of compression is described by compressAlgorithm
vmwareFlagLBAMarkers = $00020000; bit 17: there are markers in the virtual disk to identify every block of metadata or data and the markers for the virtual machine data contain a LBA


VMware compression type constants vmwareCompression*
vmwareCompressionNone = 0;  
vmwareCompressionDeflate = 1; The deflate algorithm is described in RFC 1951


VPC constants vpc*
vpcFileExtension = '.vhd';  
vpcUndoExtension = '.vud';  
 
vpcFileMask = '*.vhd';  
vpcUndoMask = '*.vud';  
vpcSplitMask = '*.v??'; .v01, v02 etc up to 64
 
vpcFooterCookie = 'conectix';  
vpcDynamicCookie = 'cxsparse';  
 
vpcMaxDiskExtents = 64; Maximum number of 4GB split files in a disk image
vpcExtentMaxSize = 4294967296; Maximum size of s split file (4GB)
 
vpcUnixTimeOffset = 946684800; Offset from 1/1/1970 to 1/1/2000
 
vpcFooterVersion = $00010000;  
vpcDynamicVersion = $00010000;  
 
vpcSectorSize = 512;  
 
vpcUnallocatedBlock = $FFFFFFFF;  
vpcFixedDiskTableOffset = $FFFFFFFFFFFFFFFF;  
vpcDynamicDiskDataOffset = $FFFFFFFFFFFFFFFF;  
 
vpcMaxBlockGroup = $FF;  
vpcBlockGroupMask = $FF;  
vpcBlockGroupOffset = $100;  


VPC disk type constants vpcDiskType*
vpcMaxDiskType = 6;  
vpcDiskTypeNone = 0;  
vpcDiskTypeReserved1 = 1;  
vpcDiskTypeFixed = 2;  
vpcDiskTypeDynamic = 3;  
vpcDiskTypeDifferencing = 4;  
vpcDiskTypeReserved2 = 5;  
vpcDiskTypeReserved3 = 6;  


VPC feature constants vpcFeature*
vpcFeatureNone = $00000000;  
vpcFeatureTemporary = $00000001;  
vpcFeatureReserved = $00000002; This bit must always be set to 1


VPC creator host OS constants vpcCreator*
vpcCreatorWindows = $5769326B; Wi2k
vpcCreatorMacintosh = $4D616320; Mac


VPC platform code constants vpcPlatform*
vpcPlatformNone = $00000000;  
vpcPlatformWi2r = $57693272; Wi2r deprecated
vpcPlatformWi2k = $5769326B; Wi2k deprecated
vpcPlatformW2ru = $57327275; W2ru Unicode pathname (UTF-16) on Windows relative to the differencing disk pathname
vpcPlatformW2ku = $57326B75; W2ku Absolute Unicode (UTF-16) pathname on Windows
vpcPlatformMac = $4D616320; Mac OS alias stored as a blob
vpcPlatformMacX = $4D616358; MacX A file URL with UTF-8 encoding conforming to RFC 2396


VPC bitmap mask constants vpcBitmapMask*
vpcBitmapMaskBits = 32; LongWord Bitmap Masks
vpcBitmapMaskNone = $00000000; LongWord (Used for fast counting of free blocks)
vpcBitmapMaskAll = $FFFFFFFF; LongWord (Used for fast counting of used blocks)
 
vpcBitmapMasks:array[0..31] of LongWord = (
$00000001,$00000002,$00000004,$00000008,$00000010,$00000020,$00000040,$00000080,
$00000100,$00000200,$00000400,$00000800,$00001000,$00002000,$00004000,$00008000,
$00010000,$00020000,$00040000,$00080000,$00100000,$00200000,$00400000,$00800000,
$01000000,$02000000,$04000000,$08000000,$10000000,$20000000,$40000000,$80000000);
 
vpcBitmapMasks:array[0..31] of LongWord = ( Ordered to allow for big endian bitmap
$00000080,$00000040,$00000020,$00000010,$00000008,$00000004,$00000002,$00000001,
$00008000,$00004000,$00002000,$00001000,$00000800,$00000400,$00000200,$00000100,
$00800000,$00400000,$00200000,$00100000,$00080000,$00040000,$00020000,$00010000,
$80000000,$40000000,$20000000,$10000000,$08000000,$04000000,$02000000,$01000000);


VirtualBox constants vbox*
vboxFileExtension = '.vdi';  
 
vboxDiskBanner = '<<< Sun xVM VirtualBox Disk Image >>>'; Plus a LF character in some images (#10)
vboxDiskVersion = $00010001;  
vboxDiskSignature = $BEDA107F;  
 
vboxFileMask = '*.vdi';  
vboxPathMask = '*.*';  
vboxDeltaPath = '..\Machines\';  
vboxParentPath = '..\..\..\VDI\';  
vboxNewParentPath = '..\..\..\HardDisks\';  
vboxSnapshotPath = '\Snapshots\';  
 
vboxUnallocatedBlock = $FFFFFFFF;  


VirtualBox disk type constants vboxDiskType*
vboxMaxDiskType = 4;  
vboxDiskTypeNone = 0;  
vboxDiskTypeDynamic = 1;  
vboxDiskTypeStatic = 2;  
vboxDiskTypeUnknown = 3;  
vboxDiskTypeDifferencing = 4;  


VirtualBox disk flag constants vboxDiskFlags*
vboxDiskFlagsNone = $00000000;  


Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure VirtualInit;
Description: To be documented
Note None documented


procedure VirtualQuit;
Description: To be documented
Note None documented


Virtual disk helper functions

function VirtualDataToPointer(const AData; ASize:Integer; ASwap:Boolean):Pointer;
Description: Creates a pointer and copies data from a buffer
Note Allows byte order swapping on copy


function VirtualPointerToData(APointer:Pointer; var AData; ASize:Integer; ASwap:Boolean):Boolean;
Description: Copies data to a buffer from supplied pointer
Note Allows byte order swapping on copy


function VirtualDataToString(const AData; ASize:Integer; AUnicode:Boolean):String;
Description: Converts the supplied data to a string
Note Accounts for unicode and byte ordering


function VirtualStringToData(const AString:String; var AData; ASize:Integer ;AUnicode:Boolean):Boolean;
Description: Converts the supplied string to data
Note Accounts for unicode and byte ordering


Return to Unit Reference