dissect.target.loaders.hyperv
#
Module Contents#
Classes#
Load Microsoft Hyper-V hypervisor files. |
Functions#
Return if an XML file is a valid Hyper-V configuration. |
|
Convert a Hyper-V XML file into a dictionary. |
Attributes#
- dissect.target.loaders.hyperv.log#
- dissect.target.loaders.hyperv.DRIVE_CONTROLLER_GUIDS = ['83f8638b-8dca-4152-9eda-2ca8b33039b4', 'd422512d-2bf2-4752-809d-7b82b5fcb1b4']#
- dissect.target.loaders.hyperv.is_hyperv_xml(path: pathlib.Path) bool #
Return if an XML file is a valid Hyper-V configuration.
- Parameters:
path – Path to the file to check.
- dissect.target.loaders.hyperv.xml_as_dict(element: xml.etree.ElementTree.Element, root: dict | None = None) dict #
Convert a Hyper-V XML file into a dictionary.
Recursively converts all XML elements into a correctly typed dictionary.
- Parameters:
element – The current element to convert.
root – The dictionary object to use as current root.
- class dissect.target.loaders.hyperv.HyperVLoader(path: pathlib.Path, **kwargs)#
Bases:
dissect.target.loader.Loader
Load Microsoft Hyper-V hypervisor files.
Maps all virtual disks to the target. All paths are absolute in Hyper-V configuration files, so we first attempt to locate a file with the same name in the same path as the configuration file. This is the most common method if we get a copy of a Hyper-V VM. If that fails, we fall back to the absolute path, which is required when we’re targetting a Hyper-V host and loading child VMs.
References
- static detect(path: pathlib.Path) bool #
Detects wether this
Loader
class can load this specificpath
.- Parameters:
path – The target path to check.
- Returns:
True
if thepath
can be loaded by aLoader
instance.False
otherwise.
- map(target: dissect.target.target.Target) None #
Maps the loaded path into a
Target
.- Parameters:
target – The target that we’re mapping into.