Virtual Storage Fault Lab - Windows Kernel Virtual Disk & C++ SDK
Test how Windows software handles storage I/O errors on a disposable RAM-backed disk.
Create a repeatable failure scenario without touching a physical drive. The private Storport virtual miniport exposes one 64 MiB disk, while the native app and two-file C++ SDK select a sector range and fail every Nth matching read or write in that range.
Microsoft-signed evaluation bundle for Windows x64. Application 0.1.1 includes the verified Microsoft-signed Storport driver 0.1.0.0 in self-contained UI and console installers, alongside the app, CLI, example and public user-mode sources. The signed package passed installation, runtime and removal checks on Windows 10 x64, normally and under Driver Verifier. See validation status for the tested boundary and remaining qualification.
What you can test
| Capability | Behavior |
|---|---|
| Real disk I/O | A kernel virtual storage adapter exposes a RAM-backed disk to the Windows storage stack. |
| Bounded failures | Select reads, writes or both; a sector range; and every Nth matching request. |
| Explainable results | Inspect read/write, matching, injected-error and rejected-request counters. |
| Safe targeting | The SDK opens only the adapter with the exact product hardware and service identity. It accepts no physical drive or arbitrary path argument. |
| Automatic recovery | A policy lease expires after 30 seconds without its owning client's heartbeat. The SDK renews it every five seconds and releases it at scope exit. |
| Native integration | Compile SDK/StorageFault.cpp with your program and include SDK/StorageFault.h. |
This is a storage QA component for developers of backup, synchronization, import/export, databases and other file-processing applications. It is not a physical-disk repair tool, filesystem protection product, persistent disk, benchmark or replacement for hardware fault qualification.
The first 1 MiB is excluded from fault ranges. Filesystem metadata can exist elsewhere, so an enabled rule can still make a mounted lab filesystem unusable. Use disposable fixtures. The application never formats a disk or opens a physical disk for reads or writes.
For completion metadata, pair the lab disk with Storage I/O Flight Recorder. Attach that optional read-only filter while the lab disk is unpartitioned. Its timestamps describe its own read/write dispatch-to-completion boundary, rather than physical-media or application latency.
Download and run
- Download the complete Windows x64 ZIP from Releases and extract it.
- Run
StorageFaultLabSetup.exeand choose Install / reinstall. Accept administrator elevation. The single EXE embeds its exact signed INF/CAT/SYS package; no separate driver download is needed. - Restart Windows only if setup requests it. Console deployment uses
StorageFaultLabSetupConsole.exe /installor/uninstall; exit code 3010 requests a manual restart. - Open
StorageFaultLabApp.exeas administrator. Faults start disabled. Installing the adapter exposes a volatile 64 MiB disk; partitioning/formatting it is a separate explicit lab operation. - Choose a range, a failure interval and read/write direction. Select Enable faults only for a disposable test workload on this product's disk.
- Select Clear faults or close the app to release its policy. A crashed client loses its lease after 30 seconds. Uninstall removes only this product's adapter and package; the RAM disk's contents disappear.
For an offline look at the interface, run StorageFaultLabApp.exe --preview. This labelled synthetic preview does not enumerate an adapter, open a disk or change a policy. Installers verify the trusted Microsoft hardware-publisher catalog, exact product identity and INF/SYS membership before installation. They never enable test-signing or restart automatically.
StorageFaultLabCLI.exe --status prints actual adapter counters without claiming the policy. --preview prints explicitly synthetic data.
# Fail every fourth matching read in sectors 4096..4223 for 30 seconds.
# This installs a fault policy, but does not issue disk reads or format anything.
.\StorageFaultLabCLI.exe --policy 4096 128 4 read 30Use write or both only when that is part of your planned disposable test. Press Ctrl+C to clear the console session early.
Minimal C++ integration
Build for Windows x64/C++17 and link setupapi.lib:
#include "StorageFault.h"
#include <iostream>
int main() {
try {
StorageFault::Session lab;
lab.Start();
lab.SetPolicy(StorageFault::Policy(4096, 128, 4, SF_READ));
std::cout << "Run the disposable workload, then press Enter.\n";
std::cin.get();
} catch (const std::exception& error) {
std::cerr << error.what() << '\n';
return 1;
}
} // Scope exit clears the policy and stops its heartbeat.Policy(firstBlock, blockCount, every, flags) requires a nonempty range inside [2048, 131072), an interval from 1 to 1,000,000, and SF_READ, SF_WRITE or both. The policy affects only this product's synthetic disk. It does not select files or filesystem paths.
Matching counts the configured read/write commands whose validated transfer intersects the range. A transfer starting below sector 2048 is exempt. Every Nth matching command fails as a whole, not just the overlapping sectors. The matching sequence restarts when the policy changes or is cleared; the other counters accumulate for the adapter's lifetime. Windows may retry failed commands, so one failed miniport request does not promise one failed application call.
| API | Purpose |
|---|---|
Inspect() |
Read status without claiming a fault lease. |
Session::Start() |
Verify the adapter, claim its single-owner policy lease and start a bounded heartbeat worker. |
Session::SetPolicy(policy) |
Validate and atomically replace the active fault rule. A canonical disabled policy clears it. |
Session::Status() |
Read real counters, generation, current policy and remaining lease; renew ownership. |
Session::Stop() / destructor |
Stop the worker and release the policy. |
Session::LastHeartbeatError() |
Read an English heartbeat failure, if one occurred. |
Errors include the failing stage, an English explanation and the Windows error code. A lost lease is reported as an error; the SDK does not silently claim ownership again. Calls on one session are serialized; callers must stop using it before destruction.
Build
Demo/evaluation driver source is available; see driver/README.md for build instructions and separate evaluation-source terms. Those terms apply to Titan-authored driver code. Third-party source licenses and existing application/SDK licenses remain applicable. Full/commercial implementation and private signing or activation material are excluded.
Install Visual Studio 2022 Desktop C++ tools, CMake and a Windows SDK:
.\Build.ps1
.\Build.ps1 -Asan
# Optional: build self-contained setup executables using an opaque signed package.
.\Build.ps1 -DriverPackageDirectory C:\Signed\TitanStorageFaultLabOutputs are in obj/Build/bin/Release. The normal build and offline tests do not install a driver, create a disk or change Windows storage policy. Evaluation driver source is documented in driver/README.md; no WDK is required to build this public application.
App/ Native UI and console
SDK/ StorageFault.h + StorageFault.cpp
Examples/ Minimal owned-policy example
Installer/ UI/console setup source, without a driver payload
Tests/ Offline protocol and boundary checks
docs/ Validation, operation and OEM integration
OEM integration and support
For a paid storage-error QA pilot, automated regression integration, a separately named driver, OEM redistribution rights or Windows compatibility maintenance, add titancsa on Discord. Describe your workload, expected failure behavior, supported Windows builds and deployment volume. Agree acceptance tests and redistribution terms before production use; see commercial integration.
The public application/SDK/example/installer source is MIT licensed. the prebuilt driver has separate binary evaluation and commercial terms. This evaluation build has no enforced trial timer, paid activation or online quota. A Microsoft signature is a deployment prerequisite, not a guarantee of correctness, compatibility, demand or revenue.
Use only for authorized testing on systems you own or administer. The software is provided AS IS under its applicable license. You remain responsible for your workloads, backups and compliance with applicable law.
Technical references: Storport virtual miniport implementation, virtual miniport I/O, storage design.
Reading fault results
Counters describe adapter commands, not the final outcome of each application operation. They do not identify individual retries. See a workload logging example and interpretation limits before treating an injected command failure as an application-visible error.
Paquets et installation
Les sources, licences, guides API et exemples sont regroupes dans le depot SDK dedie. Choisis le paquet a installer puis execute sa commande dans son dossier.
| Registre | Paquet | Installation / utilisation |
|---|---|---|
| vcpkg | virtual-storage-fault-lab |
vcpkg install virtual-storage-fault-lab:x64-windows |
| Conan | virtual-storage-fault-lab |
conan install --requires=virtual-storage-fault-lab/0.1.1 -r titancsa --build=missing -s compiler.cppstd=17 |
| NuGet | Virtual-Storage-Fault-Lab.Native |
Install-Package Virtual-Storage-Fault-Lab.Native -Version 0.1.1 |
| NuGet | VirtualStorageFaultLab.SDK |
dotnet add package VirtualStorageFaultLab.SDK --version 1.0.0 |
| PyPI | virtual-storage-fault-lab |
Commande prevue apres publication : python -m pip install virtual-storage-fault-lab==1.0.0
|
| Conda | virtual-storage-fault-lab |
conda install --override-channels -c https://raw.githubusercontent.com/TitanCSA/sdk-packages/089bc73095aa8eda89bacbe10d0b9e58394b0207/conda-channel -c conda-forge virtual-storage-fault-lab (canal TitanCSA) |
| crates.io | virtual-storage-fault-lab |
cargo add virtual-storage-fault-lab@1.0.0 |
| npm | virtual-storage-fault-lab |
Commande prevue apres publication : npm install virtual-storage-fault-lab@1.0.0
|
| Maven Central | io.github.titancsa:virtual-storage-fault-lab |
io.github.titancsa:virtual-storage-fault-lab:1.0.0 (pom.xml / Gradle) |
| JitPack | com.github.titanfyre:Virtual-Storage-Fault-Lab |
com.github.titanfyre:Virtual-Storage-Fault-Lab:java-sdk-v1.0.0 (avec le depot JitPack) |
| Go Modules | github.com/titanfyre/Virtual-Storage-Fault-Lab/Virtual-Storage-Fault-Lab-Go-modules |
go get github.com/titanfyre/Virtual-Storage-Fault-Lab/Virtual-Storage-Fault-Lab-Go-modules@v1.0.0 |
| pkg.go.dev | github.com/titanfyre/Virtual-Storage-Fault-Lab/Virtual-Storage-Fault-Lab-Go-modules |
Documentation : https://pkg.go.dev/github.com/titanfyre/Virtual-Storage-Fault-Lab/Virtual-Storage-Fault-Lab-Go-modules@v1.0.0 |
| PowerShell Gallery | VirtualStorageFaultLab |
Install-Module VirtualStorageFaultLab -RequiredVersion 1.0.0 -Scope CurrentUser |
| pub.dev | virtual_storage_fault_lab |
Commande prevue apres publication : dart pub add virtual_storage_fault_lab:1.0.0
|
| RubyGems | virtual-storage-fault-lab |
gem install virtual-storage-fault-lab -v 1.0.0 |
| Packagist | titancsa/virtual-storage-fault-lab |
composer require titancsa/virtual-storage-fault-lab:1.0.0 |
Pour vcpkg et Conan, configure d abord le registre TitanCSA avec le guide complet. Le guide explique aussi Maven/Gradle, les prerequis et le chargement des DLL. Les pilotes/applications du produit sont installes separement. Les commandes marquees prevues ne sont pas encore disponibles.
Les anciens imports Go et versions JitPack gardent leurs tags. Pour les anciennes archives SDK, utilise les liens de remplacement.
Commercial integration and support
Important
Full version and commercial licensing
Discord username: titancsa
Open Discord, choose Friends > Add Friend, enter titancsa, then send a direct message. Mention Virtual Storage Fault Lab and ask about the full / production version, commercial use or OEM redistribution.
Include your intended use and deployment size to discuss pricing, availability and the appropriate licensing / access instructions.
