Jump to content

Virtual Disk Service


johnsed

Recommended Posts

I wrote a C# program to add/mount/dismount volumes (disks) utilizing the NET 4.0 Microsoft.Storage.Vds library.

The program works fine but my Windows 2008 and 2008 R2 server images have a default Dynamic Pack instance based on the Dynamic Provider.

I based the C# program on the Virtual Disk Service (VDS) object model is defined in this Microsoft URL: http://msdn.microsoft.com/en-us/library/aa383402%28v=VS.85%29.aspx

VDS has a Service Loader that contains a Service. The Service contains a set of Providers (Dynamic/Basic). A Provider contains a set of Packs and a Pack contains a set of Disks and/or Volumes.

My default Dynamic Pack has the following set of parameters:

· Disks: Empty "Enumeration yielded no results"

· Flags: Corrupted

· Name: "Invalid"

· Provider: Points to Dynamic Provider

· ID: e092a187-b5cf-4a21-9833-03968cef1beb

· Volumes: Empty "Enumeration yielded no results"

I’d want to remove the invalid Dynamic Pack. I can create a valid Dynamic Pack for the initial set of disk/volume groups that I want to add. However, when I want to create subsequent sets of Dynamic Packs, it is not allowed. The error message indicates that an empty Dynamic Pack already exists. This would be the “Invalid” Dynamic Pack.

I tired to remove it programmatically via the “Dispose” function and the System.Runtime.InteropServices.Marshal.ReleaseComObject but an exception is throw that indicates that this default Dynamic Pack was not created as VDS object.

Is there any utility that can remove a Pack? I believe that Dispart works at the Disk and Volume level. I need to remove the "Invalid" Pack that sits above the disk and volumes. Any assistance would be appreciated.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...