«

»

Horizon View Multi-VLAN Explained

I am happy to finally be able to scratch this item from my list of missing View features.

  • Support for Multi-VLAN

 

In Horizon View 5.2 it is possible to configure an automated pool to use multiple VLANS or network labels. Administrators can assign multiple network labels to a linked-clone pool or an automated pool that contains full virtual machines.

Going back to the previous releases of View and understanding the problem.

When creating pools, each desktop inherits the network label of its parent’s template/snapshot. This network label specifies a portgroup/VLAN/DHCP IP address range. For large pools, this meant 1000s of desktops all forced into the same large VLAN, requiring enough IP addresses on the same subnet for each.

On the management side, administrators either had to accept this or implement workarounds to achieve industry standard VLAN sizing of /24 subnets of 256 IP addresses, either creating multiple smaller pools with different parent images, each with their own unique network label specifying the desired subnet size; or manually in vCenter or with the use of a script, modify the network label of each desktop VM to overwrite its parent’s network label after provisioning. This would have to be re-done after recompose/refresh or after modifying the pool size. This was one of the most common hurdles in implementing large pool sizes.

 

Understanding the new feature…

  • Each pool can now be configured with a “network label spec”. This allows an administrator to specify, for each network adapter/NIC on the parent, a list of desired network labels to automatically assign to each newly provisioned desktop in the pool.
  • Each label is given a maximum assignment count. After View has provisioned, assigned, and exhausted a network label to its configured capacity for a given NIC, it moves onto the next in the specification list.
  • Horizon View remembers the per-pool count of desktop VM’s and their labels provisioned under this feature, so if the pool size is later changed, the configured network label capacity and assignments will be honored.
  • This feature only assigns network labels to desktops upon first provisioning – previously created desktops are never modified.
  • Network labels are treated similar to MAC addresses – refresh and recompose operations do not revert the child to its parent’s network label state.

 

Now, this new awesome feature can only be configured thought Horizon View PowerShell and does not have Admin UI support at this point in time.

 

Configuration is done in three steps:

  1. Create a skeleton network label specification text file using parameters from a Cluster/Host and parent VM.
  2. Edit the network label specification file to associate available network labels with available NICs, along with maximum capacity counts.
  3. Create a new pool or update an existing pool using the network label specification file.

 

To understand how configure and implement  multi-VLAN support please refer to the Horizon View 5.2 Integration guide avaiable here.

 

Important Note on Upgrading Existing Pools

The PowerCLI to update an existing pool with the feature is easier to use than creating it from scratch, due to the ability to use Powershell’s piping functionality to populate the myriad other parameters. However, if the upgraded pool initially contained any desktop VMs not provisioned under the feature, the network label assigner will not count any labels on those desktops towards any maximum capacity counts.

Those original desktops can optionally be deleted after the feature is configured to have them re-provisioned and included in the count, or the administrator can configure the feature expecting them to not be included.
Likewise, VMs on the VC not created in the pool do not have their network labels counted against maximum capacity for this feature.

 

The PowerShell helper…

As you use the tool you will notice that creating  the configuration file with the correct parameters can be a daunting task due to the amount of parameters required.

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

 

To make things easier for the administrators I created a PowerShell script that automatically gather all required parameters, including vd_id, full and relative paths to clusters and pools, and than automatically pipe them to pipe into the Export-NetworkLabelSpecForLinkedClone or Export-NetworkLabelSpecForFullClone.

Place the script in one of the connection servers an run it as follows:

>> Export-NetworkLabel -PoolName “pool_template_name” -Path “c:\label.txt”

There is no need to specify Full or Linked Clone as the script will automatically identify the pool type.

 

<#</pre>
<em id="__mceDel"> .SYNOPSIS
 Network Label Config File Automation for Horizon View 5.2</em>

Created by Andre Leibovici

THIS CODE MAY BE CITED, REPRODUCED OR DISTRIBUTED WITHOUT EXPRESS AUTHORIZATION.

.DESCRIPTION
 Automates the creation of NIC and Network Label Cofiguration File.
 Network COnfiguration File allow administrators to enable multi-VLAN pool deployments.
 Must be execute on a VMware View Connection server.

For more information on multi-VLAN support refer to VMware View Integration Guide.

.PARAMETER -PoolName Display Name an existing of template pool in Vmware View
 -Path Path to save the Configuration file. By Default c:\label.txt

.EXAMPLE
 Export-NetworkLabel -PoolName "pool_template_name" -Path "c:\label.txt"
 #>

Function Export-NetworkLabel {
 Param (
 [parameter(ValueFromPipeline=$false,Position=0,Mandatory=$false)]
 [string]$PoolName,
 [parameter(ValueFromPipeline=$false,Position=1,Mandatory=$false)]
 [string]$Path = "C:/label.txt"
 )

Add-PSSnapin "VMware.View.Broker" -ErrorAction:SilentlyContinue

$vc = Get-ViewVC -ErrorAction:SilentlyContinue
 $pool = Get-Pool -DisplayName $PoolName -ErrorAction:SilentlyContinue
 if (!$pool) {
 Write-Host "Pool not found"
 Break
 }
 $clusterPath = ($pool.resourcePoolPath.Split("/") | Select -first 4) -join "/"

if ($pool.desktopSource -eq "SVI") {
 Export-NetworkLabelSpecForLinkedClone -vc_id $vc.vc_id -clusterPath $clusterPath -parentVM $pool.parentVMPath -parentSnapshotPath $pool.parentVMSnapshotPath -maxVMsPerNetworkLabel 244 -networkLabelConfigFile $Path
 } elseif ($pool.desktopSource -eq "VC") {
 Export-NetworkLabelSpecForFullClone -Vc_id $vc.vc_id -ClusterPath $clusterPath -TemplatePath $pool.templatePath -MaxVMsPerNetworkLabel 244 -NetworkLabelConfigFile $Path
 }

Return ""
 }
 

 

This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.

 

Similar Posts:

Permanent link to this article: http://myvirtualcloud.net/?p=4730

3 comments

3 pings

  1. JoshT

    Great article Andre on an much needed feature! This will allow templates to be deployed in different VLANs without having to create duplicate vm/snapshots just to change the NIC config.

  2. Ruben

    Funny. I created a similar script.
    Mine does not require the Pool to exist, but yours look very nice.

    You can find it here
    http://vmutils.blogspot.co.uk/2013/03/easy-generation-of-configuration-file.html

  3. Andre Leibovici

    Ruben, thanks for sharing with us. Great script too!

  1. How to: Win2K8 w/ PCoIP, Linked Clones, USB, Printing & much more on VMware View » myvirtualcloud.net

    [...] those customers and service providers are able to deliver Windows Server 2K8 combined with the new Horizon View Multi-VLAN feature they could effectively service a large part of the DaaS market without incurring into [...]

  2. Technology Short Take #32 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers

    [...] Andre Leibovici explains how Horizon View Multi-VLAN works and how to configure it. [...]

Leave a Reply