Integration

Table Of Contents
VMware, Inc. 43
Chapter 3 Using View PowerCLI
Update the configuration of the automatically provisioned desktop pool auto1.
Update-AutomaticPool -pool_id auto1 -displayName "Automatic Desktop Pool 1"
-isProvisioningEnabled $false -dataStorePaths /host/datastore_1/lun10;/host/datastore_1/lun12
The datastores that you specify as arguments to -datastorePaths override the previous setting. You must
specify the existing datastores to retain them for use by the pool.
Creating and Updating Linked-Clone Desktop Pools
Add the linked-clone desktop pool lcdpool_1, which is managed by View Composer on the vCenter Server
vc.mydom.int.
Get-ViewVC -serverName vc.mydom.int | Get-ComposerDomain -domain VCDOM |
Add-AutomaticLinkedClonePool -pool_id lcdpool_1 -displayName "LCD Pool 1"
-namePrefix "lcp1-{n}-dt" -parentVMPath /AutoPoolVMs/parent
-parentSnapshotPath /AutoPoolSnapshots/parent1_snapshot -vmFolderPath /AutoConfig/VM_folder
-resourcePoolPath /AutoConfig/host/Resources
-datastoreSpecs [Aggressive,os,data]/host/datastore_1/lun04;/host/datastore_2/lun16
-dataDiskLetter "D" -dataDiskSize 100 -minimumCount 4 -maximumCount 10
If you specify a persistent data disk, use an uppercase letter for the drive. Do not use a letter that already exists
on the parent virtual machine for a drive such as A, B, or C, or that conflicts with a network-mounted drive.
Update the configuration of the linked-clone desktop pool lcdpool_1.
Get-ViewVC -serverName vc.mydom.int | Get-ComposerDomain -domain VCDOM |
Update-AutomaticLinkedClonePool -pool_id lcdpool_1 -datastoreSpecs
[Conservative,os,data]/host/datastore_1/lun04;/host/datastore_2/lun16;/host/datastore_2/lun22
-minimumCount 4 -maximumCount 20 -headroomCount 2 -powerPolicy Suspend -defaultProtocol PCOIP
-isUserResetAllowed $true
The datastores that you specify as arguments to -datastoreSpecs override the previous setting. You must
specify the existing datastores to retain them for use by the pool.
Rebalance desktops in the linked-clone desktop pool lcdpool_2 among the available datastores.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRebalance -schedule 2011-05-10:01:00:00
-forceLogoff $false -stopOnError $true
Refresh the operating system disk of each linked-clone desktop by restoring it to its original state and size.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRefresh -schedule "May 12 2011 01:15"
-forceLogoff $true -stopOnError $true
Recompose all linked-clone desktops from a snapshot of their parent virtual machine.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRecompose -schedule ((Get-Date).AddHours(8))
-parentVMPath /AutoPoolVMs/parent2 -parentSnapshotPath /AutoPoolSnapshots/parent2_snapshot
-forceLogoff $true -stopOnError $true
Creating and Updating Manually Provisioned Desktop Pools
Create a manually provisioned desktop pool that contains the virtual machine myVM. To use the Get-VM
cmdlet, you must install vSphere PowerCLI.
Add-ManualPool -pool_id manPool -id (Get-VM -name "myVM").id -isUserResetAllowed $true
NOTE To provision all the desktops in advance of their use, set -minimumCount and -maximumCount to the
same value.
NOTE To provision all the desktops in advance of their use, set -minimumCount and -maximumCount to the
same value.