Integration

Table Of Contents
VMware, Inc. 51
Chapter 3 Using View PowerCLI
# RemoveDatastoreFromLinkedClonePool
# Parameters
# $Pool Pool ID of pool to be updated.
# $Datastore Full path to datastore to be removed.
function RemoveDatastoreFromLinkedClonePool
{ param ($Pool, $Datastore)
$PoolSettings = (Get-Pool -pool_id $Pool)
$currentdatastores = $PoolSettings.datastoreSpecs
$datastores = ""
foreach ($spec in $currentdatastores.split(";")){
$path = $spec.split("]")[1]
$pathToRemove = $Datastore.split("]")[1]
if(-not $pathToRemove){
$pathToRemove = $Datastore
}
if(-not ($path -eq $pathToRemove)){
$datastores = $datastores + "$spec;"
}
}
Update-AutomaticLinkedClonePool -pool_id $Pool -datastoreSpecs $datastores
}
Assign Multiple Network Labels to a Desktop Pool
In View 5.2 and later releases, you can configure automated desktop pools to use multiple network labels. This
feature greatly expands the number of IP addresses that can be assigned to the virtual machines in a pool,
making it easier to create pools with a large number of desktops.
By default, the virtual machines in a desktop pool inherit the network interface card (NIC), and its associated
network label, that are on the parent virtual machine or template. (Some parent virtual machines or templates
might have multiple NICs with their associated network labels.) Typically, the subnet mask of a VLAN defined
by a network label has a limited range of available IP addresses. For example, a subnet mask might have a
maximum of 254 IP addresses that can be assigned to the desktop virtual machines.
In View 5.2 and later releases, View PowerCLI cmdlets let you assign network labels that are available in the
vCenter Server resource pool where the desktop pool is being deployed. Specifically, you take the following
steps:
Select network labels from those that are defined for the ESXi cluster in vCenter Server
Associate the labels with the NICs that are inherited from the parent virtual machine or template
Specify a maximum number of IP addresses that can be assigned to virtual machines from each network
label
Save the preceding information in a network label configuration file
Use the configuration file with a View PowerCLI cmdlet that creates a desktop pool
You can assign multiple network labels to automated full clone pools or linked clone pools.
The network labels are distributed among the virtual machines in the entire desktop pool. When View
provisions desktops, network labels are assigned in alphabetical order. When the maximum number of virtual
machines are provisioned with IP addresses using the first network label, View starts assigning the second
label, and so on.
To assign and manage multiple network labels in a pool, perform the following tasks:
“Obtain NIC and Network Label Information in a Configuration File” on page 52
“Edit the Network Label Configuration File” on page 54
“Deploy a Desktop Pool with Network Label Assignments” on page 55
“Display the Network Label Assignments for an Existing Pool or Desktop” on page 56