VssSampleProvider Tool and Sample
Shows how to use the VSS interfaces to create a VSS hardware provider.
Note
The VssSampleProvider tool and sample are included in the Microsoft Windows Software Development Kit (SDK). You can download the Windows SDK from Windows Software Development Kit (SDK) for Windows 8.
In the Windows SDK installation, the VssSampleProvider tool can be found in %Program Files(x86)%\Windows Kits\8.1\bin\x64
(for 64-bit Windows) and %Program Files(x86)%\Windows Kits\8.1\bin\x86
(for 32-bit Windows).
Note
Hardware providers are only supported on Windows Server operating systems. On a Windows Client operating system, you can compile the VssSampleProvider sample, but you can't register it as a hardware provider.
The VssSampleProvider tool consists of the following files:
- Virtualstorage.sys
- Vstorcontrol.exe
- Vssampleprovider.dll
- Vstorinterface.dll
The VssSampleProvider sample includes the following installation and uninstallation scripts:
- Install-sampleprovider.cmd
- Uninstall-sampleprovider.cmd
- Register_app.vbs
To install and use the VssSampleProvider sample
Navigate to the
Program Files (x86)\Windows Kits\8.0\bin\
directory. This directory contains virtualstoragevss.sys and vstorcontrol.exe.Open a command prompt window in the specified directory.
To install the virtual storage driver, in the command prompt window, type the following command:
vstorcontrol.exe install
To install the VSS sample provider, in the command prompt window, type the following command:
install-sampleprovider.cmd
To create a virtual LUN, do the following.
In the command prompt window, type the following command:
vstorcontrol.exe create fixeddisk - newimage C:\disk1.image -size 20M -storid "VSS Sample HW Provider"
This command creates a virtual LUN whose storage identifier is VSS Sample HW Provider. To create additional virtual LUNs, repeat this step.
The VSS sample provider recognizes a LUN only if VSS Sample HW Provider is a part of the storage identifier. For more information about the storage identifier, see the following blog post.
In the command prompt window, use diskpart.exe to format the virtual disk and assign a drive letter to it.
Here is a sample script to run at the diskpart command prompt.
Select disk Create partition primary size=<size> Format FS=NTFS quick Assign Letter=<letter> Exit
To run the sample provider, in the command prompt window, type the following command:
Run vshadow.exe -p -nw <drive>
<drive> represents the drive letter of the virtual LUN.
To uninstall the VSS sample provider, in the command prompt window, type the following command:
uninstall-sampleprovider.cmd
To uninstall the virtual storage driver, in the command prompt window, type the following command:
vstorcontrol.exe uninstall
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for