Deploying FusionHub in Microsoft Azure Using Local Powershell

Hello Community,

I have been meaning to do this for a while but now here it is, hopes it helps some of you.

I was trying to deploy a FusionHub VM into Azure using the instructions provided by Peplink but could not get it to work and came up with errors probably because some of the commands have been deprecated.

If you would like to use the Azure Dashboard to deploy your FusionHub in Azure, I have created another post at this link: Deploying FusionHub in Microsoft Azure Using it’s Dashboard (Azure GUI)

As I would be deploying a few FusionHubs regularly, I thought I would put a PowerShell script together to help simplify the deployment. I have tested it multiple times in Standalone Powershell 7, Powershell 7 Module installed in Microsoft VSCode and Windows Powershell ISE (this will NOT work in Azure Cloud Shell). I am sharing it for use by the community as you deem fit in deploying your FusionHub.

Get a FusionHub Evaluation or Solo Licence and Download FusionHub VHD (InControl 2)

From your InControl 2 Organization level - Organization > Settings > Warranty & License

On the “Warranty Status” screen, click the Acquire FusionHub License button

Download FusionHub VHD

To add FusionHub onto your organisation, a pop up will open where you will be able to select your organisation where you want to deploy FusionHub. I recommend you create your organisation and group before trying to download FusionHub.

Extract downloaded FusionHub zip file and note full path to FusionHub VHD


In the above example path but add the file name at the end fusionhub.vhd D:\Downloads\fusionhub-8.0.1-build1644\FusionHub\VHD\fusionhub.vhd

The PowerShell Step

The PowerShell script is based on the new Azure AZ Module introduced in December 2018, it is the intended PowerShell module for interacting with Azure (which means, if you are using the AzureRM Module this script will not work.

PowerShell 7.x and later is the recommended version of PowerShell for use with Azure PowerShell on all platforms.

If you are still using AzureRM Module, you can always use them in compatibility mode once you have migrated to the Az Module.

Get Powershell 7 Ready to Run the Script

Install Powershell 7 Extension Module in Visual Studio Code: Click Here

To Upgrade Windows Powershell to Version 7: Click Here

Migrate Azure PowerShell from AzureRM to Az Module

Ensure existing scripts work with the latest AzureRM release (The latest available version of AzureRM is 6.13.1 at time of writing this) if not upgrade: Click Here

Uninstall AzureRM Module: Click Here

Install the Azure PowerShell Az module: Click Here

Enable AzureRM compatibility aliases: Click Here

Running Powershell Script to Deploy FusionHub VM in Azure

As long as you have followed the instructions above, you have Powershell 7 and the Azure Az Module is running in Powershell on your local PC/Laptop this script is all you need to deploy your FusionHub VM in Azure.

You will need to define the variables below to add to the script, name your variables in a way that they will make sense to you. (leave quotes in each variable).

The Script will deploy the following in a “resource group” as defined in the script:

  1. Upload the FusionHub VHD to Azure Storage from your local computer.
  2. Create a managed disk from FusionHub VHD.
  3. Create the networking resources.
  4. Create FushionHub VM

I recommend you use Microsoft Visual Studio Code or Windows Powershell ISE (x86) to make easier to edit the variables. I have also added further explanation to each variable in the script itself.

Downloads
Deploying Fusion VM in Azure Script.txt (6.4 KB)
Table for defining variables before add to script.pdf (111.5 KB)

Variable Name Sample Variables
$ $resourceGroup ‘testfhb26’
$location ‘uk south’
$storageaccount ‘fhbstorageaccount26’
$storageType ‘Standard_LRS’
$containername ‘fhbcontainer’
$localPath ‘D:\Downloads\fusionhub-8.0.1-build1644\FusionHub\VHD\fusionhub.vhd’ (Example)
$vhdName ‘fusionhub.vhd’
$subscriptionId 01508fa3-2635-40c1-821f-3dc3c720e8fe(Add your subscription ID here)
$diskName ‘testdiskfhb’
$diskSize ‘4’
$sourceVHDURI https://fhbstorageaccount26.blob.core.windows.net/fhbcontainer/fusionhub.vhd
$storageAccountId ‘/subscriptions/01508fa3-2635-40c1-821f-3dc3c720e8fe/resourceGroups/testfhb26/providers/Microsoft.Storage/storageAccounts/fhbstorageaccount26’ (Add your subscription ID in place of BLURRED info)
$subnetName ‘fhbSubnet’
$vnetName ‘fhbVnet’
$nsgName ‘fhbNsg’
$ruleName ‘fhbRdpRule’
$virtualNetworkName ‘fhbVnet’
$virtualMachineName ‘testfhbVM’
$virtualMachineSize ‘Basic_A0’

Once you have named your variables, double-check they are all entered correctly then run the whole Script at once, in the end, you will have a full working FusionHub VM deployed in Azure.

Please Note: When you run the script it will connect and authenticate you to your Azure Account by proving a link and code as below. Once you have authenticated the script will continue to run automatically.

Sample Script Image Before Running


Download to see script variables discriptions
01-Powershell Image.pdf (1.1 MB)

Sample Image On Completion of Script


02-Powershell Image.pdf (1.6 MB)

Some Final Configuration Steps

To make sure you can access remote network hosted on in Azure, make sure to change IP forwarding to enabled on FusionHub network interface via the dashboard.

Go to IP configurations => IP forwarding then set to enabled

Access your FusionHub Admin Page using IP Address
Once the FusionHub VM is deployed, you can access it using the Public IP by clicking the name of the FusionHub VM page in Azure copy this IP address then enter in a browser to take you to the FusionHub Login page.

Create URL for easy access to FusionHub Admin Page
As the address for accessing the FusionHub admin page is dynamic, you can create a DNS name for it in Azure to always access it should it change due to a restart or other.

Once you have added your label, it will show up in the FusionHub page at the DNS label instead of Configure. (the URL is usually DNS_LABEL.VM_LOCATION.cloudapp.azure.com.

Steps for those familiar with Powershell, Azure and Scripts

  1. Make sure you have Powershell 7 installed.
  2. Azure Az module Installed.
  3. Add Variables to PowerShell Script.
  4. Run script.
  5. Follow final configuration steps.

Connecting your Peplink or Pepwave device to FusionHub and enable SpeedFusion

@MartinLangmaid who provides support to many of us here, has some YouTube videos up that would help you understand how to configure your devices to enable FusionHub connections to your peplink device and configure Speedfusion. The cloud part of the video is not Azure related but the configuration parts will help a lot.

Peplink FusionHub Evaluation Tutorial
Setting Up SpeedFusion between a FusionHub On Vultr and a Peplink BR1 4G Router

Don’t let the fact that the instructions is kind of lengthy but I wanted to provide as much supporting information as possible. Some additional information might need to be added to make more clearer and I will welcome input from the community to help others.

Have fun and play with this :slight_smile:

Please like or comment if you found this post useful.

Regards,
Abby

5 Likes

Epic post Abby - Brava!

2 Likes

Thank you Martin, Your videos will be useful to explain am sure.

1 Like

Great guide @blkdoc,
We have moved your article into the Knowledgebase for the community & added some seach tags.
Happy to Help,
Marcus :slight_smile:

1 Like