xcp.dmv¶
Driver Multiversion (DMV) Management for XenServer
This module provides functionality to manage multiple hardware driver variants across different kernel versions. It enables detection, selection, and activation of appropriate driver modules based on hardware presence and system configuration.
Features: - Scans /lib/modules/<version>/dmv and /lib/modules/<version>/updates for dmv drivers. - Detects active and loaded driver modules - Matches hardware PCI IDs to supported driver variants - Manages symlinks and updates for selected drivers - Provides structured information about available drivers and their status
Main Classes: - DriverMultiVersion: Handles driver variant selection and info parsing - DriverMultiVersionManager: Aggregates and manages DMV data across the system
- Typical Usage:
manager = DriverMultiVersionManager(runtime=True) manager.parse_dmv_list() dmv_info = manager.get_dmv_list()
- xcp.dmv.get_all_kabi_dirs()[source]¶
Return a list of (kabi_ver, updates_dir, dmv_dir) tuples for all kernel versions.
- xcp.dmv.hardware_present(lspci_out, pci_ids)[source]¶
Checks if any of the specified PCI IDs are present in the output of lspci -nm.
- Args:
lspci_out (str): The output string from the lspci -nm command. pci_ids (list or set): A collection of PCI IDs to search for in the output.
- Returns:
bool: True if any of the given PCI IDs are found in the lspci_out, False otherwise.