Citrix Virtual Apps and Desktops

Azureで準備済みイメージのマシンカタログを作成する

準備済みイメージを作成し、その準備済みイメージを使用して、次の方法でMCSマシンカタログを作成します:

準備済みイメージを使用してMCSマシンカタログを作成するための主な手順は次のとおりです:

  1. イメージ定義と初期イメージバージョンを作成します。
  2. イメージバージョンを準備済みイメージとして使用してカタログを作成します

Web Studioを使用する

イメージ定義と初期イメージバージョンを作成する

イメージ定義と初期イメージバージョンを作成するには、次の手順を実行します:

  1. Web Studioで [イメージ]ノードに移動し、[イメージ定義の作成]をクリックします。 [はじめに] ページで [次へ] をクリックします。
  2. [イメージ定義] ページで、イメージ定義の [OSの種類][セッションの種類] を指定します。
  3. 既存のリソースグループを選択するか、イメージリソースを保持するための新しいリソースグループを作成します。 イメージ共有を有効にするには、[Azure Compute Galleryにイメージバージョンを配置する]を選択し、新しいギャラリーを作成するか、既存のギャラリーを使用してイメージバージョンを保持するかを選択します。
  4. [イメージ]ページで、[リソース](設定された接続に該当するリソースのみが表示されます)と、イメージバージョンを作成するためのテンプレートとして使用するマスターイメージを選択します。 [マシンプロファイルを使用する] チェックボックスをオンにして、マシンプロファイルを選択できます。

    注:

    イメージを選択する前に、マスターイメージにVDA 2311以降がインストールされており、VDAにMCSIOドライバーがインストールされていることを確認します。

  5. [ストレージとライセンスの種類]ページで、イメージ準備プロセスの一部として使用するストレージとライセンスの種類を選択します。

    注:

    [イメージ] ページでマシンプロファイルを選択すると、プロファイル設定に基づいてマシンプロファイルのライセンスの種類が事前に選択されます。

  6. [マシンの仕様]ページで、マシンサイズを選択します。 [イメージ] ページでマシンプロファイルを選択した場合、マシンプロファイルのマシンサイズがデフォルトで選択されます。
  7. [NIC] ページで、準備イメージのNICを選択または追加します。 各NICに対して、関連付けられている仮想ネットワークを選択します。
  8. [ディスク設定]ページで、顧客が管理する暗号化キー(CMEK)を選択します。 マシンプロファイルにCMEKが存在せず、マスターイメージに存在する場合は、マスターイメージからCMEKが事前に選択されます。
  9. [バージョンの説明] ページで、作成された初期イメージバージョンの説明を入力します。
  10. [概要] ページで、イメージ定義の詳細と作成された初期イメージバージョンを確認します。 イメージ定義の名前と説明を入力します。 [完了]をクリックします。

イメージバージョンを作成する

イメージバージョンを使用すると、特定のイメージに対するさまざまな反復または更新を管理できます。 この機能を使用すると、さまざまな目的に合わせてイメージの複数のバージョンを維持できます。

初期イメージバージョンからイメージバージョンを作成するには、次の手順を実行します:

注:

すべてのイメージバージョンのホスティング ユニットは同じである必要があります。

  1. [イメージ]ノードに移動し、イメージバージョンまたはイメージ定義を選択して、[イメージバージョンの作成]を選択します。
  2. [イメージ定義]ページでは、ホスティングユニットを変更したり、そのイメージバージョンのマスターイメージとマシンプロファイルを再選択したりできます。
  3. イメージバージョンの構成を初期構成のイメージバージョンと異なるものにする場合は、[イメージバージョンの作成]ダイアログの[ストレージとライセンスの種類][マシン仕様][NIC]、および [ディスク設定]ページで設定を構成します。
  4. イメージバージョンの説明を追加します。 [完了]をクリックします。

イメージバージョンの作成

注:

何らかの理由でイメージバージョンの作成が失敗した場合は、下部の[トラブルシューティング]タブに[再試行]オプションが表示されます。

共有の準備済みイメージ

準備済みイメージをAzureのさまざまなホストユニットで共有するには、次の手順を実行します:

  1. イメージバージョンを右クリックして、[イメージ共有を管理する]を選択します。 選択した接続の下にあるすべてのホストユニットが表示されます。 イメージバージョンが作成されたリソースは、どのアクションに関しても無効になります。
  2. イメージを共有するホストユニットを選択し、[保存]をクリックします。 [共有ステータス]列には「進行中」と表示されます。
  3. 共有ステータスの詳細については、[リソース]タブをクリックしてください。

注:

イメージバージョン共有のステータスが進行中の場合、[イメージバージョンの削除]または[イメージ共有を管理する]のオプションは無効になります。

イメージノードからマシンカタログを作成する

イメージバージョンを使用してカタログを作成するには、[イメージ] ノードの [カタログの作成] オプションを使用します。

または、[マシンカタログ] ノードでカタログを作成するときにバージョンを選択し、カタログ作成ワークフローの準備済みイメージオプションにリンクすることもできます。 「マシンカタログノードからマシンカタログを作成する」を参照してください

[イメージ] ノードからMCSマシンカタログを作成するには、次の手順を実行します:

  1. イメージバージョンを選択し、[カタログの作成] をクリックします。 [はじめに] ページで [次へ] をクリックします。
  2. [デスクトップエクスペリエンス] ページで、必要なデスクトップエクスペリエンスを選択します。
  3. [イメージ] ページから [ディスク設定] ページまで、選択したイメージバージョンに基づいて設定が事前に選択されます。
  4. [リソースグループ]ページで、新しいリソースグループを作成するか、既存のリソースグループを使用してこのカタログのリソースを配置するかを選択できます。
  5. 次のページで設定を完了します。
  6. [概要] ページで、マシンカタログの詳細を確認します。 マシンカタログの名前と説明を入力します。 [完了]をクリックします。
  7. 作成されたマシンカタログを表示するには、[マシンカタログ] ノードに移動します。

マシンカタログノードからマシンカタログを作成する

[マシンカタログ] ノードからMCSマシンカタログを作成するには、次の手順を実行します:

  1. 左側のナビゲーションペインで [マシンカタログ] をクリックします。
  2. [マシンカタログの作成] をクリックします。 [マシンカタログのセットアップ] ページが表示されます。 [はじめに][マシンの種類][マシン管理] の各ページで [次へ] をクリックします。
  3. [マシン管理]ページで、次のように設定を選択します:
    1. 電源管理されているマシン(仮想マシン、ブレードPCなど) を選択します。
    2. Citrix Provisioningテクノロジを選択します。 [Citrix Machine Creation Services™]を選択します。
    3. [リソース]フィールドには、異なるゾーンに属するリソースが一覧表示されます。 任意のAzureネットワークリソースを選択し、[次へ]をクリックします。
  4. [イメージ]ページで、マスターイメージの種類の場合は、次の手順を実行します:
    1. [マスターイメージ]を選択します。
    2. [マスターイメージ]で、イメージを選択します。 ブレードには、リソースと同じリージョンに属するすべてのイメージが一覧表示されます。
    3. [完了] をクリックします。
    4. 準備済みイメージの種類の場合は、[準備済みイメージ]を選択します。
    5. [準備済みイメージ] の下で、イメージ定義のイメージバージョンを選択します。
    6. イメージバージョン名をクリックします。 選択したイメージバージョンの詳細を表示するには、下線が引かれたバージョン番号をクリックします。
    7. 選択したイメージバージョンがマシンプロファイルで構成されている場合は、マシンプロファイルを選択します。 選択したイメージバージョンがマシンプロファイルで構成されていない場合は、マシンプロファイルの使用を選択することはできません。
  5. 次のページで設定を構成します。
  6. [ディスク設定] ページで、選択した準備済みイメージがディスク暗号化セットを使用している場合、暗号化セットを削除することはできませんが、キーを別の暗号化キーに変更することはできます。
  7. [リソースグループ]ページで、新しいリソースグループを作成するか、既存のリソースグループを使用してこのカタログのリソースを配置するかを選択できます。
  8. 次のページで設定を完了します。
  9. [概要] ページで、マシンカタログの詳細を確認します。 マシンカタログの名前と説明を入力します。 [完了]をクリックします。

PowerShellの使用

準備済みイメージを作成する

準備済みイメージ バージョン仕様を作成するための詳細なPowerShellコマンドは次のとおりです:

  1. Test-ProvImageDefinitionNameAvailable commandを使用して使用可能なイメージ定義名を確認します。 例:

      Test-ProvImageDefinitionNameAvailable -ImageDefinitionName <string[]>
    <!--NeedCopy-->
    
  2. New-ProvImageDefinitionコマンドを使用してイメージ定義を作成します。 例:

      New-ProvImageDefinition -ImageDefinitionName image1 -OsType Windows -VdaSessionSupport MultiSession
    <!--NeedCopy-->
    
  3. Add-ProvImageDefinitionConnectionコマンドを使用して、指定されたホスト接続でイメージ定義の新しい構成を作成します。

    Add-ProvImageDefinitionConnectionCustomPropertiesには以下を含めることができます。 パラメーターを使用しない場合、デフォルト値が使用されます。

    • ResourceGroups:ベースディスクを持つリソースグループ。
    • UseSharedImageGallery:ベースディスクの種類のインジケーター。 ACG(イメージ共有)にはtrueを使用し、スナップショットにはfalseを使用してください。
    • ImageGallery:ベースディスクがACGイメージバージョンの場合のギャラリー名。

    例:

    • スナップショットと顧客提供のリソースグループの場合:

         $CustomerOwnRsourceGroupProperties = @"
       <CustomProperties xmlns="http:// schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Property xsi:type="StringProperty" Name="ResourceGroups" Value="yangj_image" />
       </CustomProperties>
       "@
       <!--NeedCopy-->
      
    • ACGと顧客提供のリソースグループとImage Galleryの場合:

         $CustomerOwnAllProperties = @"
       <CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Property xsi:type="StringProperty" Name="UseSharedImageGallery" Value="true" />
       <Property xsi:type="StringProperty" Name="ResourceGroups" Value="rg" />
       <Property xsi:type="StringProperty" Name="ImageGallery" Value="gallery" />
       </CustomProperties>
       "@
       <!--NeedCopy-->
      
    • In case of ACG and customer provided resource group only:

      $CustomerOwnResourceGroupProperties = @"
      <CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Property xsi:type="StringProperty" Name="UseSharedImageGallery" Value="true" />
      <Property xsi:type="StringProperty" Name="ResourceGroups" Value="rg" />
      </CustomProperties>
      "@
      <!--NeedCopy-->
      
    • In case of ACG and resource group and image gallery managed by Citrix:

       $CustomerOwnResourceGroupNothingProperties = @"
       <CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Property xsi:type="StringProperty" Name="UseSharedImageGallery" Value="true" />
       </CustomProperties>
       "@
       <!--NeedCopy-->
      

    ```

Add-ProvImageDefinitionConnection -ImageDefinitionName image1 -HypervisorConnectionName Azure28 [-CustomProperties $CustomProperties]


  1.  Create an image version using the `New-ProvImageVersion` command.   For example,

    ```

New-ProvImageVersion -ImageDefinitionName image1 -Description "version 1"
    <!--NeedCopy-->
  1. Add a master image version spec to the image version using the Add-ProvImageVersionSpec command. For example,
```

Add-ProvImageVersionSpec -ImageDefinitionName image1 -ImageVersionNumber 1 -HostingUnitName azure -MasterImagePath “XDHyp:\HostingUnits\azure\image.folder\azureresourcegroup.resourcegroup\win2022-snapshot.snapshot”


      > **Note:**
    >
    > You can add only one master image version spec to one image version for a hosting unit.

  1.  Create a prepared image version spec from the master image version spec using the `New-ProvImageVersionSpec` command.   For example,

    ```

New-ProvImageVersionSpec -SourceImageVersionSpecUid  c6e7384c-b2f8-46d6-9519-29a2c57ed3cb -NetworkMapping @{"0"="XDHyp:\HostingUnits\azure\virtualprivatecloud.folder\azureresourcegroup.resourcegroup\azure-vnet-eastus.virtualprivatecloud\dev.network"} -ServiceOffering"XDHyp:\HostingUnits\azure\serviceoffering.folder\Standard_B2ms.serviceoffering" -CustomProperties "<CustomProperties xmlns=`"http://schemas.citrix.com/2014/xd/machinecreation`" xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`"></CustomProperties>" -RunAsynchronously
    <!--NeedCopy-->
  1. You can also share prepared image version spec with another hosting unit within the same hosting connection using the Add-ProvImageVersionSpecHostingUnit command. For example,
```

Add-ProvImageVersionSpecHostingUnit -ImageVersionSpecUid xxxxxxx -HostingUnitName AzureWest


      > **Note:**
    >
    > One hosting unit and preparation type can have only one prepared instance.

  **Example of the complete set of Powershell commands to create image definition, image version, and prepared image version spec**:

New-ProvImageDefinition -ImageDefinitionName image1 -OsType Windows -VdaSessionSupport MultiSession $CustomProperties = @” “@ Add-ProvImageDefinitionConnection -ImageDefinitionName image1 -HypervisorConnectionName Azure28 -CustomProperties $CustomProperties $imageVersion = New-ProvImageVersion -ImageDefinitionName image1 -Description “version 1” $SourceImageVersionSpec = Add-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid -HostingUnitUid $hostingunit.HostingUnitUid -MasterImagePath “XDHyp:\HostingUnits\azure28\image.folder\abc.resourcegroup\def-snapshot.snapshot” New-ProvImageVersionSpec -NetworkMapping @{“0” = “XDHyp:\HostingUnits\azure28\virtualprivatecloud.folder\East US.region\virtualprivatecloud.folder\studio-mcs-infrastructure.resourcegroup\studio-mcs-vnet-eastus.virtualprivatecloud\mcs-dev.network” } -CustomProperties “<CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation” xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”><Property xsi:type="StringProperty” Name="LicenseType” Value="Windows_Server” /></CustomProperties>” -ServiceOffering “XDHyp:\HostingUnits\azure28\serviceoffering.folder\Standard_B2s.serviceoffering” -SourceImageVersionSpecUid $SourceImageVersionSpec.ImageVersionSpecUid Add-ProvImageVersionSpecHostingUnit -ImageVersionSpecUid xxxxxxx -HostingUnitName AzureWest $PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid | Where SourceImageVersionSpecUid-eq $SourceImageVersionSpec.ImageVersionSpecUid


  > **Note:**
>
> -  All image version specs in an image definition must belong to the same hosting unit.
  > -  An image version can have only one master image version spec and one prepared image version spec.
  > -  All image version specs must either have a machine profile or none of the image version specs must have a machine profile.

### Create a catalog using a prepared image version spec

Create an MCS machine catalog from the prepared image version spec using the `New-ProvScheme` command.   For example,

New-ProvScheme -ProvisioningSchemeName -ImageVersionSpecUid -HostingUnitUid -IdentityPoolUid [-VMCpuCount ] [-VMMemoryMB ] [-UseWriteBackCache] [-NetworkMapping ] [-CleanOnBoot] [-Scope <string[]>] [-Metadata ] [-ServiceOffering ] [-SecurityGroup <string[]>] [-TenancyType ] [-MachineProfile ] [-CustomProperties ] \[-ResetAdministratorPasswords\] \[-UseFullDiskCloneProvisioning\] \[-RunAsynchronously\] \[-PurgeJobOnSuccess\] [-ProvisioningSchemeType ]


  Or,

New-ProvScheme -ProvisioningSchemeName -ImageVersionSpecUid -HostingUnitName -IdentityPoolName [-VMCpuCount ] [-VMMemoryMB ] [-UseWriteBackCache] [-NetworkMapping ] [-CleanOnBoot] [-Scope <string[]>] [-Metadata ] [-ServiceOffering ] [-SecurityGroup <string[]>] [-TenancyType ] [-MachineProfile ] [-CustomProperties ] \[-ResetAdministratorPasswords\] \[-UseFullDiskCloneProvisioning\] \[-RunAsynchronously\] \[-PurgeJobOnSuccess\] [-ProvisioningSchemeType ]


  If you want to use an ACG image version spec, then set `UseSharedImageGallery` as `true`.   For example,

$provSchemeCustomProperties= @”

</CustomProperties> “@ New-ProvScheme -ProvisioningSchemeName assignimage -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid -HostingUnitUid $hostingunit.HostingUnitUid -IdentityPoolUid $IdentityPool.IdentityPoolUid -CleanOnBoot -Scope @() -SecurityGroup @() -ServiceOffering “XDHyp:\HostingUnits\azure28\serviceoffering.folder\Standard_B2s.serviceoffering” -NetworkMapping @{"0"="XDHyp:\HostingUnits\azure28\virtualprivatecloud.folder\East US.region\virtualprivatecloud.folder\studio-mcs-infrastructure.resourcegroup\studio-mcs-vnet-eastus.virtualprivatecloud\mcs-dev.network"} -CustomProperties $provSchemeCustomProperties


  **Example of the complete set of Powershell commands to create a catalog:**

$Catalog = New-BrokerCatalog -AllocationType “Random” -IsRemotePC $False -MinimumFunctionalLevel “L7_20” -Name “azurecatalog” -PersistUserChanges “Discard” -ProvisioningType “MCS” -Scope @() -SessionSupport “MultiSession” $IdentityPool = New-AcctIdentityPool -AllowUnicode -Domain “azure.local” -IdentityPoolName “azurecatalog” -IdentityType “ActiveDirectory” -NamingScheme “azure##” -NamingSchemeType “Numeric” -Scope @() $PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageDefinitionName image1 -ImageVersionNumber 1 -Filter “PreparationType -eq ‘Mcs’” $Task = New-ProvScheme -ProvisioningSchemeName azurecatalog -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid -HostingUnitName azure -IdentityPoolName azurecatalog -CleanOnBoot -Scope @() -SecurityGroup @() -ServiceOffering “XDHyp:\HostingUnits\azure\serviceoffering.folder\Standard_B2s.serviceoffering” -NetworkMapping @{“0”=”XDHyp:\HostingUnits\azure\virtualprivatecloud.folder\azureresourcegroup.resourcegroup\azure-vnet-eastus.virtualprivatecloud\dev.network”} -CustomProperties “<CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation” xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”> <Property xsi:type="StringProperty” Name="StorageAccountType” Value="StandardSSD_LRS” /></CustomProperties>” -RunAsynchronously Get-ProvTask -TaskId $Task.TaskId $ProvScheme = Get-ProvScheme -ProvisioningSchemeName azurecatalog Set-BrokerCatalog -Name $Catalog.Name -ProvisioningSchemeId $ProvScheme.ProvisioningSchemeUid ```

追加情報

次の手順

Azureで準備済みイメージのマシンカタログを作成する