none
Query on Hyper-V Backup and Recover APIs for Hyper-V 2016

    Question

  • Hello,

    Where I can find the latest information on Hyper-V 2016 Backup and Recovery APIs for VSS less (RCT) backup and recovery? I am using some of the WMI APIs with a C# program what Taylor Brown discussed in his Europe-2014 TechEd talk. Few things are working but few things are giving error, e.g. 

    1. I am not able to use DestroyReferencePoint API using WMI, some parameter seems to be missing, but do not get detailed information as what needs to be done.

    2. Not able to find any parameter to set incremental snapshot during CreateSnapshot WMI API.

    Any help and pointer to latest documents about API are highly appreciated.

    Thanks,

    -Upanshu

    Wednesday, January 18, 2017 11:20 AM

Answers

All replies

  • Hi Upanshu,

    >>Where I can find the latest information on Hyper-V 2016 Backup and Recovery APIs for VSS less (RCT) backup and recovery?

    I'm not able to find any related official documents.

    I would wait to see if there would be any related documents published later.

    Or, you could open a case with Microsoft and you would get a more satisfying explanation.
    Here is the link:
    https://support.microsoft.com/en-us/gp/contactus81?Audience=Commercial&wa=wsignin1.0

    Best Regards,

    Leo


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Upanshu Wednesday, April 12, 2017 8:18 AM
    Thursday, January 19, 2017 2:47 AM
    Moderator
  • You might also ask in a developer forum, such as one in MSDN.  This forum does not really deal with APIs, so you will likely find more people knowledgeable in APIs in a developer forum.

    . : | : . : | : . tim

    Thursday, January 19, 2017 1:34 PM
  • Documentation on these APIs is terse but I've always been able to muddle through with a bit of trial and error. The root of the *MI provider documentation is here: https://msdn.microsoft.com/en-us/library/bg126473(v=vs.85).aspx. Hyper-V intersects with several of these.

    Documentation for DestroyReferencePoint is here: https://msdn.microsoft.com/en-us/library/mt167780(v=vs.85).aspx

    Documentation for CreateSnapshot is here: https://msdn.microsoft.com/en-us/library/mt167912(v=vs.85).aspx

    You can use GetMethodParameters (https://msdn.microsoft.com/en-us/library/system.management.managementobject.getmethodparameters(v=vs.110).aspx) to retrieve a ManagementBaseObject with an empty template of a method's parameters. You fill in the empty set the parts that you need to modify and then send the whole thing to InvokeMethod. You can see a PowerShell example of this method in use on lines 182, 244, 248, and 249 of this script: http://www.altaro.com/hyper-v/free-powershell-script-change-bios-guid-hyper-v-virtual-machine/. It isn't the optimal choice for every method but sometimes helps you get that last hint that you need to make something work.



    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.


    • Edited by Eric SironMVP Thursday, January 19, 2017 2:13 PM
    • Proposed as answer by Leo HanModerator Tuesday, February 07, 2017 1:53 AM
    • Marked as answer by Upanshu Wednesday, April 12, 2017 8:19 AM
    Thursday, January 19, 2017 2:12 PM
  • Hi,
    Have you got the related information? 
    You could mark the reply as answer if it is helpful.
    Best Regards,
    Leo

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Upanshu Wednesday, April 12, 2017 8:18 AM
    Tuesday, February 07, 2017 1:53 AM
    Moderator
  • Thank you very much Eric. This information is useful, I am looking for more information on ExportSystemDefinition or ExportSystemDefinitionEx APIs as well.

    I can see that it provides a paramter "Export Directory" where I can pass the export directory path. Is their any option where I can provide a file handle to this API?

    Requirement is that we pass the file handle of the protection storage so that it can write data to the file handle instead of a given directory path.

    Any idea on this?

    Thanks,

    -Upanshu

    Tuesday, April 11, 2017 4:49 PM
  • Hello Leo,

    I have found some information here and now I have follow up question on ExportSystemDefinition or ExportSystemDefinitionEx API.

    I can see that it provides a paramter "Export Directory" where I can pass the export directory path. Is their any option where I can provide a file handle to this API?

    Requirement is that we pass the file handle of the protection storage so that it can write data to the file handle instead of a given directory path.

    Any idea on this?

    Thanks,

    -Upanshu

    Tuesday, April 11, 2017 4:51 PM
  • This API is a Microsoft implementation of the open CIM standard defined by the DMTF. All CIM data types are primitives and all methods must be OS agnostic. So, no, you cannot pass a file handle. But this method creates files (plural) anyway so it would not make sense for it to accept a file handle even if it were a traditional Win32 interface.

    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    • Marked as answer by Upanshu Wednesday, April 12, 2017 8:18 AM
    Tuesday, April 11, 2017 5:08 PM
  • Thanks Eric. So, there is no way other then Directory name for ExportSystemDefinition?

    Wednesday, April 12, 2017 8:32 AM