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, data_file=None, backing_file=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.
- property has_backing_file#
- property has_data_file#
- property has_subclusters#
- snapshots()#
- l1_table()#
- l2_table(l2_offset)#
- class dissect.hypervisor.disk.qcow2.L2Table(qcow2, offset)#
Convenience class for accessing the L2 table.
- entry(idx)#
- bitmap(idx)#
- class dissect.hypervisor.disk.qcow2.QCow2Snapshot(qcow2, offset)#
Wrapper class for snapshot table entries.
- open()#
- l1_table()#
- dissect.hypervisor.disk.qcow2.offset_into_cluster(qcow2, offset)#
- dissect.hypervisor.disk.qcow2.offset_into_subcluster(qcow2, offset)#
- dissect.hypervisor.disk.qcow2.size_to_clusters(qcow2, size)#
- dissect.hypervisor.disk.qcow2.size_to_subclusters(qcow2, size)#
- dissect.hypervisor.disk.qcow2.offset_to_l1_index(qcow2, offset)#
- dissect.hypervisor.disk.qcow2.offset_to_l2_index(qcow2, offset)#
- dissect.hypervisor.disk.qcow2.offset_to_sc_index(qcow2, offset)#
- dissect.hypervisor.disk.qcow2.get_cluster_type(qcow2, l2_entry)#
- dissect.hypervisor.disk.qcow2.get_subcluster_type(qcow2, l2_entry, l2_bitmap, sc_index)#
- dissect.hypervisor.disk.qcow2.get_subcluster_range_type(qcow2, l2_entry, l2_bitmap, sc_from)#
- dissect.hypervisor.disk.qcow2.count_contiguous_subclusters(qcow2, nb_clusters, sc_index, l2_table, l2_index)#