XenDesktop PowerShell SDK 5.6 - Creating a Personal vDisk catalog Machine Creation Services

7:01 PM
XenDesktop PowerShell SDK 5.6 - Creating a Personal vDisk catalog Machine Creation Services -

With the acquisition of RingCube last August, Citrix XenDesktop 5.6 adds two new types of catalog ( PVD and PvsPvD) for use with static desktop computers pooled. These types of catalogs relate to personal vDisks fixing (PVD) to virtual machines.

This article will focus mainly on using PowerShell to create a catalog of PvD with Service Automatic creation (MCS). If you want an overview of the Personal vDisk technology, you can find it here. So this article is especially for lovers of PowerShell. Otherwise, you can use wizards to create XenDesktop workstations DPV.

If you are familiar with snapins XenDesktop for Powershell, you will find that creating a catalog of PVD is quite simple. There are mainly three necessary changes. (If you want to first familiarize yourself with XenDesktop PowerShell SDK for creating catalogs, see this blog).

Provisioning Scheme Changes

For PvD, when creating a new provisioning system you must specify the -UsePersonalVDiskStorage option. If you use this option, you must also specify the size of PvD disk (with -PersonalVDiskDriveSize option) and the drive letter that PvD disk consumes within each VM (with PersonalVDiskDriveLetter option).

 $ provScheme = New -ProvScheme -ProvisioningSchemeName provSchemeName -HostingUnitName $ $ $ hostingUnitName -MasterImageVM baseImageSnapshot -IdentityPoolName $ idPoolName -CleanOnBoot -UsePersonalVDiskStorage -PersonalVDiskDriveLetter $ PvDDriveLetter -PersonalVDiskDriveSize $ PvDDisksize 

changes the creation of catalog

is the second change while creating the catalog itself. A point to note is that PVD can be used with static desktop computers pooled and thus AllocationType (while creating the catalog) can not be "permanent". At the same time, as noted below there is a new value for CatalogKind to create a catalog of MCS SCP.

 $ PMB = New BrokerCatalog -Name $ catalogName -AllocationType -CatalogKind permanent SCP -PvsForVM "$ (provScheme.ProvisioningSchemeUid $): $ ($ provScheme.HostingUnitUid)" 

catalog changes preparation

After the catalog was created with pvD disks attached to the virtual machine, the broker should be advised to prepare each disk connected for use with PVD technology by calling API Start-BrokerCatalogPvdImagePrepare.

Script

The script creates a catalog of PvD MCS operates. The script configuration settings that must be configured for your environment.

 # ---------------------------- --------------- ---------------------------------- # * Install PowerShell snap-ins Citrix SDK Add-PSSnapin Citrix. ADIdentity.Admin.V1 Add-PSSnapin Citrix.Broker.Admin.V1 Add-PSSnapin Citrix.Configuration.Admin.V1 Add-PSSnapin Citrix.MachineCreation.Admin.V1 Add-PSSnapin Citrix.Host.Admin.V1 Add-PSSnapin Citrix. MachineIdentity.Admin.V1 # --------------- ----------------------------- --------------------------------- * # configuration settings $ desktopGroupName = "Desktop Group" Use Desktop Group # $ hostingUnitName = "hostingunit" $ brokerhypervisorConnection = "hyp-name" $ ​​provSchemeName = "PVD-PS" # A PVD system prov-$ catalogName = "PvD-catalog" $ baseImageSnapshot = " 'XDHyp:  hostingunits  XenHU1  Win7.SP1.x86.P1 (1) .vm  Win7SP1x86P1_snapshot.snapshot "idPoolName $ = $" IdPoolPVD "suffix =" suffix "$ count = 70 # number of jobs created -------- # --------------------------------------- ----------- ------------------- # * Get the connection broker $ bhc = Get-brokerHypervisorConnection -Name $ brokerhypervisorConnection "broker hypervisor connection" $ # ------- bhc --------------------------------------- ----------- -------------------- # * Create Id Pool # Where in the domain you want the computer accounts provisioned to VDA (s) to go adContainerOU $ = " container "$ d = getDomain" LDAP domain: "+ $ domain $ adContainerDN =" OU = Computers, OU = "+ $ adContainerOU +", "+ # $ d.distinguishedName ----- ------- ------------------------------------------- ------- --------------- # names of PvD VDA (s) provisioned $ adAccountNameSpecification = "CDN -" + $ + suffix "- ####" adAccountPool $ = New AcctIdentityPool - IdentityPoolName $ idPoolName -NamingScheme $ adAccountNameSpecification -Domain digital -NamingSchemeType $ domain -where $ adContainerDN "pool identity account:" $ # adAccountPool ---------------- ------ -------------------------------------------- ------ ----- # * Create new ADAccount $ result = new acctADAccount -IdentityPoolName $ idPoolName -Count $ count = $ newaccount $ result.SuccessfulAccounts "new account" $ # newaccount --- ------- ------------------------------------------- ------- # ---------------- * Create provisioning system (this is not a time as it is to duplicate completely the base image) # (you can track progress by going to the host hypervisor console # # If you use XenServer go to the hypervisor console in XenCenter and use the xe task-list command # # ... there should be a task entitled Async.VDI .copy - the field will increase to # 0.000 to 1.000 as the job progresses. # Advice for PvD while creating a new supply arrangements, we use UsePersonalVDiskStorage parameters, and # PersonalVDiskDriveLetter PersonalVDiskDriveSize. These parameters are to attach a disk to virtual machines PvD # and specify the size and drive to the letter of PvD Disk. Write-Host "Creating PVD provisioning system:` nDisk size = $ PvDDisksize GB `Letter NDrive $ PvDDriveLetter` nIdentity pool $ idPoolName" # --------------------- -------------------------------------------------- ------ # example: New-ProvScheme -ProvisioningSchemeName 'pvdCatalog_XenHU1' -HostingUnitName of XDHyp 'XenHU1'-MasterImageVM':  hostingunits  XenHU1  Win7.SP1.x86.P1 (1) .vm  Win7SP1x86P1_snapshot.snapshot ' - IdentityPoolName 'pvdCatalog' -VMCpuCount 1 -VMMemoryMB 1024 -CleanOnBoot -UsePersonalVDiskStorage -RunAsynchronously -PersonalVDiskDriveLetter E -PersonalVDiskDriveSize $ 5 provScheme = New provScheme -ProvisioningSchemeName $ provSchemeName -HostingUnitName hostingUnitName -MasterImageVM $ $ $ baseImageSnapshot -IdentityPoolName idPoolName -CleanOnBoot -UsePersonalVDiskStorage - PersonalVDiskDriveLetter $ PvDDriveLetter -PersonalVDiskDriveSize $ PvDDisksize "Provisioning Scheme" $ ​​# ---------------------------------- provScheme --- ---------------------------------------- # BrokerCatalog (PvDisk) is created here so that office can find that studio provisioning systems are used for a particular catalog #. # PvsForVms takes $ provScheme.HostingUnitUid, $ provScheme.ProvisioningSchemeUid # Advice for PvD we use AllocationType as Parmanent and CatalogKind PvD like to create a catalog MCS PvD $ PMB = New BrokerCatalog -Name $ catalogName -AllocationType -CatalogKind permanent SCP -PvsForVM "$ (provScheme.ProvisioningSchemeUid $): $ ($ provScheme.HostingUnitUid)" "Broker catalog:" $ PMB Start-BrokerCatalogPvdImagePrepare -inputobject $ BDC "Prepare catalog $ ($ bdc.UiD) for PVD images.". uid = $ newVMs New ProvVM -ProvisioningSchemeName provSchemeName -ADAccount $ @ ($ newaccount) if ($ newVMs.VirtualMachinesCreationFailedCount -gt 0) { "virtual machines" Failed $ newVMs.FailedVirtualMachines throw "FAILED: VirtualMachinesCreationFailedCount> 0 - FAILED provisioning"} if ($ newVMs.VirtualMachinesCreatedCount -eq 0) {throw "fAILED: VirtualMachinesCreation process has failed, there are no virtual machines created." } # ------------------------------------------------ ----------------------------- # output additional information for debugging "virtual machines created:" # should never be 1 VM provisioned by the base image bvt, but the loop is complete to catch insects foreach ($ provVm newVMs.CreatedVirtualMachines in $) {$ provVm $ bpm = New BrokerMachine provVm.AdAccountSid -CatalogUid $ $ $ bdc.Uid -HypervisorConnectionUid bhc.Uid - HostedMachineId $ provVm.VMId Add-BrokerMachine $ bpm -DesktopGroup $ bdt Lock-ProvVM -ProvisioningSchemeName $ provSchemeName -VMId $ provVM.VMId -Tag Brokered} 
Previous
Next Post »
0 Komentar