Product Documentation

Appendix

Mar 21, 2016
This appendix provides cmdlets with which you can do the following in Azure PowerShell:
  • Provision NetScaler virtual machines in the Azure cloud
  • Configure NetScaler VPX HA with Azure External Load Balancer
  • Configure NetScaler VPX HA with Azure Internal Load Balancer
  • Provision NetScaler VPX in Azure with Static IIP

Provisioning NetScaler VPX with Single NIC by Using Azure PowerShell

$image = Get-AzureVMImage -ImageName "vpx_105_51_1040"  
$vm = New-AzureVMConfig -Name "vpx_bwc_105" -InstanceSize "Medium" -Image $image.ImageName  
Add-AzureProvisioningConfig -VM $vm -Linux -Linuxuser "user" -Password "Citrix123" 
Set-AzureSubnet –SubnetNames “mgmt.-1” –VM  $vm 
Set-AzureStaticVNetIP -IPAddress "10.3.1.10" -VM $vm  
New-AzureService -ServiceName "vpx105" -Location "North Europe" 
Set-AzureEndpoint -Name “SSH” –LocalPort 22 -PublicPort 22 -Protocol tcp -VM $vm 
Add-AzureEndpoint -Name “HTTP” -LocalPort 80 -PublicPort 80 -Protocol tcp -VM $vm  
Add-AzureEndpoint -Name “SSL” –LocalPort 443 -PublicPort 443 -Protocol tcp -VM $vm  
New-AzureVM -ServiceName "vpx105" -VNetName "systemtestazure" -VM $vm

Configuring NetScaler VPX HA with Azure External Load Balancer by Using Azure PowerShell

$vm1 = "vpxne1" 
$vm2 = "vpxne2” 
$svc = "vpxne" 
$lbsetname = "azurelb" 
$epname = "vip" 
 
Get-AzureVM -Name $vm1 -ServiceName $svc | Add-AzureEndpoint -LBSetName $lbsetname -Name  
$epname -Protocol "tcp" -LocalPort 15000 -PublicPort 15000 –ProbeProtocol TCP –ProbePort  
9000 –ProbeIntervalInSeconds 5 | Update-AzureVM 
 
Get-AzureVM -Name $vm1 -ServiceName $svc | Add-AzureEndpoint -LBSetName $lbsetname -Name  
$epname -Protocol "tcp" -LocalPort 15000 -PublicPort 15000 –ProbeProtocol TCP –ProbePort  
9000 –ProbeIntervalInSeconds 5 | Update-AzureVM

Configuring NetScaler VPX HA with Azure Internal Load Balancer by Using Azure PowerShell

$svc = "vpxne" [Cloud service name]  
$ilb = "vpx-ilb" [Name of the internal load balancer] $subnet = "mgmtsub"  
[Management subnet where the default NIC exists]  
$IP = "10.3.1.50" [IP address from the management subnet]  
 
Add-AzureInternalLoadBalancer -ServiceName $svc -InternalLoadBalancerName $ilb  
–SubnetName $subnet –StaticVNetIPAddress $IP  
 
$vm1 = "vpxne1"  
$vm2 = "vpxne2"  
$epname = "vip2"  
$prot = "TCP"  
$locport = 1500  
$pubport = 1500  
$lbsetname = "azure_ilb"  
 
Get-AzureVM -ServiceName $svc -Name $vm1 | Add-AzureEndpoint -Name $epname -Protocol  
$prot -LocalPort $locport -PublicPort $pubport -LBSetName $lbsetname -InternalLoadBalancerName 
 $ilb –ProbeProtocol TCP –ProbePort 9000 –ProbeIntervalInSeconds 5 | Update-AzureVM  
 
Get-AzureVM -ServiceName $svc -Name $vm2 | Add-AzureEndpoint -Name $epname -Protocol  
$prot -LocalPort $locport -PublicPort $pubport -LBSetName $lbsetname -InternalLoadBalancerName 
 $ilb –ProbeProtocol TCP –ProbePort 9000 –ProbeIntervalInSeconds 5 | Update-AzureVM

Provisioning NetScaler VPX on Azure with a Static IIP by Using Azure PowerShell

Before you begin provisioning the virtual machine with a static internal IP address, make sure that
  • Azure virtual network is configured
  • You have downloaded Azure PowerShell

Run the following commands on Azure PowerShell to provision NetScaler VPX on Azure with static IIP.

$image = Get-AzureVMImage -ImageName “image1045" 
 
$vm = New-AzureVMConfig -Name "vpx3" -InstanceSize "Medium" -Image $image.ImageName 
 
Add-AzureProvisioningConfig -VM $vm -Linux -Linuxuser "user" -Password “Citrix123” 
 
Set-AzureSubnet 
 
–SubnetNames 
 
“mgmt-1” -VM $vm 
 
Set-AzureStaticVNetIP -IPAddress “1.10.1.5" -VM $vm 
 
New-AzureService -ServiceName “singlevpx" -Location "North Europe”  <To add new cloud service> 
 
Set-AzureEndpoint -Name “SSH” –LocalPort 22 -PublicPort 1322 -Protocol tcp -VM $vm 
 
New-AzureVM -ServiceName “singlevpx" -VNetName “pcwestus" -VM $vm