dissect.hypervisor.disk.vmdk#

Module Contents#

Classes#

VMDK

Basic buffered stream that provides easy aligned reads.

RawDisk

SparseDisk

SparseExtentHeader

DiskDescriptor

Functions#

Attributes#

log

dissect.hypervisor.disk.vmdk.log#
class dissect.hypervisor.disk.vmdk.VMDK(fh)#

Bases: dissect.util.stream.AlignedStream

Basic buffered stream that provides easy aligned reads.

Must be subclassed for various stream implementations. Subclasses can implement:
  • _read(offset, length)

  • _seek(pos, whence=io.SEEK_SET)

The offset and length for _read are guaranteed to be aligned. The only time that overriding _seek would make sense is if there’s no known size of your stream, but still want to provide SEEK_END functionality.

Most subclasses of AlignedStream take one or more file-like objects as source. Operations on these subclasses, like reading, will modify the source file-like object as a side effect.

Parameters:
  • size – The size of the stream. This is used in read and seek operations. None if unknown.

  • align – The alignment size. Read operations are aligned on this boundary. Also determines buffer size.

read_sectors(sector, count)#
class dissect.hypervisor.disk.vmdk.RawDisk(fh, size=None, offset=0, sector_offset=0)#
read_sectors(sector, count)#
class dissect.hypervisor.disk.vmdk.SparseDisk(fh, parent=None, offset=0, sector_offset=0)#
get_runs(sector, count)#
read_sectors(sector, count)#
class dissect.hypervisor.disk.vmdk.SparseExtentHeader(fh)#
__getattr__(attr)#
class dissect.hypervisor.disk.vmdk.DiskDescriptor(attr, extents, disk_db, sectors, raw_config=None)#
classmethod parse(vmdk_config)#
__str__()#

Return str(self).

dissect.hypervisor.disk.vmdk.open_parent(path, filename_hint)#