Create a prepared image machine catalog in VMware
Create prepared images and use the prepared images to create an MCS machine catalog using:
The key steps to create an MCS machine catalog using the prepared image are:
- Create the image definition and the initial image versions.
- Use the image version as a prepared image to create a catalog
Use Web Studio
Create an image definition and initial image version
To create an image definition and the initial image version, do the following:
- From Studio, go to the Images node, and click Create Image Definition. Click Next on the Introduction page.
- On the Image Definition page, specify the OS type and Session type for the image definition.
-
On the Image page, select Resources (only the resources applicable for the set connection are listed) and a master image to use as a template for creating the image version. You can select the Use a machine profile checkbox and select a machine profile.
Note:
Before selecting an image, verify that the master image has VDA 2311 or later installed and the MCSIO driver is installed on the VDA.
- On the Machine Specification page, select a machine size. If you select a machine profile, then you can see the Virtual CPU count derived from the machine profile and it is unchangeable. If you do not select a machine profile, then you can see only the memory size that is derived from the master image.
- On the NICs page, select or add NICs for the preparation image. For each NIC, select an associated virtual network. If you do not select a machine profile, then the NIC associated with the master image is selected by default. If you select a machine profile, then the NICs are derived from the machine profile and the count is unchangeable.
- On the Version Description page, enter a description for the initial image version created.
- On the Summary page, check the details of the image definition and the initial image version created. Enter a name and description for the image definition. Click Finish.
Create image versions
Image versions allow for the management of different iterations or updates to a particular image. This functionality enables you to maintain multiple versions of an image for different purposes.
To create image versions from the initial image version, do the following:
- Go to the Images node, select an image version or an image definition, and click Create Image Version.
- On the Image page, you can change the hosting unit within the same hosting connection, and reselect the master image and machine profile for that image version.
- If you want the configuration of the image version to be different from the initial configured image version, then configure the settings on the Machine Specification and NICs pages of the Create Image Version dialog.
- Add a description for the image version. Click Finish.
Note:
If the creation of the image version fails for any reason, the Troubleshoot tab at the bottom provides a Retry option.
Share prepared images
To share prepared images across different host units, follow these steps:
- Right-click an image version and select Manage Image Share. All the host units under the selected connection are listed. The resources where the image version is created from is disabled for any actions.
- Select the host units with which you want to share the image and click Save. The Share Status column shows In progress.
- Click the Resources tab at the bottom for more details about the sharing status.
Note:
When the status of the image version sharing is in progress, the option to Delete Image Version or Manage Image Share is disabled.
Create a machine catalog from the Images node
Use the Create catalog option in the Images node to create a catalog using the image version.
Alternatively, you can select the version when creating a catalog in the Machine Catalogs node, linking to the prepared image option in the catalog creation workflow. See Create a machine catalog from the Machine Catalogs node
To create an MCS machine catalog from the Images node, do the following:
- Select an image version and click Create catalog. Click Next on the Introduction page.
- On the Desktop Experience page, select the required desktop experience.
- From the Image page to Virtual Machines page, the settings are pre-selected based on the selected image version.
- Complete the settings on the following pages.
- On the Summary page, check the details of the machine catalog. Enter a name and description for the machine catalog. Click Finish.
- Go to the Machine Catalogs node to see the created machine catalog.
Create a machine catalog from the Machine Catalogs node
To create an MCS machine catalog from the Machine Catalogs node, do the following:
- Click Machine Catalogs on the left navigation pane.
- Click Create Machine Catalog. The Machine Catalog Setup page appears. Click Next through the Introduction, Machine Type, and Machine Management pages.
- On the Image page:
- Select Prepared image.
- Under the Prepared image, select an image version of an image definition.
- Click the image version name. To view more details about the selected image version, click the version number, which is underlined.
- If the selected image version is configured with a machine profile, select a machine profile. If the selected image version is not configured with a machine profile, you cannot choose to use a machine profile.
- Configure the settings on the following pages.
- On the Summary page, check the details of the machine catalog. Enter a name and description for the machine catalog. Click Finish.
Use PowerShell
Create a prepared image
The detailed PowerShell commands to create a prepared image version spec are as follows:
-
Check the available image definition names using the
Test-ProvImageDefinitionNameAvailable command
. For example,Test-ProvImageDefinitionNameAvailable -ImageDefinitionName <string[]> <!--NeedCopy-->
-
Create an image definition using the
New-ProvImageDefinition
command. For example,New-ProvImageDefinition -ImageDefinitionName image2 -OsType Windows -VdaSessionSupport SingleSession <!--NeedCopy-->
-
Create a new configuration for image definition in the specified Hosting connection using the
Add-ProvImageDefinitionConnection
command. For example,Add-ProvImageDefinitionConnection -ImageDefinitionName image2 -HypervisorConnectionName VMware <!--NeedCopy-->
-
Create an image version using the
New-ProvImageVersion
command. For example,New-ProvImageVersion -ImageDefinitionName $ImageDefintion.ImageDefinitionName -Description "version 1" <!--NeedCopy-->
-
Add a master image version spec to the image version using the
Add-ProvImageVersionSpec
command. For example,$MasterImagePath = "XDHyp:\HostingUnits\vmware\win10-master.vm\win10-master-snap.snapshot" $SourceImageVersionSpec = Add-ProvImageVersionSpec -ImageDefinitionName $ImageVersion.ImageDefinitionName -ImageVersionNumber $ImageVersion.ImageVersionNumber -HostingUnitName vmware -MasterImagePath $MasterImagePath <!--NeedCopy-->
Note:
You can add only one master image version spec to one image version for a hosting unit.
-
Create a prepared image version spec from the master image version spec using the
New-ProvImageVersionSpec
command. For example,New-ProvImageVersionSpec -SourceImageVersionSpecUid $SourceImageVersionSpec.ImageVersionSpecUid -NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"} -VMCpuCount 2 -VMMemoryMB 4096 -RunAsynchronously <!--NeedCopy-->
-
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 VMwareabc <!--NeedCopy-->
Example of the complete set of Powershell commands to create image definition, image version, and prepared image version spec:
New-ProvImageDefinition -ImageDefinitionName image2 -OsType Windows -VdaSessionSupport Single
Add-ProvImageDefinitionConnection -ImageDefinitionName image2 -HypervisorConnectionName VMware
$imageVersion = New-ProvImageVersion -ImageDefinitionName image2
$SourceImageVersionSpec = Add-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid `
-HostingUnitUid $hostingunit.HostingUnitUid `
-MasterImagePath "XDHyp:\HostingUnits\vmware\shuaiz-win10-master.vm\shuaiz-win10-master-snap.snapshot"
New-ProvImageVersionSpec -SourceImageVersionSpecUid $SourceImageVersionSpec.ImageVersionSpecUid `
-NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VMNetwork.network"} `
-VMCpuCount 2 -VMMemoryMB 4096
Add-ProvImageVersionSpecHostingUnit -ImageVersionSpecUid xxxxxxx -HostingUnitName VMwareabc
$PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid | Where SourceImageVersionSpecUid-eq $SourceImageVersionSpec.ImageVersionSpecUid
<!--NeedCopy-->
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 <string> -ImageVersionSpecUid <Guid> -HostingUnitUid <Guid> -IdentityPoolUid <Guid> [-VMCpuCount <int>] [-VMMemoryMB <int>] [-UseWriteBackCache] [-NetworkMapping <Hashtable>] [-CleanOnBoot] [-Scope <string[]>] [-Metadata <Hashtable>] [-ServiceOffering <string>] [-SecurityGroup <string[]>] [-TenancyType <string>] [-MachineProfile <string>] [-CustomProperties <string>] [-ResetAdministratorPasswords] [-UseFullDiskCloneProvisioning] [-RunAsynchronously] [-PurgeJobOnSuccess] [-ProvisioningSchemeType <ProvisioningSchemeType>]
<!--NeedCopy-->
Or,
New-ProvScheme -ProvisioningSchemeName <string> -ImageVersionSpecUid <Guid> -HostingUnitName <string> -IdentityPoolName <string> [-VMCpuCount <int>] [-VMMemoryMB <int>] [-UseWriteBackCache] [-NetworkMapping <Hashtable>] [-CleanOnBoot] [-Scope <string[]>] [-Metadata <Hashtable>] [-ServiceOffering <string>] [-SecurityGroup <string[]>] [-TenancyType <string>] [-MachineProfile <string>] [-CustomProperties <string>] [-ResetAdministratorPasswords] [-UseFullDiskCloneProvisioning] [-RunAsynchronously] [-PurgeJobOnSuccess] [-ProvisioningSchemeType <ProvisioningSchemeType>]
<!--NeedCopy-->
Example of creating a catalog using a prepared image version spec in VMware:
New-ProvScheme -ProvisioningSchemeName assignimage -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid `
-HostingUnitName $hostingunit.c-IdentityPoolName $IdentityPool.IdentityPoolName `
-CleanOnBoot -Scope @() -SecurityGroup @() -VMCpuCount 2 -VMMemoryMB 8192 `
-NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"}
<!--NeedCopy-->
Example of the complete set of Powershell commands to create a catalog:
$Catalog = New-BrokerCatalog -AllocationType "Random" -IsRemotePC $False -MinimumFunctionalLevel "L7_20" -Name "vmwarecatalog" -PersistUserChanges "Discard" -ProvisioningType "MCS" -Scope @() -SessionSupport "MultiSession"
$IdentityPool = New-AcctIdentityPool -AllowUnicode -Domain "vmware.local" -IdentityPoolName "vmwarecatalog" -IdentityType "ActiveDirectory" -NamingScheme "vmware##" -NamingSchemeType "Numeric" -Scope @()
$PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageDefinitionName image2 -ImageVersionNumber 1 -Filter "PreparationType -eq 'Mcs'"
$Task = New-ProvScheme -ProvisioningSchemeName vmwarecatalog -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid -HostingUnitName vmware -IdentityPoolName vmwarecatalog -CleanOnBoot -Scope @() -SecurityGroup @() -NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"} -VMCpuCount 2 -VMMemoryMB 4096 -RunAsynchronously
Get-ProvTask -TaskId $Task.TaskId
$ProvScheme = Get-ProvScheme -ProvisioningSchemeName vmwarecatalog
Set-BrokerCatalog -Name $Catalog.Name -ProvisioningSchemeId $ProvScheme.ProvisioningSchemeUid
<!--NeedCopy-->