:py:mod:`dissect.target.loaders.hyperv` ======================================= .. py:module:: dissect.target.loaders.hyperv Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.loaders.hyperv.HyperVLoader Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.target.loaders.hyperv.is_hyperv_xml dissect.target.loaders.hyperv.xml_as_dict Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.target.loaders.hyperv.log dissect.target.loaders.hyperv.DRIVE_CONTROLLER_GUIDS .. py:data:: log .. py:data:: DRIVE_CONTROLLER_GUIDS :value: ['83f8638b-8dca-4152-9eda-2ca8b33039b4', 'd422512d-2bf2-4752-809d-7b82b5fcb1b4'] .. py:function:: is_hyperv_xml(path: pathlib.Path) -> bool Return if an XML file is a valid Hyper-V configuration. :param path: Path to the file to check. .. py:function:: xml_as_dict(element: xml.etree.ElementTree.Element, root: Optional[dict] = None) -> dict Convert a Hyper-V XML file into a dictionary. Recursively converts all XML elements into a correctly typed dictionary. :param element: The current element to convert. :param root: The dictionary object to use as current root. .. py:class:: HyperVLoader(path: pathlib.Path, **kwargs) Bases: :py:obj:`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. .. rubric:: References - https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/ .. py:method:: detect(path: pathlib.Path) -> bool :staticmethod: Detects wether this ``Loader`` class can load this specific ``path``. :param path: The target path to check. :returns: ``True`` if the ``path`` can be loaded by a ``Loader`` instance. ``False`` otherwise. .. py:method:: map(target: dissect.target.target.Target) -> None Maps the loaded path into a ``Target``. :param target: The target that we're mapping into.