F5 BIG-IQ Virtual Edition single instance powershell script

This script will deploy a single instance F5 BIG-IQ VE on Azure across 2 subnets, with a public ip address and a storage account.

Before you run the script, make sure you have created a destination resource group container and ensure that you have registered the product on your destination subscription.

I have updated the script with the following:

Updated line 38 to the newer New-AzPublicIpAddress command,
Updated line 54 -PublisherName to -Publisher command,
Commmented out line 64 to 67 (due to pre registration completed in step 3),
Increased the disk size on line 17 to 120gb (due to new Azure baseline requirements),
I also introduced ResourceGroup2 into the script to avoid all the new F5 BIG-IQ resources being deployed into the virtual network resource group,

Update the following script and run in powershell:

# Provide values for the variables
# instance name

$bigiqInstance = 'allen-f5-big-iq'					

#Optional login if not already done so 
#Login-AzureRMAccount

						
#vnet resource group 
$resourceGroup = 'allen-vnet'

#Ive introduced a 2nd resource stack resource group container
$ResourceGroup2 = "allen-f5-big-iq-stack"
$location = 'uaenorth'
$vmSize = 'Standard_B2ms'
$diskSizeGB = '120'

            
#Azure Network Info -- Can be shared between machines
$vnetName = 'vnet-uaenorth'
                        
# VM specific info, needs to be changed for each deployment
$ipName = $bigiqInstance + '_Pip'
$nic1Name = $bigiqInstance + '_mgmt'
$nic2Name = $bigiqInstance + '_internal'
                        
$vmName = $bigiqInstance + '-vm'
$computerName = $bigiqInstance
                        
# Get the username and password to be used for the administrators account on the VM. 
# This is used when connecting to the VM using RDP.

#You will be prompted for credentials here:                        
$cred = Get-Credential
                        
$vnet = Get-AzureRmVirtualNetwork -ResourceGroupName $resourceGroup -Name $vnetName
$pip = New-AzPublicIpAddress -Name $ipName -ResourceGroupName $resourceGroup2 -Location $location -AllocationMethod Static

                        
#update your subnet[ids] accordingly by arranging your subnets by CIDR ascending and then count ID numbers starting at 0.    
#This will become your internal subnet                     
$nic1 = New-AzureRmNetworkInterface -Name $nic1Name -ResourceGroupName $resourceGroup2 -Location $location `
-SubnetId $vnet.Subnets[8].Id -PublicIpAddressId $pip.Id 
                      
#This will become your management subnet                        
$nic2 = New-AzureRmNetworkInterface -Name $nic2Name -ResourceGroupName $resourceGroup2 -Location $location `
-SubnetId $vnet.Subnets[7].Id
                        
# Start building the VM configuration
$vm = New-AzureRmVMConfig -VMName $vmName -VMSize $vmSize
$vm = Set-AzureRmVMOperatingSystem -VM $vm -Linux -ComputerName $computerName -Credential $cred
$vm = Set-AzureRmVMOSDisk -VM $vm -DiskSizeInGB $diskSizeGB -CreateOption FromImage -Caching ReadWrite
$vm = Set-AzureRmVMSourceImage -VM $vm -Publisher f5-networks -Offer f5-big-iq -Skus "f5-bigiq-virtual-edition-byol" -Version latest
                        
                                                
# Finish the VM configuration and add the NIC.
$vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nic1.Id -Primary
$vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nic2.Id
                        
                        
# Set the VM image as source image for the new VM
Set-AzureRmVMPlan -VM $vm -Name f5-bigiq-virtual-edition-byol -Product f5-big-iq -Publisher f5-networks
<#                      
#Have to accept terms
Get-AzureRmMarketplaceTerms -Name f5-bigiq-virtual-edition-byol -Product f5-big-iq -Publisher f5-networks | Set-AzureRmMarketplaceTerms -Accept
#>
# Create the VM
New-AzureRmVM -VM $vm -ResourceGroupName $resourceGroup2 -Location $location
                        
# Verify that the VM was created
$vmList = Get-AzureRmVM -ResourceGroupName $resourceGroup2
$vmList.Name

1 comment

  1. Hello, Neat post. There’s an issue together with your website in internet explorer, could test thisK IE still is the marketplace leader and a good element of people will pass over your magnificent writing because of this problem.

Leave a comment

Your email address will not be published. Required fields are marked *