Product Documentation

XenDesktop 4データのインポート

May 28, 2016

The import tool, XdImport, reads settings from XenDesktop 4 that are contained in the XML file produced by the export tool, XdExport, and applies those settings to an existing XenDesktop 7.x Site. The Import tool uses the PowerShell script Import-XdSettings.ps1.

To apply only a subset of the exported data, edit the XML file before running the Import tool. For example, you might want to remove desktop groups and policies that are not needed in your XenDesktop 7.x deployment. The import tool runs successfully if you leave entire elements empty. For example, you can delete all the desktop groups without causing any issues. The tool always validates the XML file before attempting to import any data.

Run XdImport on any machine on which all the XenDesktop 7.x SDKs are installed. You must be a Full XenDesktop administrator identity to run the tool.

Before you import, make sure that you have set up a XenDesktop 7.x Site, including its database. Citrix recommends that you complete the import to XenDesktop 7.x before any user testing or general Site configuration occurs. Merge configurations only when the Site is not in use.

  1. Create a XenDesktop 7.x Site.
  2. Download XdImport.zip and extract the files to the machine where you will run the tool.
  3. In a PowerShell session, run Import-XdSettings.ps1 with the following parameters:
    Parameter Description

    -HypervisorConnectionCredentials

    (Required.) A PowerShell hash table that maps Hypervisor addresses to PSCredential instances as required for the creation of Hypervisor connections. Default = @{}

    Enter credentials for the Hypervisor to which the XenDesktop 4 farm connects.

    For a single Hypervisor, create the argument as follows:

    $credential = Get-Credential 
    $mappings = @{"http://<HypervisorIP>" 
    =$credential} 
    .\Import-XdSettings.ps1 
    -FilePath. \XdSettings.xml 
    -HypervisorConnectionCredentials $mappings

    The address specified in the hash table must exactly match the address in the XML file.

    For example, with both a XenServer and a VMware hypervisor, create the following argument:

    $Xencredential = Get-Credential  
    $VMWcredential = Get-Credential 
    $mappings = @{"http://<XenHypervisorIP>" 
    = $Xencredential;"http://<VmWHypervisorIP>/SDK" 
    = $VMWcredential} 
    .\Import-XdSettings.ps1 
    -FilePath. \XdSettings.xml 
    -HypervisorConnectionCredentials $mappings

    -FilePath <path>

    (The value for <path> is required. ) The location of the XML file from which the farm data is to be imported.

    -AdminAddress

    The name of a Controller in the XenDesktop 7.x Site. Default = localhost

    -MergeDesktops

    Adds desktops defined in the XML file to Delivery Groups in the XenDesktop 7.x Site that have the same name as the groups described in the XML file. The associated machines and users are also added.

    If this parameter is not supplied, no content is added to existing Delivery Groups in the XenDesktop 7.x Site.

    -SkipMachinePolicy

    The script does not create a machine policy that contains site-level settings. If you do not supply this parameter and the machine policy for the Site exists, the script fails.

    -WhatIf

    Completes a trial run to determine what would be changed in or added to the XenDesktop 7.x Site. Including this parameter sends the information to the log file, but does not change the Site.

    -LogFilePath <path>

    Indicates the full path of the log file. The log file contains text describing all writes performed against the XenDesktop 7.x Site. Default = .\Import-XdSettings.log

    -? or -help

    Displays information about parameters and exits without importing any data.

    If the XML file contains policy data, either all polices are imported successfully or if there is any failure, no policy data is imported. Importing large numbers of policies with many settings can take several hours.

When the script completes, the message Done appears. After successfully importing the data from the XML file, you can either run further export and import iterations, or if you have imported all the relevant data, complete the post-migration tasks.