Wednesday, May 29, 2013

How to use VMware Horizon View Multi VLan

With the release of VMware Horizon View 5.2, the functionality made ​​available that allow to create an automated pool where multiple VLANs to be linked. The administrator can use multiple network labels to a linked-clone virtual machine or an automated pool containing full virtual machines. Multi VLAN configuration is performed with PowerCLI from the View Connection Server. Functions are used from the PowerCLI for vSphere, so these need to be installed to.

Before a virtual machine as a golden image can be used within a multi-VLAN configuration. The hardware version of the virtual machine to version 9 be amended. Within hardware version 9, the functionality is present which is required for the use of the functionality.

There are different steps to create the the automated pool. The first step is exporting the availabele VLans for the golden image. The exported file needs to be configured and will be used for creating the Horizon View Pool.

Export Configuration
To create an export of the used VLans of the golden image, the following command is used for the export of the golden image configuration. When exporting the settings for a full cloned virtual machines, the command Export NetworkLabelSpecForLinkedClone need to be replaced with Export-NetworkLabelSpecForFullClone:

Export-NetworkLabelSpecForLinkedClone `
-vc_id "
7d87df91-bf73-47b3-b01a-f54214e6ff61" `
-clusterPath "
/myresourcepool/host/Cluster1/" `
-parentVMPath "
/myresourcepool/vm/Win7-Parent" `
-parentSnapshotPath "
/Win7-Parent/snapshot" `
5 `
-networkLabelConfigFile "

The vc_id identifies the vCenter Server. To obtain the vCenter ID, the following command can be used:

Get-ViewVC | select vc_id

The following output is displayed


Edit Export file
The exported file needs to be edited before used for creating the View Pool.

#Network Label Configuration Spec
#WARNING! Setting enabled flag to false will
#turn off the automatic network label assignment
#for newly provisioned desktops.
#Parameter Definition for NIC
nic1=Network adapter 1
#Parameter Definition for Network
#Network Label Attribute Definition
#Expected format:

Within the configuration file, the different VLans availabele for the golden images are shown. A VLan can be selected by removing the #### before the line.  In the above example, the used VLans are set network01 and network03, the maximum used IPs witin the VLan is maximized to 5.

Create View Pool
The exported configration file from the previous step will be used for the creation of the Horizon  View pool. The following command can be used:

Add-AutomaticLinkedClonePool -Pool_id -displayName "" -NamePrefix "-{n:fixed=3}" -Vc_id 7d87df91-bf73-47b3-b01a-f54214e6ff61 -Persistence NonPersistent -VmFolderPath "/myresourcepool/vm/" -ResourcePoolPath "/myresourcepool/vm" -ParentVmPath "/myresourcepool/vm/Win7-Parent" -ParentSnapshotPath "/Win7-Parent/snapshot" -DatastoreSpecs "[Moderate,OS,data]/myresourcepool/host/VMFS01” -Composer_ad_id 12232fbf-1dbd-42e5-84dd-f18848e5bcf5 -UseUserDataDisk $false -UseTempDisk $true -MinimumCount 1 -MaximumCount 5 -HeadroomCount 2 -PowerPolicy AlwaysOn -SuspendProvisioningOnError $true -NetworkLabelConfigFile "C:/Win7.txt"

The composer_ad_id parameter specifies the ID of the View Composer domain. To obtain the Composer id the following command can be used:

Get-ComposerDomain | select composer_ad_id

The following output is displayed

The Horizon View pool is created and will start provisioing the linked clones. Additional configuraton steps can be made after creation of the pool.

No comments: