• This topic has 2 replies, 3 voices, and was last updated May 13, 2017 by Ted B.

Creating a VPG – Build 050121007

  • I’m trying to create a VPG using REST API.

    Using Powershell the script keeps failing to commit when the script attempts to commit.

    Exception : System.Net.WebException: The remote server returned an
    error: (400) Bad Request.
    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.
    GetResponse(WebRequest request)
    at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.
    TargetObject : System.Net.HttpWebRequest
    CategoryInfo : InvalidOperation:
    [Invoke-RestMethod], WebException
    FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Comm
    ErrorDetails : {"Message":"Limit in MB value must be assigned"}
    InvocationInfo : System.Management.Automation.InvocationInfo

    Using postman I can successfully post vpgSettings using the following JSON string

    "Backup": null,
    "Basic": {
    "JournalHistoryInHours": null,
    "Name": "K2TEST",
    "Priority": "Medium",
    "ProtectedSiteIdentifier": "bfcf5cc1-1afc-4663-99e9-344f79854f43",
    "RecoverySiteIdentifier": "3c8a27a1-7d9d-4d76-a01c-dbc8954a309c",
    "RpoInSeconds": null,
    "ServiceProfileIdentifier": "",
    "TestIntervalInMinutes": null,
    "UseWanCompression": true,
    "ZorgIdentifier": null
    "BootGroups": {
    "BootGroups": [
    "BootDelayInSeconds": 0,
    "BootGroupIdentifier": "00000000-0000-0000-0000-000000000000",
    "Name": "Default"
    "Journal": {
    "DatastoreClusterIdentifier": null,
    "DatastoreIdentifier": "1dc6a571-220e-48e9-b136-b23e18a8cca0.datastore-157",
    "Networks": {
    "Recovery": {
    "Scripting": {
    "PostBackup": null,
    "PostRecovery": {
    "Command": null,
    "Parameters": null,
    "TimeoutInSeconds": 0
    "PreRecovery": {
    "Command": null,
    "Parameters": null,
    "TimeoutInSeconds": 0
    "Vms": [{"VmIdentifier":"922ae5d0-23b2-4344-84c9-6c971f632eb1.vm-565"}]

    Post method returns


    But when I try to commit this I get the following error;

    "Message": "Limit in MB value must be assigned"

    I’ve tried setting Journal Hard Limits in MB but no matter what values I set them I still receive this message.


    I have over 200 VPG’s to create which will be a real pain if I can’t get this working.


    Hey Andrew,

    Please don’t try and create them by hand! You’ve done everything that I would’ve done in this scenario. I’d recommend trying the following:

    1. Set a journal history of 24 hours
    2. Set an RPO alert of 500 seconds
    3. Set a Test Interval of 262080
    4. The error may be erroneous so try again with the above
    5. If it still doesn’t work then perform the commit, generate logs covering the commit and raise a support case to investigate a potential bug

    Please reply back the outcome and/or case number so we can help others who hit the same error. Thanks,



    Months later, so likely fixed or moved on; but in case someone else comes up upon this. I had the same exact problem. After troubleshooting a number of other issues, I got it down to this one issue and I noticed the ServiceProfileIdentifier was not being populated. I populated it manually in my script (by querying the service profiles directly and using that GUID) and it worked. In digging in a bit further I believe I found the problem; the below line in the script needs to be edited and Description should be changed to ServiceProfileName.

    $ServiceProfileIdentifier = $VISiteServiceProfileCMD | Where-Object {$_.Description -eq $ServiceProfile} | Select ServiceProfileIdentifier -ExpandProperty ServiceProfileIdentifier


    Hope that helps someone. 🙂


You must be logged in to create new topics. Click here to login