Unable to add Virtual Machines (VM) to a Machine Creation Services (MCS) catalog

Unable to add Virtual Machines (VM) to a Machine Creation Services (MCS) catalog

book

Article ID: CTX200562

calendar_today

Updated On:

Description

Unable to add Virtual Machines (VM) to a Machine Creation Services (MCS) catalog.

The following message appears in the logs: 

"Xendesktop Management Console:1:1: [43] Script GetCatalogTaskScript(579): System.ArgumentException: An item with the same key has already been added."

Resolution

Complete the following steps:

  1. Check the Actions tab and clear it.

  2. If the Action tab is empty, then open the PowerShell console from the PowerShell Tab.

  3. Run Get-BrokerCatalog to see if any Metadata information is present for the Catalog that is having issues adding new machines. Check the MetadataMap.

  4. Follow these steps:

    1. Get-brokerCatalog

    2. $s = Get-BrokerCatalog

    3. Remove-BrokerCatalogMetadata –InputObject $s –Name “[Metadata information]”
      Note: Copy MetadataMap from Step 3 and paste into [Metadata Information].

  5. ​Exit and open a new powershell session and run Get-BrokerCatalog the selected Metadata information should have been removed.


Problem Cause

There is a Catalog whose MetadataMap contains TaskData keys tied to a task holding duplicate nonterminatingErrors for either Accounts or Machines.

Issue/Introduction

This article lists the steps to resolve an issue where you are unable to add VMs to a MCS catalog.