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. This 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” `
-maxVMsPerNetworkLabel 5 `
-networkLabelConfigFile “C:/Win7.txt”

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

Get-ViewVC | select vc_id

vc_id
—–
7d87df91-bf73-47b3-b01a-f54214e6ff61
c0ed93c8-c5b5-42d1-aeed-99764921d29c

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.
enabled=true

#Parameter Definition for NIC
nic1=Network adapter 1

#Parameter Definition for Network
network01=vlan10
network02=vlan20
network03=vlan30

#Network Label Attribute Definition
#Expected format:
#<nic_param>.<network_param>.maxvm=<max vm for network label>

nic1.network01.maxvm=5
####nic1.network02.maxvm=5
nic1.network03.maxvm=5

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 <POOL-ID> -displayName “<displayName>” -NamePrefix “<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

composer_ad_id
————–
12232fbf-1dbd-42e5-84dd-f18848e5bcf5
a7e97ac8-1c61-4a41-8bd6-666a7e2eda17

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s