(WMI)How to call CreateSnapshot() such that Resulting Snapshot's type is Recovery?

  • Thread starter Thread starter KIRA5000
  • Start date Start date
K

KIRA5000

Guest
Hi,

I am trying to create a reference point for my Hyper-V VM to perform a RCT based back-up. I am using C# for this.

This is what I have so far:

These are my CreateSnapshot() Settings:

inParams["AffectedSystem"] = vm.Path.Path;
ManagementObject snapshotSettings = GetObject("Msvm_VirtualSystemSnapshotSettingData",scope);
snapshotSettings["ConsistencyLevel"] = 1;
snapshotSettings["IgnoreNonSnapshottableDisks"] = true;
snapshotSettings["GuestBackupType"] = 1;
inParams["SnapshotSettings"] = snapshotSettings.ToString();
inParams["SnapshotType"] = 2;


And then I am calling InvokeMethod for CreateSnapshot:

ManagementBaseObject outParams = virtualSystemService.InvokeMethod("CreateSnapshot", inParams, null);


After waiting for Job to be completed. My SnapshotType is always Standard. But for ConvertToReferencePoint() to work, SnapshotType should be recovery. Am I missing something?


Original Question:

How to call CreateSnapshot such that Resulting Snapshot's type is Recovery?

Thanks,

Mayank Srivastava

Continue reading...
 
Back
Top