Before you can assign multiple network labels to a pool, you must obtain NIC and network label information and export that information to a network label configuration file.

Before you begin

Become familiar with using View PowerCLI. See Getting Started with View PowerCLI.

About this task

For a full-clone pool, you obtain information about the NICs configured on the template that you use to create the full-clone pool. For a linked-clone pool, you obtain information about the NICs configured on the parent virtual machine that you use to create the linked-clone pool. You obtain network label information from the available network labels configured on the ESXi hosts in the cluster on which the desktop pool is to be deployed.

When you export the NIC and network label information to a network label configuration file, you set the maximum number of virtual machines that can be provisioned with IP addresses from each network label. You should 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 number to 244.

Procedure

  • To obtain and export NIC and network label information to create a full-clone pool, use the Export-NetworkLabelSpecForFullClone cmdlet.

    For example:

    Export-NetworkLabelSpecForFullClone -vc_id id -clusterPath "cluster-path" 
    -TemplatePath "template-path" -maxVMsPerNetworkLabel nn 
    -networkLabelConfigFile "config-file-path"
  • To obtain and export NIC and network label information to create a linked-clone pool, use the Export-NetworkLabelSpecForLinkedClone cmdlet.

    For example:

    Export-NetworkLabelSpecForLinkedClone -vc_id id -clusterPath "cluster-path" 
    -parentVMPath "parent-vm-path" -parentSnapshotPath "snapshot-path" 
    -maxVMsPerNetworkLabel nn -networkLabelConfigFile "config-file-path"

Results

The network label cmdlet obtains the network labels configured in vCenter Server for all the ESXi hosts in the specified cluster, sets the maximum number of virtual machines that can be provisioned with IP addresses from each network label, and exports the list of NICs and network labels to the network label configuration file.

Obtaining NIC and Network Label Information

In this example, the Export-NetworkLabelSpecForLinkedClone cmdlet obtains NICs from the Win7-Parent virtual machine and Snapshot1, and network label information from Cluster1. A maximum of 244 virtual machines can be provisioned with IP addresses from each network label. The information is exported to a network label configuration file named C:/label.txt.

Export-NetworkLabelSpecForLinkedClone -vc_id 1a2b3c4d-5e6f 
-clusterPath "/myresourcepool/host/Cluster1/" 
-parentVMPath "/myresourcepool/vm/Win7-Parent" -parentSnapshotPath "/snapshot1"
-maxVMsPerNetworkLabel 244 -networkLabelConfigFile "C:/label.txt"

What to do next

Verify and edit the network label configuration file. See Verify and Edit a Network Label Configuration File.