5.2

Table Of Contents
VMware, Inc. 53
Chapter 3 Using View PowerCLI
Export-NetworkLabelSpecForLinkedClone -vc_id 1a2b3c4d-5e6f -clusterPath
"/myresourcepool/host/Cluster1/" -parentVMPath
"/myresourcepool/vm/Win7-Parent" -parentSnapshotPath "/snapshot1"
-maxVMsPerNetworkLabel 244 -networkLabelConfigFile "C:/label.txt"
When you set the -maxVMsPerNetworkLabel parameter, allow a certain number of virtual machines for
overhead. For example, if a network label VLAN allows a maximum of 254 IP addresses to be assigned to
virtual machines, you might set the maximum to 244.
The Export-NetworkLabelSpecForFullClone cmdlet is similar to the cmdlet shown in the preceding
example, but it uses the -TemplatePath parameter to specify the template from which you will generate a full
clone pool.
For details about the cmdlet syntax and parameters, display the View PowerCLI help.
Contents of a Network Label Configuration File
The configuration file generated by the Export Network Label cmdlets contains the following sections. For a
sample configuration file, see “Example Network Label Configuration File” on page 53.
Enabled flag. This flag is set to enabled=true by default. Keep the flag set to true to allow View to
assign network labels to the pool.
Parameter Definition for NIC. Lists the NICs defined in vCenter Server on the template or the snapshot
of the parent virtual machine. Do not edit this section.
Parameter Definition for Network. Lists the network labels defined in vCenter Server for the ESXi hosts
in the cluster. Network labels are listed in alphabetical order. If a cluster uses standard network labels and
distributed virtual switch network labels, use only one type of label for a pool. Do not edit this section.
Network Label Attribute Definition. Lists the network labels associated with each NIC. The network
labels are commented out and the assignments are not functional. You must remove the comments (#
marks) from the appropriate network labels to allow them to be assigned to a desktop pool.
The maxvm parameter defines the maximum number of IP assignments that can be made to virtual
machines from the network label. The value of the maxvm parameter is generated by the
-maxVMsPerNetworkLabel parameter in the Export Network Label cmdlet. You can manually edit this
value in the configuration file.
If the parent virtual machine or template has two NICs, each network label discovered by the Export
Network Label cmdlet is associated with both NICs. Warning messages explain that IP address
assignments can become oversubscribed because the assignment function for one NIC is not aware of the
assignments that are made from the same network label for the second NIC. Each NIC is only aware of its
own network label assignments.
Example Network Label Configuration File
#Network Label Configuration Spec
#WARNING! Setting enabled flag to false will
#turn off the automatic network label assignment
#for newly provisioned desktops.
enabled=true
#Parameter Definition for NIC
nic1=Network adapter 1
nic2=Network adapter 2
#Parameter Definition for Network
network01=dv_2k_2004
network02=dv_2kclient_2164
network03=dv_2kdt1_2084
network04=dv_2kInfra_1924