DriverHelper2
public static class DriverHelper2
1. Methods
1.1. InjectProxmoxDriversOffline(ISystemHost, string, string, SystemManagement.Contracts.Elements.OperatingSystem)
Stages the OS-matched VirtIO drivers from each category subfolder under the given Proxmox drivers root into an OFFLINE (applied, not yet booted) Windows image via DISM /Add-Driver. Mirrors NETSetup.Helpers.DriverHelper2.InstallProxmoxDrivers(ISystemHost,System.String,osisa.SystemManagement.Contracts.Elements.OperatingSystem) but targets the applied offline image root (e.g. W:\) instead of the running OS, so the boot-critical storage driver (BootCriticalStorageDriver) is present the FIRST time the node boots off a virtio-scsi disk. NetKVM (NIC) is staged too so the node has network on first boot. Boot-critical vioscsi failure is surfaced via the return value; other drivers only warn.
public static bool InjectProxmoxDriversOffline(ISystemHost host, string proxmoxDriversRoot, string appliedWindowsRoot, SystemManagement.Contracts.Elements.OperatingSystem operatingSystem)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
Host running WinPE. |
proxmoxDriversRoot |
string |
Root of the shipped Proxmox VirtIO driver tree on the boot medium (contains vioscsi\, NetKVM\, …). |
appliedWindowsRoot |
string |
Root of the APPLIED offline Windows install (e.g. "W:\") - the DISM /Image target, NOT the running WinPE. |
operatingSystem |
SystemManagement.Contracts.Elements.OperatingSystem |
OS being installed - selects the VirtIO subfolder (w11, 2k19, …). |
Returns: bool — true when the boot-critical storage driver was staged successfully; otherwise false (caller must abort - the node would not boot).
1.2. InstallDrivers(ISystemHost, string, bool)
public static bool InstallDrivers(ISystemHost host, string directory, bool recursive = true)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
directory |
string |
|
recursive |
bool |
Returns: bool
1.3. InstallProxmoxDrivers(ISystemHost, string, SystemManagement.Contracts.Elements.OperatingSystem)
Installs only the OS-specific VirtIO drivers from each driver category subfolder under the given Proxmox drivers root, targeting the amd64 architecture.
public static bool InstallProxmoxDrivers(ISystemHost host, string proxmoxDriversRoot, SystemManagement.Contracts.Elements.OperatingSystem operatingSystem)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
proxmoxDriversRoot |
string |
|
operatingSystem |
SystemManagement.Contracts.Elements.OperatingSystem |
Returns: bool
1.4. TryGetDrivers(IFileProvider, ISystemHost, bool)
public static ISystemHost TryGetDrivers(this IFileProvider source, ISystemHost host, out bool result)
| Name | Type | Description |
|---|---|---|
source |
IFileProvider |
|
host |
ISystemHost |
|
result |
bool |
Returns: ISystemHost
1.5. TryGetDrivers(IFileProvider, ISystemHost, string, string)
public static bool TryGetDrivers(this IFileProvider source, ISystemHost host, string manufacturer, string model)
| Name | Type | Description |
|---|---|---|
source |
IFileProvider |
|
host |
ISystemHost |
|
manufacturer |
string |
|
model |
string |
Returns: bool
1.6. TryInstallDrivers(ISystemHost)
public static void TryInstallDrivers(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
1.7. TryInstallDriversFrom(ISystemHost, AbsolutePath, bool)
public static ISystemHost TryInstallDriversFrom(this ISystemHost host, AbsolutePath driversFolder, bool recursive = true)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
driversFolder |
AbsolutePath |
|
recursive |
bool |
Returns: ISystemHost
1.8. TryInstallDriversWindows(ISystemHost, AbsolutePath, bool)
public static ISystemHost TryInstallDriversWindows(this ISystemHost host, AbsolutePath driversFolder, bool recursive = true)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
driversFolder |
AbsolutePath |
|
recursive |
bool |
Returns: ISystemHost