Jump to content
Welcome to our new Citrix community!
  • 0

How to Create MCS Catalog via API calls using an Azure Shared Image Gallery


Srikanth Tirumal

Question

9 answers to this question

Recommended Posts

  • 0

Hi, Srikanth.
Here's an example request body. You can make your changes based on it.

{

    "Name": "sig-catalog",

    "AllocationType": "Static",

    "IsRemotePC": false,

    "MinimumFunctionalLevel": "L7_20",

    "PersistUserChanges": "OnLocal",

    "ProvisioningType": "MCS",

    "SessionSupport": "SingleSession",

    "Scopes": [

        "00000000-0000-0000-0000-000000000000"

    ],

    "Tenants": [],

    "Zone": "New Resource Locationctxlabs24",

    "ProvisioningScheme": {

        "MasterImagePath": "XDHyp:\\HostingUnits\\222\\image.folder\\zhibintest.resourcegroup\\eastsig.gallery\\sigtest.imagedefinition\\1.0.0.imageversion",

        "CpuCount": null,

        "MemoryMB": null,

        "UseWriteBackCache": false,

        "NumTotalMachines": 1,

        "NetworkMapping": [

            {

                "DeviceNameOrId": "default",

                "NetworkDeviceNameOrId": "0",

                "NetworkPath": "XDHyp:\\HostingUnits\\222\\virtualprivatecloud.folder\\East US.region\\virtualprivatecloud.folder\\ji-test.resourcegroup\\ji-test-vnet.virtualprivatecloud\\default.network"

            }

        ],

        "IdentityType": "ActiveDirectory",

        "MachineAccountCreationRules": {

            "NamingScheme": "sigvda##",

            "NamingSchemeType": "Numeric",

            "Domain": "jitest24.icu",

            "OU": "CN=Computers,DC=jitest24,DC=icu"

        },

        "UseFullDiskCloneProvisioning": false,

        "PrepareImage": true,

        "DedicatedTenancy": false,

        "SecurityGroups": null,

        "CustomProperties": [

            {

                "Name": "UseManagedDisks",

                "Value": "true"

            },

            {

                "Name": "StorageType",

                "Value": "Standard_LRS"

            },

            {

                "Name": "LicenseType",

                "Value": "Windows_Client"

            },

            {

                "Name": "EnableIntuneEnroll",

                "Value": "false"

            }

        ],

        "ServiceOfferingPath": "XDHyp:\\HostingUnits\\222\\serviceoffering.folder\\Standard_B2ms.serviceoffering"

    }

}

Link to comment
  • 0

Hi Srikanth Tirumal

Thanks for reaching us. I think the example provided by @Ji Gao is right.Can you follow that payload and have another try?

 

BRs

Zhibin.Wang

 

4 hours ago, Ji Gao said:

Hi, Srikanth.
Here's an example request body. You can make your changes based on it.

{

    "Name": "sig-catalog",

    "AllocationType": "Static",

    "IsRemotePC": false,

    "MinimumFunctionalLevel": "L7_20",

    "PersistUserChanges": "OnLocal",

    "ProvisioningType": "MCS",

    "SessionSupport": "SingleSession",

    "Scopes": [

        "00000000-0000-0000-0000-000000000000"

    ],

    "Tenants": [],

    "Zone": "New Resource Locationctxlabs24",

    "ProvisioningScheme": {

        "MasterImagePath": "XDHyp:\\HostingUnits\\222\\image.folder\\zhibintest.resourcegroup\\eastsig.gallery\\sigtest.imagedefinition\\1.0.0.imageversion",

        "CpuCount": null,

        "MemoryMB": null,

        "UseWriteBackCache": false,

        "NumTotalMachines": 1,

        "NetworkMapping": [

            {

                "DeviceNameOrId": "default",

                "NetworkDeviceNameOrId": "0",

                "NetworkPath": "XDHyp:\\HostingUnits\\222\\virtualprivatecloud.folder\\East US.region\\virtualprivatecloud.folder\\ji-test.resourcegroup\\ji-test-vnet.virtualprivatecloud\\default.network"

            }

        ],

        "IdentityType": "ActiveDirectory",

        "MachineAccountCreationRules": {

            "NamingScheme": "sigvda##",

            "NamingSchemeType": "Numeric",

            "Domain": "jitest24.icu",

            "OU": "CN=Computers,DC=jitest24,DC=icu"

        },

        "UseFullDiskCloneProvisioning": false,

        "PrepareImage": true,

        "DedicatedTenancy": false,

        "SecurityGroups": null,

        "CustomProperties": [

            {

                "Name": "UseManagedDisks",

                "Value": "true"

            },

            {

                "Name": "StorageType",

                "Value": "Standard_LRS"

            },

            {

                "Name": "LicenseType",

                "Value": "Windows_Client"

            },

            {

                "Name": "EnableIntuneEnroll",

                "Value": "false"

            }

        ],

        "ServiceOfferingPath": "XDHyp:\\HostingUnits\\222\\serviceoffering.folder\\Standard_B2ms.serviceoffering"

    }

}

 

Link to comment
  • 0

I get this error message when i invoke web request to connect to machine catalog API URI

Invoke-RestMethod : {
  "ErrorMessage": "Invalid arguments specified.\r\nParameter name: NetworkPath",
  "SdkErrorId": "UnknownError",
  "ErrorType": "ArgumentException",
  "ErrorDetails": "Transaction ID: xx xx xx xx  \r\nAction Name: CreateMachineCatalog\r\n\r\nException:\r\n
Error Source : CitrixOrchestration\r\n    \r\n",
  "SupportLink": null,
  "ErrorReportXml": null,
  "ErrorReport": null
}

 

Link to comment
  • 0

We were able to reach a point where the machine account creation has failed. The error states we need have the Studio user access to AD with computer account creation permissions. In our case we have a dedicated service account for that purpose. the example script simply tells to provide only the password, we tried creating a secure string and added the username and password into a variable called $admincredentials, we failed to create catalog with error sigcat.thumb.PNG.a4ee459936c5636e9ebab9e8d2cd478a.PNGsigcat1.thumb.PNG.1abbaf2115bfcfba1408f1387fc9559f.PNG

Link to comment
  • 0

Did you get it work?

 

I got this error:
 

Failed to create a computer account COMPUTER001, due to an unknown error.
Stack Trace:
   at Citrix.Orchestration.Base.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ADAccountCreationTask.PopulateExceptionWithFailures()
   at Citrix.Orchestration.Base.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ADAccountCreationTask.RunTask()
   at Citrix.Orchestration.Base.PowerShellSdk.BackgroundTaskService.BackgroundTask.Task.Run()

DesktopStudio_ErrorId : UnknownError
ErrorCategory : NotSpecified

I followed the DOC instructions:
the password is utf-8 encoded then base64 encoded.

Link to comment
  • 0

Never mind, I found the error.

The API requires username and password separated by colon, but I used comma.


Did you get it work?

 

I got this error:
 

Failed to create a computer account COMPUTER001, due to an unknown error.
Stack Trace:
   at Citrix.Orchestration.Base.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ADAccountCreationTask.PopulateExceptionWithFailures()
   at Citrix.Orchestration.Base.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ADAccountCreationTask.RunTask()
   at Citrix.Orchestration.Base.PowerShellSdk.BackgroundTaskService.BackgroundTask.Task.Run()

DesktopStudio_ErrorId : UnknownError
ErrorCategory : NotSpecified

I followed the DOC instructions:
the password is utf-8 encoded then base64 encoded.

Link to comment

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
×
×
  • Create New...