Difference between revisions of "Unit VirtualDisk"

From Ultibo.org
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo Virtual Disk Interface unit'''
  
 
=== Constants ===
 
=== Constants ===
Line 26: Line 26:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Virtual flag''' <code> virtualFlag* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 54: Line 54:
 
</div></div>
 
</div></div>
 
<br />  
 
<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;">'''Initramfs constants''' <code> memoryInitramfs* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>memoryInitramfsName = 'INITRAMFS';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware constants''' <code> vmware* </code></div>
Line 101: Line 111:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware disk type''' <code> vmware*DiskType </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 115: Line 125:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware descriptor tag''' <code> vmwareTag* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 162: Line 172:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware create type''' <code> vmwareCreateType_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 209: Line 219:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware access type''' <code> vmwareAccessType_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 229: Line 239:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware extent type''' <code> vmwareExtentType_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 261: Line 271:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware disk flag''' <code> vmwareFlag* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 281: Line 291:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VMware compression type''' <code> vmwareCompression* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 376: Line 386:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VPC disk type''' <code> vpcDiskType* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 408: Line 418:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VPC feature''' <code> vpcFeature* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 425: Line 435:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VPC creator host OS''' <code> vpcCreator* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 439: Line 449:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VPC platform code''' <code> vpcPlatform* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 468: Line 478:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VPC bitmap mask''' <code> vpcBitmapMask* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 557: Line 567:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VirtualBox disk type''' <code> vboxDiskType* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 583: Line 593:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''VirtualBox disk flag''' <code> vboxDiskFlags* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 597: Line 607:
 
----
 
----
  
''To be documented''
+
 
 +
'''ESX sparse extent header'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PEsxSparseExtentHeader = ^TEsxSparseExtentHeader;</code>
 +
 
 +
<code>TEsxSparseExtentHeader = packed record </code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 2048 bytes (Only used for Delta disks, not Dynamic)
 +
|-
 +
| <code>magicNumber:LongWord;</code>
 +
| 0x44574f43/'COWD'
 +
|-
 +
| <code>version:LongWord;</code>
 +
| The value of this entry should be 1
 +
|-
 +
| <code>flags:LongWord;</code>
 +
| set to 3
 +
|-
 +
| <code>numSectors:LongWord;</code>
 +
| total number of sectors on the base disk
 +
|-
 +
| <code>grainSize:LongWord;</code>
 +
| one sector by default. Can vary from one sector to 1MB
 +
|-
 +
| <code>gdOffset:LongWord;</code>
 +
| starts at the fourth sector, because the COWDisk_Header structure takes four sectors
 +
|-
 +
| <code>numGDEntries:LongWord;</code>
 +
| is CEILING(numSectors, gtCoverage)
 +
|-
 +
| <code>freeSector:LongWord;</code>
 +
| the next free data sector. This needs to be less than the length of the delta link. It is initially set to gdOffset + numGDSectors
 +
|-
 +
| <code>case Integer of</code>
 +
| &nbsp;
 +
|-
 +
| <code>0: (cylinders:LongWord;</code>
 +
| root
 +
|-
 +
| <code>heads:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>sectors:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>generation:LongWord;</code>
 +
| cont
 +
|-
 +
| <code>name:array[0..vmwareEsxSparseMaxNameLength - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>description:array[0..vmwareEsxSparseMaxDescriptionLength - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>savedGeneration:LongWord;</code>
 +
| used to detect the unclean shutdown of the delta link. It is initially set to 0
 +
|-
 +
| <code>reserved:array[0..7] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>uncleanShutdown:LongWord;</code>
 +
| used to trigger the metadata consistency check in case there is an abnormal termination of the program
 +
|-
 +
| <code>padding:array[0..395] of Char);</code>
 +
| &nbsp;
 +
|-
 +
| <code>1: (parentFileName:array[0..vmwareEsxSparseMaxParentLength - 1] of Char;</code>
 +
| child
 +
|-
 +
| <code>parentGeneration:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>generationx:LongWord;</code>
 +
| cont
 +
|-
 +
| <code>namex:array[0..vmwareEsxSparseMaxNameLength - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>descriptionx:array[0..vmwareEsxSparseMaxDescriptionLength - 1] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>savedGenerationx:LongWord;</code>
 +
| used to detect the unclean shutdown of the delta link. It is initially set to 0
 +
|-
 +
| <code>reservedx:array[0..7] of Char;</code>
 +
| &nbsp;
 +
|-
 +
| <code>uncleanShutdownx:LongWord;</code>
 +
| used to trigger the metadata consistency check in case there is an abnormal termination of the program
 +
|-
 +
| <code>paddingx:array[0..395] of Char);</code>
 +
| remaining fields are not used. They are present to maintain compatibility with legacy virtual disk formats
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''VMware sparse extent header'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVmwareSparseExtentHeader = ^TVmwareSparseExtentHeader;</code>
 +
 
 +
<code>TVmwareSparseExtentHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 512 bytes (Used for both Dynamic and Delta disks)
 +
|-
 +
| <code>magicNumber:LongWord;</code>
 +
| 0x564d444b/'VMDK'
 +
|-
 +
| <code>version:LongWord;</code>
 +
| The value of this entry should be 1
 +
|-
 +
| <code>flags:LongWord;</code>
 +
| See above
 +
|-
 +
| <code>capacity:Int64;</code>
 +
| the capacity of this extent in sectors (should be a multiple of the grain size)
 +
|-
 +
| <code>grainSize:Int64;</code>
 +
| size of a grain in sectors (must be a power of 2 and must be greater than 8 (4KB))
 +
|-
 +
| <code>descriptorOffset:Int64;</code>
 +
| offset of the embedded descriptor in the extent (expressed in sectors)
 +
|-
 +
| <code>descriptorSize:Int64;</code>
 +
| valid only if descriptorOffset is non-zero (expressed in sectors)
 +
|-
 +
| <code>numGTEsPerGT:LongWord;</code>
 +
| the number of entries in a grain table (for VMware virtual disks is 512)
 +
|-
 +
| <code>rgdOffset:Int64;</code>
 +
| redundant level 0 of metadata (expressed in sectors)
 +
|-
 +
| <code>gdOffset:Int64;</code>
 +
| level 0 of metadata (expressed in sectors)
 +
|-
 +
| <code>overHead:Int64;</code>
 +
| number of sectors occupied by the metadata
 +
|-
 +
| <code>uncleanShutdown:ByteBool;</code>
 +
| set to FALSE when VMware software closes an extent. Four entries are used to detect when an extent file has been corrupted by transferring it using FTP in text mode. The entries should be initialized with the following values
 +
|-
 +
| <code>singleEndLineChar:Char;</code>
 +
| '\n'
 +
|-
 +
| <code>nonEndLineChar:Char;</code>
 +
| ' '
 +
|-
 +
| <code>doubleEndLineChar1:Char;</code>
 +
| '\r'
 +
|-
 +
| <code>doubleEndLineChar2:Char;</code>
 +
| '\n'
 +
|-
 +
| <code>compressAlgorithm:Word;</code>
 +
| See above
 +
|-
 +
| <code>pad:array[0..432] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''VPC dish geometry'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVpcDiskGeometry = ^TVpcDiskGeometry;</code>
 +
 
 +
<code>TVpcDiskGeometry = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 4 bytes
 +
|-
 +
| <code>Cylinders:Word;</code>
 +
| Cylinders
 +
|-
 +
| <code>Heads:Byte;</code>
 +
| Heads
 +
|-
 +
| <code>Sectors:Byte;</code>
 +
| Sectors per track
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''VPC parent locator'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVpcParentLocator = ^TVpcParentLocator;</code>
 +
 
 +
<code>TVpcParentLocator = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 24 bytes
 +
|-
 +
| <code>PlatformCode:LongWord;</code>
 +
| describes which platform-specific format is used for the file locator (see above)
 +
|-
 +
| <code>PlatformDataSpace:LongWord;</code>
 +
| the number of 512-byte sectors needed to store the parent hard disk locator
 +
|-
 +
| <code>PlatformDataLength:LongWord;</code>
 +
| length of the parent hard disk locator in bytes
 +
|-
 +
| <code>Reserved:LongWord;</code>
 +
| Reserved, must be zero
 +
|-
 +
| <code>PlatformDataOffset:Int64;</code>
 +
| offset in bytes where the platform specific file locator data is stored
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''VPC hard disk footer'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVpcHardDiskFooter = ^TVpcHardDiskFooter;</code>
 +
 
 +
<code>TVpcHardDiskFooter = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 512 bytes (At end of file on Fixed disks, at start and end on Dynamic and Differencing disks)
 +
|-
 +
| <code>Cookie:array[0..7] of Char;</code>
 +
| conectix
 +
|-
 +
| <code>Features:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Version:LongWord;</code>
 +
| 0x00010000
 +
|-
 +
| <code>DataOffset:Int64;</code>
 +
| Offset to Dynamic Disk Header, Must be 0xFFFFFFFF for Fixed Disks
 +
|-
 +
| <code>TimeStamp:LongWord;</code>
 +
| seconds since January 1, 2000 12:00:00 AM in UTC/GMT (Unix Time minus 30 years)
 +
|-
 +
| <code>CreatorApplication:array[0..3] of Char;</code>
 +
| Microsoft Virtual PC = "vpc "/Microsoft Virtual Server = "vs  "
 +
|-
 +
| <code>CreatorVersion:LongWord;</code>
 +
| Virtual Server 2004 = 0x00010000/Virtual PC 2004 = 0x00050000
 +
|-
 +
| <code>CreatorHostOS:LongWord;</code>
 +
| Windows 0x5769326B (Wi2k)/Macintosh 0x4D616320 (Mac )
 +
|-
 +
| <code>OriginalSize:Int64;</code>
 +
| Size in Bytes of the VHD at Creation
 +
|-
 +
| <code>CurrentSize:Int64;</code>
 +
| Current Size in Bytes of the VHD
 +
|-
 +
| <code>DiskGeometry:TVpcDiskGeometry;</code>
 +
| See above
 +
|-
 +
| <code>DiskType:LongWord;</code>
 +
| See above
 +
|-
 +
| <code>Checksum:LongWord;</code>
 +
| 1s compliment checksum of the footer
 +
|-
 +
| <code>UniqueId:TGUID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SavedState:ByteBool;</code>
 +
| Set to 1 if disk is in a saved state
 +
|-
 +
| <code>Reserved:array[0..426] of Byte;</code>
 +
| Reserved, must be zero
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''VPC dynamic disk header'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVpcDynamicDiskHeader = ^TVpcDynamicDiskHeader;</code>
 +
 
 +
<code>TVpcDynamicDiskHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 1024 bytes (Used for both Dynamic and Differencing disks)
 +
|-
 +
| <code>Cookie:array[0..7] of Char;</code>
 +
| cxsparse
 +
|-
 +
| <code>DataOffset:Int64;</code>
 +
| currently unused by existing formats and should be set to 0xFFFFFFFF
 +
|-
 +
| <code>TableOffset:Int64;</code>
 +
| absolute byte offset of the Block Allocation Table (BAT)
 +
|-
 +
| <code>HeaderVersion:LongWord;</code>
 +
| must be initialized to 0x00010000
 +
|-
 +
| <code>MaxTableEntries:LongWord;</code>
 +
| maximum entries present in the BAT. equal to the number of blocks in the disk (disk size divided by the blocksize)
 +
|-
 +
| <code>BlockSize:LongWord;</code>
 +
| The default value is 0x00200000 (indicating a block size of 2 MB)
 +
|-
 +
| <code>Checksum:LongWord;</code>
 +
| 1s compliment checksum of the header
 +
|-
 +
| <code>ParentUniqueId:TGUID;</code>
 +
| only used for differencing hard disks
 +
|-
 +
| <code>ParentTimeStamp:LongWord;</code>
 +
| number of seconds since January 1, 2000 12:00:00 AM in UTC/GMT
 +
|-
 +
| <code>Reserved1:LongWord;</code>
 +
| Must be zero
 +
|-
 +
| <code>ParentUnicodeName:array[0..255] of WideChar;</code>
 +
| parent hard disk filename (Unicode/UTF16 string)
 +
|-
 +
| <code>ParentLocator1:TVpcParentLocator;</code>
 +
| These entries store an absolute byte offset in the file where the parent locator for a differencing hard disk is stored
 +
|-
 +
| <code>ParentLocator2:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator3:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator4:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator5:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator6:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator7:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>ParentLocator8:TVpcParentLocator;</code>
 +
| These fields are used only for differencing disks and should be set to zero for dynamic disks
 +
|-
 +
| <code>Reserved2:array[0..255] of Byte;</code>
 +
| Reserved, must be zero
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''VirtualBox disk header'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PVboxDiskHeader = ^TVboxDiskHeader;</code>
 +
 
 +
<code>TVboxDiskHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Always 512 bytes (At start of file for both Fixed and Dynamic disks)
 +
|-
 +
| <code>Banner:array[0..63] of Char;</code>
 +
| <<< Sun xVM VirtualBox Disk Image >>>
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| 7F 10 DA BE
 +
|-
 +
| <code>Version:LongWord;</code>
 +
| 1.1
 +
|-
 +
| <code>HeaderSize:LongWord;</code>
 +
| 0x190
 +
|-
 +
| <code>DiskType:LongWord;</code>
 +
| see above
 +
|-
 +
| <code>DiskFlags:LongWord;</code>
 +
| see above
 +
|-
 +
| <code>Description:array[0..255] of Char;</code>
 +
| Unused
 +
|-
 +
| <code>BlocksOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DataOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Cylinders:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Heads:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Sectors:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SectorSize:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Reserved1:LongWord;</code>
 +
| Must be zero
 +
|-
 +
| <code>DiskSize:Int64;</code>
 +
| Bytes
 +
|-
 +
| <code>BlockSize:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BlockExtra:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TotalBlocks:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>AllocatedBlocks:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UUID:TGUID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SnapshotUUID:TGUID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LinkUUID:TGUID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ParentUUID:TGUID;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Unknown1:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Unknown2:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Reserved2:LongWord;</code>
 +
| Must be 0x3F
 +
|-
 +
| <code>Reserved3:LongWord;</code>
 +
| Must be 0x200
 +
|-
 +
| <code>Unused:array[0..9] of LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
=== Class definitions ===
 +
----
 +
 
 +
 
 +
'''Virtual disk specific classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskController|<code>TVirtualDiskController = class(TDiskController)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskDevice|<code>TVirtualDiskDevice = class(TDiskDevice)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskPartition|<code>TVirtualDiskPartition = class(TDiskPartition)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskImage|<code>TVirtualDiskImage = class(TDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskMemoryImage|<code>TVirtualDiskMemoryImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskFileImage|<code>TVirtualDiskFileImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskDeviceImage|<code>TVirtualDiskDeviceImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskIsoImage|<code>TVirtualDiskIsoImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskBochsImage|<code>TVirtualDiskBochsImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVmwareImage|<code>TVirtualDiskVmwareImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVpcImage|<code>TVirtualDiskVpcImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVboxImage|<code>TVirtualDiskVboxImage = class(TVirtualDiskImage)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualRecognizer|<code>TVirtualRecognizer = class(TRecognizer)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskResizer|<code>TVirtualDiskResizer = class(TDiskResizer)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskCopier|<code>TVirtualDiskCopier = class(TDiskCopier)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskImager|<code>TVirtualDiskImager = class(TDiskImager)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskExtent|<code>TVirtualDiskExtent = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVmwareExtent|<code>TVirtualDiskVmwareExtent = class(TVirtualDiskExtent)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVpcExtent|<code>TVirtualDiskVpcExtent = class(TVirtualDiskExtent)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVboxExtent|<code>TVirtualDiskVboxExtent = class(TVirtualDiskExtent)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskTable|<code>TVirtualDiskTable = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVmwareTable|<code>TVirtualDiskVmwareTable = class(TVirtualDiskTable)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVpcTable|<code>TVirtualDiskVpcTable = class(TVirtualDiskTable)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVboxTable|<code>TVirtualDiskVboxTable = class(TVirtualDiskTable)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskBlock|<code>TVirtualDiskBlock = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVmwareBlock|<code>TVirtualDiskVmwareBlock = class(TVirtualDiskBlock)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVpcGroup|<code>TVirtualDiskVpcGroup = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TVirtualDiskVpcBlock|<code>TVirtualDiskVpcBlock = class(TVirtualDiskBlock)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 616: Line 1,226:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 628: Line 1,238:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 643: Line 1,253:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Allows byte order swapping on copy
 
| Allows byte order swapping on copy
 
|-
 
|-
Line 655: Line 1,265:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Allows byte order swapping on copy
 
| Allows byte order swapping on copy
 
|-
 
|-
Line 667: Line 1,277:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Accounts for unicode and byte ordering
 
| Accounts for unicode and byte ordering
 
|-
 
|-
Line 679: Line 1,289:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Accounts for unicode and byte ordering
 
| Accounts for unicode and byte ordering
 
|-
 
|-

Latest revision as of 04:40, 29 October 2021

Return to Unit Reference


Description


Ultibo Virtual Disk Interface unit

Constants



[Expand]
Virtual disk specific constants VIRTUAL_*


[Expand]
Virtual flag virtualFlag*


[Expand]
Initramfs constants memoryInitramfs*


[Expand]
VMware constants vmware*


[Expand]
VMware disk type vmware*DiskType


[Expand]
VMware descriptor tag vmwareTag*


[Expand]
VMware create type vmwareCreateType_*


[Expand]
VMware access type vmwareAccessType_*


[Expand]
VMware extent type vmwareExtentType_*


[Expand]
VMware disk flag vmwareFlag*


[Expand]
VMware compression type vmwareCompression*


[Expand]
VPC constants vpc*


[Expand]
VPC disk type vpcDiskType*


[Expand]
VPC feature vpcFeature*


[Expand]
VPC creator host OS vpcCreator*


[Expand]
VPC platform code vpcPlatform*


[Expand]
VPC bitmap mask vpcBitmapMask*


[Expand]
VirtualBox constants vbox*


[Expand]
VirtualBox disk type vboxDiskType*


[Expand]
VirtualBox disk flag vboxDiskFlags*


Type definitions



ESX sparse extent header

[Expand]

PEsxSparseExtentHeader = ^TEsxSparseExtentHeader;

TEsxSparseExtentHeader = packed record

VMware sparse extent header

[Expand]

PVmwareSparseExtentHeader = ^TVmwareSparseExtentHeader;

TVmwareSparseExtentHeader = packed record

VPC dish geometry

[Expand]

PVpcDiskGeometry = ^TVpcDiskGeometry;

TVpcDiskGeometry = packed record

VPC parent locator

[Expand]

PVpcParentLocator = ^TVpcParentLocator;

TVpcParentLocator = packed record

VPC hard disk footer

[Expand]

PVpcHardDiskFooter = ^TVpcHardDiskFooter;

TVpcHardDiskFooter = packed record

VPC dynamic disk header

[Expand]

PVpcDynamicDiskHeader = ^TVpcDynamicDiskHeader;

TVpcDynamicDiskHeader = packed record

VirtualBox disk header

[Expand]

PVboxDiskHeader = ^TVboxDiskHeader;

TVboxDiskHeader = packed record


Class definitions



Virtual disk specific classes

TVirtualDiskController = class(TDiskController)
TVirtualDiskDevice = class(TDiskDevice)
TVirtualDiskPartition = class(TDiskPartition)
TVirtualDiskImage = class(TDiskImage)
TVirtualDiskMemoryImage = class(TVirtualDiskImage)
TVirtualDiskFileImage = class(TVirtualDiskImage)
TVirtualDiskDeviceImage = class(TVirtualDiskImage)
TVirtualDiskIsoImage = class(TVirtualDiskImage)
TVirtualDiskBochsImage = class(TVirtualDiskImage)
TVirtualDiskVmwareImage = class(TVirtualDiskImage)
TVirtualDiskVpcImage = class(TVirtualDiskImage)
TVirtualDiskVboxImage = class(TVirtualDiskImage)
TVirtualRecognizer = class(TRecognizer)
TVirtualDiskResizer = class(TDiskResizer)
TVirtualDiskCopier = class(TDiskCopier)
TVirtualDiskImager = class(TDiskImager)
TVirtualDiskExtent = class(TListObject)
TVirtualDiskVmwareExtent = class(TVirtualDiskExtent)
TVirtualDiskVpcExtent = class(TVirtualDiskExtent)
TVirtualDiskVboxExtent = class(TVirtualDiskExtent)
TVirtualDiskTable = class(TListObject)
TVirtualDiskVmwareTable = class(TVirtualDiskTable)
TVirtualDiskVpcTable = class(TVirtualDiskTable)
TVirtualDiskVboxTable = class(TVirtualDiskTable)
TVirtualDiskBlock = class(TListObject)
TVirtualDiskVmwareBlock = class(TVirtualDiskBlock)
TVirtualDiskVpcGroup = class(TListObject)
TVirtualDiskVpcBlock = class(TVirtualDiskBlock)


Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure VirtualInit;
Description: To be documented


[Expand]
procedure VirtualQuit;
Description: To be documented


Virtual disk helper functions

[Expand]
function VirtualDataToPointer(const AData; ASize:Integer; ASwap:Boolean):Pointer;
Description: Creates a pointer and copies data from a buffer


[Expand]
function VirtualPointerToData(APointer:Pointer; var AData; ASize:Integer; ASwap:Boolean):Boolean;
Description: Copies data to a buffer from supplied pointer


[Expand]
function VirtualDataToString(const AData; ASize:Integer; AUnicode:Boolean):String;
Description: Converts the supplied data to a string


[Expand]
function VirtualStringToData(const AString:String; var AData; ASize:Integer ;AUnicode:Boolean):Boolean;
Description: Converts the supplied string to data


Return to Unit Reference