Difference between revisions of "Unit VirtualDisk"
From Ultibo.org
Line 10: | Line 10: | ||
---- | ---- | ||
− | '' | + | |
+ | <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%;"| | ||
+ | |- | ||
+ | | <code>VIRTUAL_CONTROLLER_DESCRIPTION = 'Virtual Disk Controller';</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>virtualFlagFixed = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>virtualFlagDynamic = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>virtualFlagBase = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>virtualFlagDelta = $00000008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>virtualFlagDevice = $00000010;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>virtualFlagSplit = $00000020;</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;">'''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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vmwareFileMask = '*.vmdk';</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vmwareNoParentCID = $FFFFFFFF;</code> | ||
+ | | not($00000000) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vmwareSparseMagicNumber = $564d444b;</code> | ||
+ | | 'VMDK' | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <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"| | ||
+ | |- | ||
+ | | <code>vmwareSectorSize = 512;</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vmwareDiskTypeNone = 0;</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vmwareTagVersion = 'version';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagCID = 'CID';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagParentCID = 'parentCID';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagCreateType = 'createType';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagExtent = 'Extent Description';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagDatabase = 'The Disk Data Base';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagDDB = 'DDB';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagAdapter = 'ddb.adapterType';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagSectors = 'ddb.geometry.sectors';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagHeads = 'ddb.geometry.heads';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagCylinders = 'ddb.geometry.cylinders';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareTagParentHint = 'parentFileNameHint';</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vmwareCreateType_monolithicSparse = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_vmfsSparse = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_monolithicFlat = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_vmfs = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_twoGbMaxExtentSparse = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_twoGbMaxExtentFlat = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_fullDevice = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_vmfsRaw = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_partitionedDevice = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_vmfsRawDeviceMap = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_vmfsPassthroughRawDeviceMap = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareCreateType_streamOptimized = 11;</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vmwareAccessType_RW = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareAccessType_RDONLY = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareAccessType_NOACCESS = 2;</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vmwareExtentType_FLAT = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_SPARSE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_ZERO = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_VMFS = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_VMFSSPARSE = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_VMFSRDM = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vmwareExtentType_VMFSRAW = 6;</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;">'''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> | ||
+ | | | ||
+ | |- | ||
+ | | <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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcUndoExtension = '.vud';</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcFileMask = '*.vhd';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcUndoMask = '*.vud';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcSplitMask = '*.v??';</code> | ||
+ | | .v01, v02 etc up to 64 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcFooterCookie = 'conectix';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDynamicCookie = 'cxsparse';</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <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"| | ||
+ | |- | ||
+ | | <code>vpcUnixTimeOffset = 946684800;</code> | ||
+ | | Offset from 1/1/1970 to 1/1/2000 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcFooterVersion = $00010000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDynamicVersion = $00010000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcSectorSize = 512;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcUnallocatedBlock = $FFFFFFFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcFixedDiskTableOffset = $FFFFFFFFFFFFFFFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDynamicDiskDataOffset = $FFFFFFFFFFFFFFFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vpcMaxBlockGroup = $FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcBlockGroupMask = $FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcBlockGroupOffset = $100;</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;">'''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%;"| | ||
+ | |- | ||
+ | | <code>vpcDiskTypeNone = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeReserved1 = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeFixed = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeDynamic = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeDifferencing = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeReserved2 = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcDiskTypeReserved3 = 6;</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;">'''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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vpcFeatureTemporary = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <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> | ||
+ | | | ||
+ | |- | ||
+ | | <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"| | ||
+ | |- | ||
+ | |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"| | ||
+ | |- | ||
+ | | <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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vboxDiskBanner = '<<< Sun xVM VirtualBox Disk Image >>>';</code> | ||
+ | | Plus a LF character in some images (#10) | ||
+ | |- | ||
+ | | <code>vboxDiskVersion = $00010001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDiskSignature = $BEDA107F;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vboxFileMask = '*.vdi';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxPathMask = '*.*';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDeltaPath = '..\Machines\';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxParentPath = '..\..\..\VDI\';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxNewParentPath = '..\..\..\HardDisks\';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxSnapshotPath = '\Snapshots\';</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>vboxUnallocatedBlock = $FFFFFFFF;</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 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%;"| | ||
+ | |- | ||
+ | | <code>vboxDiskTypeNone = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDiskTypeDynamic = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDiskTypeStatic = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDiskTypeUnknown = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>vboxDiskTypeDifferencing = 4;</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 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%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </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