dissect.hypervisor.disk.qcow2
¶
Module Contents¶
Classes¶
QCOW2 virtual disk implementation. |
|
Convenience class for accessing the L2 table. |
|
Wrapper class for snapshot table entries. |
Functions¶
Attributes¶
- dissect.hypervisor.disk.qcow2.HAS_ZSTD = True¶
- dissect.hypervisor.disk.qcow2.ALLOW_NO_BACKING_FILE = 1¶
- class dissect.hypervisor.disk.qcow2.QCow2(fh: BinaryIO, data_file: BinaryIO | None = None, backing_file: BinaryIO | int | None = None)¶
Bases:
dissect.util.stream.AlignedStream
QCOW2 virtual disk implementation.
Supports both data-file and backing-file, but must be manually given as arguments.
If a data-file is required, it’s required to manually pass a file like object as the data_file argument.
A backing-file can optionally be skipped if qcow2.ALLOW_NO_BACKING_FILE is passed as the backing_file argument. In this case, any reads from a backing file will result in all null bytes being read.
- fh¶
- header¶
- cluster_bits¶
- cluster_size¶
- subclusters_per_cluster¶
- subcluster_size¶
- subcluster_bits¶
- l2_bits¶
- l2_size¶
- csize_shift¶
- csize_mask¶
- cluster_offset_mask¶
- backing_format = None¶
- feature_table = None¶
- crypto_header = None¶
- bitmap_header = None¶
- image_data_file = None¶
- unknown_extensions = []¶
- backing_file = None¶
- auto_backing_file = None¶
- image_backing_file = None¶
- l2_table¶
- property snapshots: list[QCow2Snapshot]¶
- property l1_table: list[int]¶
- property has_backing_file: bool¶
- property has_data_file: bool¶
- property has_subclusters: bool¶
- class dissect.hypervisor.disk.qcow2.L2Table(qcow2: QCow2, offset: int)¶
Convenience class for accessing the L2 table.
- qcow2¶
- offset¶
- entry(idx: int) int ¶
- bitmap(idx: int) int ¶
- class dissect.hypervisor.disk.qcow2.QCow2Snapshot(qcow2: QCow2, offset: int)¶
Wrapper class for snapshot table entries.
- qcow2¶
- offset¶
- header¶
- extra¶
- unknown_extra¶
- id_str¶
- name¶
- entry_size¶
- property l1_table: list[int]¶
- dissect.hypervisor.disk.qcow2.get_cluster_type(qcow2: QCow2, l2_entry: int) dissect.hypervisor.disk.c_qcow2.QCow2ClusterType ¶
- dissect.hypervisor.disk.qcow2.get_subcluster_type(qcow2: QCow2, l2_entry: int, l2_bitmap: int, sc_index: int) dissect.hypervisor.disk.c_qcow2.QCow2SubclusterType ¶